Added DataSets for all OutputValues/Sensors

This commit is contained in:
Marius Eggert 2022-10-19 11:00:46 +02:00
parent 2d64892a81
commit 86450f9d66

View File

@ -8,16 +8,35 @@
namespace acsctrl { namespace acsctrl {
enum SetIds : uint32_t { MGM_SENSOR_DATA, SUS_SENSOR_DATA }; enum SetIds : uint32_t {
MGM_SENSOR_DATA,
MGM_PROCESSED_DATA,
SUS_SENSOR_DATA,
SUS_PROCESSED_DATA,
GYR_SENSOR_DATA,
GYR_PROCESSED_DATA,
GPS_SENSOR_DATA,
MEKF_DATA
};
enum PoolIds : lp_id_t { enum PoolIds : lp_id_t {
// MGM Raw
MGM_0_LIS3_UT, MGM_0_LIS3_UT,
MGM_1_RM3100_UT, MGM_1_RM3100_UT,
MGM_2_LIS3_UT, MGM_2_LIS3_UT,
MGM_3_RM3100_UT, MGM_3_RM3100_UT,
MGM_IMTQ_CAL_NT, MGM_IMTQ_CAL_NT,
MGM_IMTQ_CAL_ACT_STATUS, MGM_IMTQ_CAL_ACT_STATUS,
// MGM Processed
MGM_0_VEC,
MGM_1_VEC,
MGM_2_VEC,
MGM_3_VEC,
MGM_4_VEC,
MGM_VEC_TOT,
MGM_VEC_TOT_DERIVATIVE,
MAG_IGRF_MODEL,
// SUS Raw
SUS_0_N_LOC_XFYFZM_PT_XF, SUS_0_N_LOC_XFYFZM_PT_XF,
SUS_6_R_LOC_XFYBZM_PT_XF, SUS_6_R_LOC_XFYBZM_PT_XF,
@ -35,15 +54,54 @@ enum PoolIds : lp_id_t {
SUS_5_N_LOC_XFYMZB_PT_ZB, SUS_5_N_LOC_XFYMZB_PT_ZB,
SUS_11_R_LOC_XBYMZB_PT_ZB, SUS_11_R_LOC_XBYMZB_PT_ZB,
// SUS Processed
SUS_0_VEC,
SUS_1_VEC,
SUS_2_VEC,
SUS_3_VEC,
SUS_4_VEC,
SUS_5_VEC,
SUS_6_VEC,
SUS_7_VEC,
SUS_8_VEC,
SUS_9_VEC,
SUS_10_VEC,
SUS_11_VEC,
SUS_VEC_TOT,
SUS_VEC_TOT_DERIVATIVE,
SUN_IJK_MODEL,
// GYR Raw
GYR_0_ADIS,
GYR_1_L3,
GYR_2_ADIS,
GYR_3_L3,
// GYR Processed
GYR_0_VEC,
GYR_1_VEC,
GYR_2_VEC,
GYR_3_VEC,
GYR_VEC_TOT,
// GPS PROCESSED
GC_LATITUDE,
GD_LONGITUDE,
// MEKF
SAT_ROT_RATE_MEKF,
QUAT_MEKF,
}; };
static constexpr uint8_t MGM_SET_ENTRIES = 10; static constexpr uint8_t MGM_SET_RAW_ENTRIES = 10;
static constexpr uint8_t SUS_SET_ENTRIES = 12; static constexpr uint8_t MGM_SET_PROCESSED_ENTRIES = 7 * sizeof(float) + 1 * sizeof(double);
static constexpr uint8_t SUS_SET_RAW_ENTRIES = 12;
static constexpr uint8_t SUS_SET_PROCESSED_ENTRIES = 14 * sizeof(float) + 1 * sizeof(double);
static constexpr uint8_t GYR_SET_RAW_ENTRIES = 2 * sizeof(float) + 2 * sizeof(double);
static constexpr uint8_t GYR_SET_PROCESSED_ENTRIES = 5 * sizeof(double);
static constexpr uint8_t GPS_SET_PROCESSED_ENTRIES = 2 * sizeof(double);
static constexpr uint8_t MEKF_SET_ENTRIES = 14 * sizeof(float) + 1 * sizeof(double);
/** /**
* @brief Raw MGM sensor data. Includes the IMTQ sensor data and actuator status. * @brief Raw MGM sensor data. Includes the IMTQ sensor data and actuator status.
*/ */
class MgmDataRaw : public StaticLocalDataSet<MGM_SET_ENTRIES> { class MgmDataRaw : public StaticLocalDataSet<MGM_SET_RAW_ENTRIES> {
public: public:
MgmDataRaw(HasLocalDataPoolIF* hkOwner) : StaticLocalDataSet(hkOwner, MGM_SENSOR_DATA) {} MgmDataRaw(HasLocalDataPoolIF* hkOwner) : StaticLocalDataSet(hkOwner, MGM_SENSOR_DATA) {}
@ -60,7 +118,24 @@ class MgmDataRaw : public StaticLocalDataSet<MGM_SET_ENTRIES> {
private: private:
}; };
class SusDataRaw : public StaticLocalDataSet<SUS_SET_ENTRIES> { class MgmDataProcessed : public StaticLocalDataSet<MGM_SET_PROCESSED_ENTRIES> {
public:
MgmDataProcessed(HasLocalDataPoolIF* hkOwner) : StaticLocalDataSet(hkOwner, MGM_PROCESSED_DATA) {}
lp_vec_t<float, 3> mgm0vec = lp_vec_t<float, 3>(sid.objectId, MGM_0_VEC, this);
lp_vec_t<float, 3> mgm1vec = lp_vec_t<float, 3>(sid.objectId, MGM_1_VEC, this);
lp_vec_t<float, 3> mgm2vec = lp_vec_t<float, 3>(sid.objectId, MGM_2_VEC, this);
lp_vec_t<float, 3> mgm3vec = lp_vec_t<float, 3>(sid.objectId, MGM_3_VEC, this);
lp_vec_t<float, 3> mgm4vec = lp_vec_t<float, 3>(sid.objectId, MGM_4_VEC, this);
lp_vec_t<float, 3> mgmVecTot = lp_vec_t<float, 3>(sid.objectId, MGM_VEC_TOT, this);
lp_vec_t<float, 3> mgmVecTotDerivative =
lp_vec_t<float, 3>(sid.objectId, MGM_VEC_TOT_DERIVATIVE, this);
lp_vec_t<double, 3> magIgrfModel = lp_vec_t<double, 3>(sid.objectId, MAG_IGRF_MODEL, this);
private:
};
class SusDataRaw : public StaticLocalDataSet<SUS_SET_RAW_ENTRIES> {
public: public:
SusDataRaw(HasLocalDataPoolIF* hkOwner) : StaticLocalDataSet(hkOwner, SUS_SENSOR_DATA) {} SusDataRaw(HasLocalDataPoolIF* hkOwner) : StaticLocalDataSet(hkOwner, SUS_SENSOR_DATA) {}
@ -74,8 +149,80 @@ class SusDataRaw : public StaticLocalDataSet<SUS_SET_ENTRIES> {
lp_vec_t<uint16_t, 6> sus7 = lp_vec_t<uint16_t, 6>(sid.objectId, SUS_7_R_LOC_XBYBZM_PT_XB, this); lp_vec_t<uint16_t, 6> sus7 = lp_vec_t<uint16_t, 6>(sid.objectId, SUS_7_R_LOC_XBYBZM_PT_XB, this);
lp_vec_t<uint16_t, 6> sus8 = lp_vec_t<uint16_t, 6>(sid.objectId, SUS_8_R_LOC_XBYBZB_PT_YB, this); lp_vec_t<uint16_t, 6> sus8 = lp_vec_t<uint16_t, 6>(sid.objectId, SUS_8_R_LOC_XBYBZB_PT_YB, this);
lp_vec_t<uint16_t, 6> sus9 = lp_vec_t<uint16_t, 6>(sid.objectId, SUS_9_R_LOC_XBYBZB_PT_YF, this); lp_vec_t<uint16_t, 6> sus9 = lp_vec_t<uint16_t, 6>(sid.objectId, SUS_9_R_LOC_XBYBZB_PT_YF, this);
lp_vec_t<uint16_t, 6> sus10 = lp_vec_t<uint16_t, 6>(sid.objectId, SUS_10_N_LOC_XMYBZF_PT_ZF, this); lp_vec_t<uint16_t, 6> sus10 =
lp_vec_t<uint16_t, 6> sus11 = lp_vec_t<uint16_t, 6>(sid.objectId, SUS_11_R_LOC_XBYMZB_PT_ZB, this); lp_vec_t<uint16_t, 6>(sid.objectId, SUS_10_N_LOC_XMYBZF_PT_ZF, this);
lp_vec_t<uint16_t, 6> sus11 =
lp_vec_t<uint16_t, 6>(sid.objectId, SUS_11_R_LOC_XBYMZB_PT_ZB, this);
private:
};
class SusDataProcessed : public StaticLocalDataSet<SUS_SET_PROCESSED_ENTRIES> {
public:
SusDataProcessed(HasLocalDataPoolIF* hkOwner) : StaticLocalDataSet(hkOwner, SUS_PROCESSED_DATA) {}
lp_vec_t<float, 3> sus0vec = lp_vec_t<float, 3>(sid.objectId, SUS_0_VEC, this);
lp_vec_t<float, 3> sus1vec = lp_vec_t<float, 3>(sid.objectId, SUS_1_VEC, this);
lp_vec_t<float, 3> sus2vec = lp_vec_t<float, 3>(sid.objectId, SUS_2_VEC, this);
lp_vec_t<float, 3> sus3vec = lp_vec_t<float, 3>(sid.objectId, SUS_3_VEC, this);
lp_vec_t<float, 3> sus4vec = lp_vec_t<float, 3>(sid.objectId, SUS_4_VEC, this);
lp_vec_t<float, 3> sus5vec = lp_vec_t<float, 3>(sid.objectId, SUS_5_VEC, this);
lp_vec_t<float, 3> sus6vec = lp_vec_t<float, 3>(sid.objectId, SUS_6_VEC, this);
lp_vec_t<float, 3> sus7vec = lp_vec_t<float, 3>(sid.objectId, SUS_7_VEC, this);
lp_vec_t<float, 3> sus8vec = lp_vec_t<float, 3>(sid.objectId, SUS_8_VEC, this);
lp_vec_t<float, 3> sus9vec = lp_vec_t<float, 3>(sid.objectId, SUS_8_VEC, this);
lp_vec_t<float, 3> sus10vec = lp_vec_t<float, 3>(sid.objectId, SUS_8_VEC, this);
lp_vec_t<float, 3> sus11vec = lp_vec_t<float, 3>(sid.objectId, SUS_8_VEC, this);
lp_vec_t<float, 3> susVecTot = lp_vec_t<float, 3>(sid.objectId, SUS_VEC_TOT, this);
lp_vec_t<float, 3> susVecTotDerivative =
lp_vec_t<float, 3>(sid.objectId, SUS_VEC_TOT_DERIVATIVE, this);
lp_vec_t<double, 3> sunIjkModel = lp_vec_t<double, 3>(sid.objectId, SUN_IJK_MODEL, this);
private:
};
class GyrDataRaw : public StaticLocalDataSet<GYR_SET_RAW_ENTRIES> {
public:
GyrDataRaw(HasLocalDataPoolIF* hkOwner) : StaticLocalDataSet(hkOwner, GYR_SENSOR_DATA) {}
lp_vec_t<double, 3> gyr0Adis = lp_vec_t<double, 3>(sid.objectId, GYR_0_ADIS, this);
lp_vec_t<float, 3> gyr1L3 = lp_vec_t<float, 3>(sid.objectId, GYR_1_L3, this);
lp_vec_t<double, 3> gyr2Adis = lp_vec_t<double, 3>(sid.objectId, GYR_2_ADIS, this);
lp_vec_t<float, 3> gyr3L3 = lp_vec_t<float, 3>(sid.objectId, GYR_3_L3, this);
private:
};
class GyrDataProcessed : public StaticLocalDataSet<GYR_SET_PROCESSED_ENTRIES> {
public:
GyrDataProcessed(HasLocalDataPoolIF* hkOwner) : StaticLocalDataSet(hkOwner, GYR_PROCESSED_DATA) {}
lp_vec_t<double, 3> gyr0vec = lp_vec_t<double, 3>(sid.objectId, GYR_0_VEC, this);
lp_vec_t<double, 3> gyr1vec = lp_vec_t<double, 3>(sid.objectId, GYR_1_VEC, this);
lp_vec_t<double, 3> gyr2vec = lp_vec_t<double, 3>(sid.objectId, GYR_2_VEC, this);
lp_vec_t<double, 3> gyr3vec = lp_vec_t<double, 3>(sid.objectId, GYR_3_VEC, this);
lp_vec_t<double, 3> gyrVecTot = lp_vec_t<double, 3>(sid.objectId, GYR_VEC_TOT, this);
private:
};
class GpsDataProcessed : public StaticLocalDataSet<GPS_SET_PROCESSED_ENTRIES> {
public:
GpsDataProcessed(HasLocalDataPoolIF* hkOwner)
: StaticLocalDataSet(hkOwner, GPS_SET_PROCESSED_ENTRIES) {}
lp_var_t<double> gcLatitude = lp_var_t<double>(sid.objectId, GC_LATITUDE, this);
lp_var_t<double> gdLongitude = lp_var_t<double>(sid.objectId, GD_LONGITUDE, this);
private:
};
class MekfData : public StaticLocalDataSet<MEKF_SET_ENTRIES> {
public:
MekfData(HasLocalDataPoolIF* hkOwner) : StaticLocalDataSet(hkOwner, MEKF_DATA) {}
lp_vec_t<double, 4> quatMekf = lp_vec_t<double, 4>(sid.objectId, QUAT_MEKF, this);
lp_vec_t<double, 3> satRotRateMekf = lp_vec_t<double, 3>(sid.objectId, SAT_ROT_RATE_MEKF, this);
private: private:
}; };