#ifndef MISSION_DEVICES_DEVICEDEFINITIONS_GPSDEFINITIONS_H_ #define MISSION_DEVICES_DEVICEDEFINITIONS_GPSDEFINITIONS_H_ #include "fsfw/devicehandlers/DeviceHandlerIF.h" #include "fsfw/datapoollocal/StaticLocalDataSet.h" namespace GpsHyperion { static constexpr DeviceCommandId_t GPS_REPLY = 0; static constexpr uint32_t DATASET_ID = 0; enum GpsPoolIds: lp_id_t { LATITUDE = 0, LONGITUDE = 1, ALTITUDE = 2, FIX_MODE = 3, SATS_IN_USE = 4, UNIX_SECONDS = 5, YEAR = 6, MONTH = 7, DAY = 8, HOURS = 9, MINUTES = 10, SECONDS = 11 }; enum GpsFixModes: uint8_t { INVALID = 0, NO_FIX = 1, FIX_2D = 2, FIX_3D = 3 }; } class GpsPrimaryDataset: public StaticLocalDataSet<18> { public: GpsPrimaryDataset(object_id_t gpsId): StaticLocalDataSet(sid_t(gpsId, GpsHyperion::DATASET_ID)) { setAllVariablesReadOnly(); } lp_var_t latitude = lp_var_t(sid.objectId, GpsHyperion::LATITUDE, this); lp_var_t longitude = lp_var_t(sid.objectId, GpsHyperion::LONGITUDE, this); lp_var_t altitude = lp_var_t(sid.objectId, GpsHyperion::ALTITUDE, this); lp_var_t fixMode = lp_var_t(sid.objectId, GpsHyperion::FIX_MODE, this); lp_var_t satInUse = lp_var_t(sid.objectId, GpsHyperion::SATS_IN_USE, this); lp_var_t year = lp_var_t(sid.objectId, GpsHyperion::YEAR, this); lp_var_t month = lp_var_t(sid.objectId, GpsHyperion::MONTH, this); lp_var_t day = lp_var_t(sid.objectId, GpsHyperion::DAY, this); lp_var_t hours = lp_var_t(sid.objectId, GpsHyperion::HOURS, this); lp_var_t minutes = lp_var_t(sid.objectId, GpsHyperion::MINUTES, this); lp_var_t seconds = lp_var_t(sid.objectId, GpsHyperion::SECONDS, this); lp_var_t unixSeconds = lp_var_t(sid.objectId, GpsHyperion::UNIX_SECONDS, this); private: friend class GPSHyperionHandler; GpsPrimaryDataset(HasLocalDataPoolIF* hkOwner): StaticLocalDataSet(hkOwner, GpsHyperion::DATASET_ID) {} }; #endif /* MISSION_DEVICES_DEVICEDEFINITIONS_GPSDEFINITIONS_H_ */