v1.14.0 #304
@ -89,7 +89,7 @@ void AcsController::copyMgmData() {
|
||||
{
|
||||
PoolReadGuard pg(&imtqMgmSet);
|
||||
if (pg.getReadResult() == RETURN_OK) {
|
||||
std::memcpy(mgmData.imtqCal.value, imtqMgmSet.mgmXyz.value, 3 * sizeof(int32_t));
|
||||
std::memcpy(mgmData.imtqRaw.value, imtqMgmSet.mtmRawNt.value, 3 * sizeof(float));
|
||||
mgmData.actuationCalStatus.value = imtqMgmSet.coilActuationStatus.value;
|
||||
}
|
||||
}
|
||||
|
@ -42,8 +42,7 @@ class AcsController : public ExtendedControllerBase {
|
||||
MGMLIS3MDL::MgmPrimaryDataset(objects::MGM_2_LIS3_HANDLER);
|
||||
RM3100::Rm3100PrimaryDataset mgm3Rm3100Set =
|
||||
RM3100::Rm3100PrimaryDataset(objects::MGM_3_RM3100_HANDLER);
|
||||
IMTQ::CalibratedMtmMeasurementSet imtqMgmSet =
|
||||
IMTQ::CalibratedMtmMeasurementSet(objects::IMTQ_HANDLER);
|
||||
IMTQ::RawMtmMeasurementSet imtqMgmSet = IMTQ::RawMtmMeasurementSet(objects::IMTQ_HANDLER);
|
||||
|
||||
PoolEntry<float> mgm0PoolVec = PoolEntry<float>(3);
|
||||
PoolEntry<float> mgm1PoolVec = PoolEntry<float>(3);
|
||||
|
@ -34,7 +34,7 @@ class MgmData : public StaticLocalDataSet<MGM_SET_ENTRIES> {
|
||||
lp_vec_t<float, 3> mgm2Lis3 = lp_vec_t<float, 3>(sid.objectId, MGM_2_LIS3_UT, this);
|
||||
lp_vec_t<float, 3> mgm3Rm3100 = lp_vec_t<float, 3>(sid.objectId, MGM_3_RM3100_UT, this);
|
||||
// The IMTQ measurements are in integer nT
|
||||
lp_vec_t<int32_t, 3> imtqCal = lp_vec_t<int32_t, 3>(sid.objectId, MGM_IMTQ_CAL_NT, this);
|
||||
lp_vec_t<float, 3> imtqRaw = lp_vec_t<float, 3>(sid.objectId, MGM_IMTQ_CAL_NT, this);
|
||||
lp_var_t<uint8_t> actuationCalStatus =
|
||||
lp_var_t<uint8_t>(sid.objectId, MGM_IMTQ_CAL_ACT_STATUS, this);
|
||||
|
||||
|
@ -335,9 +335,7 @@ ReturnValue_t IMTQHandler::initializeLocalDataPool(localpool::DataPool& localDat
|
||||
localDataPoolMap.emplace(IMTQ::ACTUATION_CAL_STATUS, new PoolEntry<uint8_t>({0}));
|
||||
|
||||
/** Entries of raw MTM measurement dataset */
|
||||
localDataPoolMap.emplace(IMTQ::MTM_RAW_X, new PoolEntry<float>({0}));
|
||||
localDataPoolMap.emplace(IMTQ::MTM_RAW_Y, new PoolEntry<float>({0}));
|
||||
localDataPoolMap.emplace(IMTQ::MTM_RAW_Z, new PoolEntry<float>({0}));
|
||||
localDataPoolMap.emplace(IMTQ::MTM_RAW, new PoolEntry<float>(3));
|
||||
localDataPoolMap.emplace(IMTQ::ACTUATION_RAW_STATUS, new PoolEntry<uint8_t>({0}));
|
||||
|
||||
/** INIT measurements for positive X axis test */
|
||||
@ -781,28 +779,29 @@ void IMTQHandler::fillCalibratedMtmDataset(const uint8_t* packet) {
|
||||
void IMTQHandler::fillRawMtmDataset(const uint8_t* packet) {
|
||||
PoolReadGuard rg(&rawMtmMeasurementSet);
|
||||
int8_t offset = 2;
|
||||
rawMtmMeasurementSet.mtmXnT = (*(packet + offset + 3) << 24 | *(packet + offset + 2) << 16 |
|
||||
rawMtmMeasurementSet.mtmRawNt[0] = (*(packet + offset + 3) << 24 | *(packet + offset + 2) << 16 |
|
||||
*(packet + offset + 1) << 8 | *(packet + offset)) *
|
||||
7.5;
|
||||
offset += 4;
|
||||
rawMtmMeasurementSet.mtmYnT = (*(packet + offset + 3) << 24 | *(packet + offset + 2) << 16 |
|
||||
rawMtmMeasurementSet.mtmRawNt[1] = (*(packet + offset + 3) << 24 | *(packet + offset + 2) << 16 |
|
||||
*(packet + offset + 1) << 8 | *(packet + offset)) *
|
||||
7.5;
|
||||
offset += 4;
|
||||
rawMtmMeasurementSet.mtmZnT = (*(packet + offset + 3) << 24 | *(packet + offset + 2) << 16 |
|
||||
rawMtmMeasurementSet.mtmRawNt[2] = (*(packet + offset + 3) << 24 | *(packet + offset + 2) << 16 |
|
||||
*(packet + offset + 1) << 8 | *(packet + offset)) *
|
||||
7.5;
|
||||
offset += 4;
|
||||
rawMtmMeasurementSet.coilActuationStatus = (*(packet + offset + 3) << 24) |
|
||||
(*(packet + offset + 2) << 16) |
|
||||
(*(packet + offset + 1) << 8) | (*(packet + offset));
|
||||
rawMtmMeasurementSet.setValidity(true, true);
|
||||
if (debugMode) {
|
||||
#if OBSW_VERBOSE_LEVEL >= 1
|
||||
sif::info << "IMTQ raw MTM measurement X: " << rawMtmMeasurementSet.mtmXnT << " nT"
|
||||
sif::info << "IMTQ raw MTM measurement X: " << rawMtmMeasurementSet.mtmRawNt[0] << " nT"
|
||||
<< std::endl;
|
||||
sif::info << "IMTQ raw MTM measurement Y: " << rawMtmMeasurementSet.mtmYnT << " nT"
|
||||
sif::info << "IMTQ raw MTM measurement Y: " << rawMtmMeasurementSet.mtmRawNt[1] << " nT"
|
||||
<< std::endl;
|
||||
sif::info << "IMTQ raw MTM measurement Z: " << rawMtmMeasurementSet.mtmZnT << " nT"
|
||||
sif::info << "IMTQ raw MTM measurement Z: " << rawMtmMeasurementSet.mtmRawNt[2] << " nT"
|
||||
<< std::endl;
|
||||
sif::info << "IMTQ coil actuation status during MTM measurement: "
|
||||
<< (unsigned int)rawMtmMeasurementSet.coilActuationStatus.value << std::endl;
|
||||
|
@ -117,9 +117,7 @@ enum IMTQPoolIds : lp_id_t {
|
||||
MCU_TEMPERATURE,
|
||||
MGM_CAL_NT,
|
||||
ACTUATION_CAL_STATUS,
|
||||
MTM_RAW_X,
|
||||
MTM_RAW_Y,
|
||||
MTM_RAW_Z,
|
||||
MTM_RAW,
|
||||
ACTUATION_RAW_STATUS,
|
||||
|
||||
INIT_POS_X_ERR,
|
||||
@ -422,9 +420,7 @@ class RawMtmMeasurementSet : public StaticLocalDataSet<CAL_MTM_POOL_ENTRIES> {
|
||||
RawMtmMeasurementSet(object_id_t objectId) : StaticLocalDataSet(sid_t(objectId, RAW_MTM_SET)) {}
|
||||
|
||||
/** The unit of all measurements is nT */
|
||||
lp_var_t<float> mtmXnT = lp_var_t<float>(sid.objectId, MTM_RAW_X, this);
|
||||
lp_var_t<float> mtmYnT = lp_var_t<float>(sid.objectId, MTM_RAW_Y, this);
|
||||
lp_var_t<float> mtmZnT = lp_var_t<float>(sid.objectId, MTM_RAW_Z, this);
|
||||
lp_vec_t<float, 3> mtmRawNt = lp_vec_t<float, 3>(sid.objectId, MTM_RAW, this);
|
||||
/** 1 if coils were actuating during measurement otherwise 0 */
|
||||
lp_var_t<uint8_t> coilActuationStatus =
|
||||
lp_var_t<uint8_t>(sid.objectId, ACTUATION_RAW_STATUS, this);
|
||||
|
2
tmtc
2
tmtc
@ -1 +1 @@
|
||||
Subproject commit 1f5baabf312eb7edc5b0449d443dd5f73054dfa2
|
||||
Subproject commit 7a309b4dc1cfb02626bb0b4b3d4e4d06f8192506
|
Loading…
Reference in New Issue
Block a user