continued gps handler

This commit is contained in:
2021-06-24 11:42:40 +02:00
parent 29989e7ae5
commit 9f795e3a3e
5 changed files with 74 additions and 29 deletions

View File

@ -1,21 +1,41 @@
#ifndef MISSION_DEVICES_DEVICEDEFINITIONS_GPSDEFINITIONS_H_
#define MISSION_DEVICES_DEVICEDEFINITIONS_GPSDEFINITIONS_H_
#include <fsfw/devicehandlers/DeviceHandlerIF.h>
#include "fsfw/devicehandlers/DeviceHandlerIF.h"
#include "fsfw/datapoollocal/StaticLocalDataSet.h"
namespace GpsHyperion {
static constexpr DeviceCommandId_t GPS_REPLY = 0;
enum GpsPoolIds: lp_id_t {
static constexpr uint32_t DATASET_ID = 0;
enum GpsPoolIds: lp_id_t {
LATITUDE = 0,
LONGITUDE = 1,
ALTITUDE = 2,
FIX_MODE = 3,
};
}
class GpsPrimaryDataset: public StaticLocalDataSet<5> {
public:
GpsPrimaryDataset(object_id_t gpsId):
StaticLocalDataSet(sid_t(gpsId, GpsHyperion::DATASET_ID)) {
setAllVariablesReadOnly();
}
lp_var_t<double> latitude = lp_var_t<double>(sid.objectId,
GpsHyperion::LATITUDE, this);
lp_var_t<double> longitude = lp_var_t<double>(sid.objectId,
GpsHyperion::LONGITUDE, this);
lp_var_t<double> altitude = lp_var_t<double>(sid.objectId, GpsHyperion::ALTITUDE, this);
lp_var_t<uint8_t> fixMode = lp_var_t<uint8_t>(sid.objectId, GpsHyperion::FIX_MODE, this);
private:
friend class GPSHyperionHandler;
GpsPrimaryDataset(HasLocalDataPoolIF* hkOwner):
StaticLocalDataSet(hkOwner, GpsHyperion::DATASET_ID) {}
};
#endif /* MISSION_DEVICES_DEVICEDEFINITIONS_GPSDEFINITIONS_H_ */