ACS IMTQ Update #284

Merged
muellerr merged 8 commits from mueller/acs-imtq-update into develop 2022-08-24 16:56:52 +02:00
3 changed files with 33 additions and 18 deletions
Showing only changes of commit 726e448af9 - Show all commits

View File

@ -48,7 +48,7 @@ class AcsController : public ExtendedControllerBase {
PoolEntry<float> mgm1PoolVec = PoolEntry<float>(3);
PoolEntry<float> mgm2PoolVec = PoolEntry<float>(3);
PoolEntry<float> mgm3PoolVec = PoolEntry<float>(3);
PoolEntry<int32_t> imtqMgmPoolVec = PoolEntry<int32_t>(3);
PoolEntry<float> imtqMgmPoolVec = PoolEntry<float>(3);
PoolEntry<uint8_t> imtqCalActStatus = PoolEntry<uint8_t>();
void copyMgmData();

View File

@ -778,22 +778,37 @@ void IMTQHandler::fillCalibratedMtmDataset(const uint8_t* packet) {
void IMTQHandler::fillRawMtmDataset(const uint8_t* packet) {
PoolReadGuard rg(&rawMtmMeasurementSet);
int8_t offset = 2;
rawMtmMeasurementSet.mtmRawNt[0] = (*(packet + offset + 3) << 24 | *(packet + offset + 2) << 16 |
*(packet + offset + 1) << 8 | *(packet + offset)) *
7.5;
offset += 4;
rawMtmMeasurementSet.mtmRawNt[1] = (*(packet + offset + 3) << 24 | *(packet + offset + 2) << 16 |
*(packet + offset + 1) << 8 | *(packet + offset)) *
7.5;
offset += 4;
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));
unsigned int offset = 2;
size_t deSerLen = 16;
const uint8_t* dataStart = packet + offset;
int32_t xRaw = 0;
int32_t yRaw = 0;
int32_t zRaw = 0;
uint32_t coilActStatus = 0;
auto res = SerializeAdapter::deSerialize(&xRaw, &dataStart, &deSerLen,
SerializeIF::Endianness::LITTLE);
if(res != HasReturnvaluesIF::RETURN_OK) {
return;
}
res = SerializeAdapter::deSerialize(&yRaw, &dataStart, &deSerLen,
SerializeIF::Endianness::LITTLE);
if(res != HasReturnvaluesIF::RETURN_OK) {
return;
}
res = SerializeAdapter::deSerialize(&zRaw, &dataStart, &deSerLen,
SerializeIF::Endianness::LITTLE);
if(res != HasReturnvaluesIF::RETURN_OK) {
return;
}
res = SerializeAdapter::deSerialize(&coilActStatus, &dataStart, &deSerLen,
SerializeIF::Endianness::LITTLE);
if(res != HasReturnvaluesIF::RETURN_OK) {
return;
}
rawMtmMeasurementSet.mtmRawNt[0] = xRaw * 7.5;
rawMtmMeasurementSet.mtmRawNt[1] = yRaw * 7.5;
rawMtmMeasurementSet.mtmRawNt[2] = zRaw * 7.5;
rawMtmMeasurementSet.coilActuationStatus = static_cast<uint8_t>(coilActStatus);
rawMtmMeasurementSet.setValidity(true, true);
if (debugMode) {
#if OBSW_VERBOSE_LEVEL >= 1

2
tmtc

@ -1 +1 @@
Subproject commit 7a309b4dc1cfb02626bb0b4b3d4e4d06f8192506
Subproject commit 7e2ea08277148873cfa541a872b5cc52bf06ee5e