IMTQ positive x dipole test
This commit is contained in:
parent
46d49e130b
commit
ab8b3ae116
@ -31,6 +31,7 @@ ServiceInterfaceStream sif::error("ERROR", true, false, true);
|
||||
ObjectManagerIF *objectManager = nullptr;
|
||||
|
||||
void initmission::initMission() {
|
||||
|
||||
sif::info << "Building global objects.." << std::endl;
|
||||
/* Instantiate global object manager and also create all objects */
|
||||
ObjectManager::instance()->setObjectFactoryFunction(ObjectFactory::produce, nullptr);
|
||||
|
2
fsfw
2
fsfw
@ -1 +1 @@
|
||||
Subproject commit 4b095eea8991d3e9a48fa8945c86339cfdad26d5
|
||||
Subproject commit 1630682548a8775bd0c293b3c76c29e120de5bf0
|
@ -3,6 +3,7 @@
|
||||
|
||||
#include <fsfw/globalfunctions/CRC.h>
|
||||
#include <fsfw/datapool/PoolReadGuard.h>
|
||||
#include <math.h>
|
||||
|
||||
|
||||
IMTQHandler::IMTQHandler(object_id_t objectId, object_id_t comIF, CookieIF * comCookie) :
|
||||
@ -255,6 +256,25 @@ void IMTQHandler::setNormalDatapoolEntriesInvalid(){
|
||||
|
||||
}
|
||||
|
||||
LocalPoolDataSetBase* IMTQHandler::getDataSetHandle(sid_t sid) {
|
||||
if (sid == engHkDataset.getSid()) {
|
||||
return &engHkDataset;
|
||||
}
|
||||
else if (sid== calMtmMeasurementSet.getSid()) {
|
||||
return &calMtmMeasurementSet;
|
||||
}
|
||||
else if (sid== rawMtmMeasurementSet.getSid()) {
|
||||
return &rawMtmMeasurementSet;
|
||||
}
|
||||
else if (sid== posXselfTestDataset.getSid()) {
|
||||
return &posXselfTestDataset;
|
||||
}
|
||||
else {
|
||||
sif::error << "IMTQHandler::getDataSetHandle: Invalid sid" << std::endl;
|
||||
return nullptr;
|
||||
}
|
||||
}
|
||||
|
||||
uint32_t IMTQHandler::getTransitionDelayMs(Mode_t modeFrom, Mode_t modeTo){
|
||||
return 5000;
|
||||
}
|
||||
@ -289,43 +309,43 @@ ReturnValue_t IMTQHandler::initializeLocalDataPool(localpool::DataPool& localDat
|
||||
|
||||
/** Entries of dataset for self test results of positive X axis test */
|
||||
localDataPoolMap.emplace(IMTQ::INIT_POS_X_ERR, new PoolEntry<uint8_t>( { 0 }));
|
||||
localDataPoolMap.emplace(IMTQ::INIT_POS_X_RAW_MAG_X, new PoolEntry<uint32_t>( { 0 }));
|
||||
localDataPoolMap.emplace(IMTQ::INIT_POS_X_RAW_MAG_Y, new PoolEntry<uint32_t>( { 0 }));
|
||||
localDataPoolMap.emplace(IMTQ::INIT_POS_X_RAW_MAG_Z, new PoolEntry<uint32_t>( { 0 }));
|
||||
localDataPoolMap.emplace(IMTQ::INIT_POS_X_CAL_MAG_X, new PoolEntry<uint32_t>( { 0 }));
|
||||
localDataPoolMap.emplace(IMTQ::INIT_POS_X_CAL_MAG_Y, new PoolEntry<uint32_t>( { 0 }));
|
||||
localDataPoolMap.emplace(IMTQ::INIT_POS_X_CAL_MAG_Z, new PoolEntry<uint32_t>( { 0 }));
|
||||
localDataPoolMap.emplace(IMTQ::INIT_POS_X_COIL_X_CURRENT, new PoolEntry<uint16_t>( { 0 }));
|
||||
localDataPoolMap.emplace(IMTQ::INIT_POS_X_COIL_Y_CURRENT, new PoolEntry<uint16_t>( { 0 }));
|
||||
localDataPoolMap.emplace(IMTQ::INIT_POS_X_COIL_Z_CURRENT, new PoolEntry<uint16_t>( { 0 }));
|
||||
localDataPoolMap.emplace(IMTQ::INIT_POS_X_RAW_MAG_X, new PoolEntry<float>( { 0 }));
|
||||
localDataPoolMap.emplace(IMTQ::INIT_POS_X_RAW_MAG_Y, new PoolEntry<float>( { 0 }));
|
||||
localDataPoolMap.emplace(IMTQ::INIT_POS_X_RAW_MAG_Z, new PoolEntry<float>( { 0 }));
|
||||
localDataPoolMap.emplace(IMTQ::INIT_POS_X_CAL_MAG_X, new PoolEntry<float>( { 0 }));
|
||||
localDataPoolMap.emplace(IMTQ::INIT_POS_X_CAL_MAG_Y, new PoolEntry<float>( { 0 }));
|
||||
localDataPoolMap.emplace(IMTQ::INIT_POS_X_CAL_MAG_Z, new PoolEntry<float>( { 0 }));
|
||||
localDataPoolMap.emplace(IMTQ::INIT_POS_X_COIL_X_CURRENT, new PoolEntry<float>( { 0 }));
|
||||
localDataPoolMap.emplace(IMTQ::INIT_POS_X_COIL_Y_CURRENT, new PoolEntry<float>( { 0 }));
|
||||
localDataPoolMap.emplace(IMTQ::INIT_POS_X_COIL_Z_CURRENT, new PoolEntry<float>( { 0 }));
|
||||
localDataPoolMap.emplace(IMTQ::INIT_POS_X_COIL_X_TEMPERATURE, new PoolEntry<uint16_t>( { 0 }));
|
||||
localDataPoolMap.emplace(IMTQ::INIT_POS_X_COIL_Y_TEMPERATURE, new PoolEntry<uint16_t>( { 0 }));
|
||||
localDataPoolMap.emplace(IMTQ::INIT_POS_X_COIL_Z_TEMPERATURE, new PoolEntry<uint16_t>( { 0 }));
|
||||
|
||||
localDataPoolMap.emplace(IMTQ::POS_X_ERR, new PoolEntry<uint8_t>( { 0 }));
|
||||
localDataPoolMap.emplace(IMTQ::POS_X_RAW_MAG_X, new PoolEntry<uint32_t>( { 0 }));
|
||||
localDataPoolMap.emplace(IMTQ::POS_X_RAW_MAG_Y, new PoolEntry<uint32_t>( { 0 }));
|
||||
localDataPoolMap.emplace(IMTQ::POS_X_RAW_MAG_Z, new PoolEntry<uint32_t>( { 0 }));
|
||||
localDataPoolMap.emplace(IMTQ::POS_X_CAL_MAG_X, new PoolEntry<uint32_t>( { 0 }));
|
||||
localDataPoolMap.emplace(IMTQ::POS_X_CAL_MAG_Y, new PoolEntry<uint32_t>( { 0 }));
|
||||
localDataPoolMap.emplace(IMTQ::POS_X_CAL_MAG_Z, new PoolEntry<uint32_t>( { 0 }));
|
||||
localDataPoolMap.emplace(IMTQ::POS_X_COIL_X_CURRENT, new PoolEntry<uint16_t>( { 0 }));
|
||||
localDataPoolMap.emplace(IMTQ::POS_X_COIL_Y_CURRENT, new PoolEntry<uint16_t>( { 0 }));
|
||||
localDataPoolMap.emplace(IMTQ::POS_X_COIL_Z_CURRENT, new PoolEntry<uint16_t>( { 0 }));
|
||||
localDataPoolMap.emplace(IMTQ::POS_X_RAW_MAG_X, new PoolEntry<float>( { 0 }));
|
||||
localDataPoolMap.emplace(IMTQ::POS_X_RAW_MAG_Y, new PoolEntry<float>( { 0 }));
|
||||
localDataPoolMap.emplace(IMTQ::POS_X_RAW_MAG_Z, new PoolEntry<float>( { 0 }));
|
||||
localDataPoolMap.emplace(IMTQ::POS_X_CAL_MAG_X, new PoolEntry<float>( { 0 }));
|
||||
localDataPoolMap.emplace(IMTQ::POS_X_CAL_MAG_Y, new PoolEntry<float>( { 0 }));
|
||||
localDataPoolMap.emplace(IMTQ::POS_X_CAL_MAG_Z, new PoolEntry<float>( { 0 }));
|
||||
localDataPoolMap.emplace(IMTQ::POS_X_COIL_X_CURRENT, new PoolEntry<float>( { 0 }));
|
||||
localDataPoolMap.emplace(IMTQ::POS_X_COIL_Y_CURRENT, new PoolEntry<float>( { 0 }));
|
||||
localDataPoolMap.emplace(IMTQ::POS_X_COIL_Z_CURRENT, new PoolEntry<float>( { 0 }));
|
||||
localDataPoolMap.emplace(IMTQ::POS_X_COIL_X_TEMPERATURE, new PoolEntry<uint16_t>( { 0 }));
|
||||
localDataPoolMap.emplace(IMTQ::POS_X_COIL_Y_TEMPERATURE, new PoolEntry<uint16_t>( { 0 }));
|
||||
localDataPoolMap.emplace(IMTQ::POS_X_COIL_Z_TEMPERATURE, new PoolEntry<uint16_t>( { 0 }));
|
||||
|
||||
localDataPoolMap.emplace(IMTQ::INIT_POS_X_ERR, new PoolEntry<uint8_t>( { 0 }));
|
||||
localDataPoolMap.emplace(IMTQ::FINA_POS_X_RAW_MAG_X, new PoolEntry<uint32_t>( { 0 }));
|
||||
localDataPoolMap.emplace(IMTQ::FINA_POS_X_RAW_MAG_Y, new PoolEntry<uint32_t>( { 0 }));
|
||||
localDataPoolMap.emplace(IMTQ::FINA_POS_X_RAW_MAG_Z, new PoolEntry<uint32_t>( { 0 }));
|
||||
localDataPoolMap.emplace(IMTQ::FINA_POS_X_CAL_MAG_X, new PoolEntry<uint32_t>( { 0 }));
|
||||
localDataPoolMap.emplace(IMTQ::FINA_POS_X_CAL_MAG_Y, new PoolEntry<uint32_t>( { 0 }));
|
||||
localDataPoolMap.emplace(IMTQ::FINA_POS_X_CAL_MAG_Z, new PoolEntry<uint32_t>( { 0 }));
|
||||
localDataPoolMap.emplace(IMTQ::FINA_POS_X_COIL_X_CURRENT, new PoolEntry<uint16_t>( { 0 }));
|
||||
localDataPoolMap.emplace(IMTQ::FINA_POS_X_COIL_Y_CURRENT, new PoolEntry<uint16_t>( { 0 }));
|
||||
localDataPoolMap.emplace(IMTQ::FINA_POS_X_COIL_Z_CURRENT, new PoolEntry<uint16_t>( { 0 }));
|
||||
localDataPoolMap.emplace(IMTQ::FINA_POS_X_ERR, new PoolEntry<uint8_t>( { 0 }));
|
||||
localDataPoolMap.emplace(IMTQ::FINA_POS_X_RAW_MAG_X, new PoolEntry<float>( { 0 }));
|
||||
localDataPoolMap.emplace(IMTQ::FINA_POS_X_RAW_MAG_Y, new PoolEntry<float>( { 0 }));
|
||||
localDataPoolMap.emplace(IMTQ::FINA_POS_X_RAW_MAG_Z, new PoolEntry<float>( { 0 }));
|
||||
localDataPoolMap.emplace(IMTQ::FINA_POS_X_CAL_MAG_X, new PoolEntry<float>( { 0 }));
|
||||
localDataPoolMap.emplace(IMTQ::FINA_POS_X_CAL_MAG_Y, new PoolEntry<float>( { 0 }));
|
||||
localDataPoolMap.emplace(IMTQ::FINA_POS_X_CAL_MAG_Z, new PoolEntry<float>( { 0 }));
|
||||
localDataPoolMap.emplace(IMTQ::FINA_POS_X_COIL_X_CURRENT, new PoolEntry<float>( { 0 }));
|
||||
localDataPoolMap.emplace(IMTQ::FINA_POS_X_COIL_Y_CURRENT, new PoolEntry<float>( { 0 }));
|
||||
localDataPoolMap.emplace(IMTQ::FINA_POS_X_COIL_Z_CURRENT, new PoolEntry<float>( { 0 }));
|
||||
localDataPoolMap.emplace(IMTQ::FINA_POS_X_COIL_X_TEMPERATURE, new PoolEntry<uint16_t>( { 0 }));
|
||||
localDataPoolMap.emplace(IMTQ::FINA_POS_X_COIL_Y_TEMPERATURE, new PoolEntry<uint16_t>( { 0 }));
|
||||
localDataPoolMap.emplace(IMTQ::FINA_POS_X_COIL_Z_TEMPERATURE, new PoolEntry<uint16_t>( { 0 }));
|
||||
@ -611,14 +631,14 @@ void IMTQHandler::handlePositiveXSelfTestReply(const uint8_t* packet) {
|
||||
/** Init measurements */
|
||||
posXselfTestDataset.initErr = *(packet + offset);
|
||||
offset += 2; // STEP byte will not be stored
|
||||
posXselfTestDataset.initRawMagX = *(packet + offset + 3) << 24 | *(packet + offset + 2) << 16
|
||||
| *(packet + offset + 1) << 8 | *(packet + offset);
|
||||
posXselfTestDataset.initRawMagX = (*(packet + offset + 3) << 24 | *(packet + offset + 2) << 16
|
||||
| *(packet + offset + 1) << 8 | *(packet + offset)) * 7.5;
|
||||
offset += 4;
|
||||
posXselfTestDataset.initRawMagY = *(packet + offset + 3) << 24 | *(packet + offset + 2) << 16
|
||||
| *(packet + offset + 1) << 8 | *(packet + offset);
|
||||
posXselfTestDataset.initRawMagY = (*(packet + offset + 3) << 24 | *(packet + offset + 2) << 16
|
||||
| *(packet + offset + 1) << 8 | *(packet + offset)) * 7.5;
|
||||
offset += 4;
|
||||
posXselfTestDataset.initRawMagZ = *(packet + offset + 3) << 24 | *(packet + offset + 2) << 16
|
||||
| *(packet + offset + 1) << 8 | *(packet + offset);
|
||||
posXselfTestDataset.initRawMagZ = (*(packet + offset + 3) << 24 | *(packet + offset + 2) << 16
|
||||
| *(packet + offset + 1) << 8 | *(packet + offset)) * 7.5;
|
||||
offset += 4;
|
||||
posXselfTestDataset.initCalMagX = *(packet + offset + 3) << 24 | *(packet + offset + 2) << 16
|
||||
| *(packet + offset + 1) << 8 | *(packet + offset);
|
||||
@ -629,11 +649,14 @@ void IMTQHandler::handlePositiveXSelfTestReply(const uint8_t* packet) {
|
||||
posXselfTestDataset.initCalMagZ = *(packet + offset + 3) << 24 | *(packet + offset + 2) << 16
|
||||
| *(packet + offset + 1) << 8 | *(packet + offset);
|
||||
offset += 4;
|
||||
posXselfTestDataset.initCoilXCurrent = *(packet + offset + 1) << 8 | *(packet + offset);
|
||||
posXselfTestDataset.initCoilXCurrent = (*(packet + offset + 1) << 8 | *(packet + offset))
|
||||
* 0.1;
|
||||
offset += 2;
|
||||
posXselfTestDataset.initCoilYCurrent = *(packet + offset + 1) << 8 | *(packet + offset);
|
||||
posXselfTestDataset.initCoilYCurrent = (*(packet + offset + 1) << 8 | *(packet + offset))
|
||||
* 0.1;
|
||||
offset += 2;
|
||||
posXselfTestDataset.initCoilZCurrent = *(packet + offset + 1) << 8 | *(packet + offset);
|
||||
posXselfTestDataset.initCoilZCurrent = (*(packet + offset + 1) << 8 | *(packet + offset))
|
||||
* 0.1;
|
||||
offset += 2;
|
||||
posXselfTestDataset.initCoilXTemperature = *(packet + offset + 1) << 8 | *(packet + offset);
|
||||
offset += 2;
|
||||
@ -646,14 +669,14 @@ void IMTQHandler::handlePositiveXSelfTestReply(const uint8_t* packet) {
|
||||
checkErrorByte(*(packet + offset), *(packet + offset + 1));
|
||||
posXselfTestDataset.err = *(packet + offset);
|
||||
offset += 2; // STEP byte will not be stored
|
||||
posXselfTestDataset.rawMagX = *(packet + offset + 3) << 24 | *(packet + offset + 2) << 16
|
||||
| *(packet + offset + 1) << 8 | *(packet + offset);
|
||||
posXselfTestDataset.rawMagX = (*(packet + offset + 3) << 24 | *(packet + offset + 2) << 16
|
||||
| *(packet + offset + 1) << 8 | *(packet + offset)) * 7.5;
|
||||
offset += 4;
|
||||
posXselfTestDataset.rawMagY = *(packet + offset + 3) << 24 | *(packet + offset + 2) << 16
|
||||
| *(packet + offset + 1) << 8 | *(packet + offset);
|
||||
posXselfTestDataset.rawMagY = (*(packet + offset + 3) << 24 | *(packet + offset + 2) << 16
|
||||
| *(packet + offset + 1) << 8 | *(packet + offset)) * 7.5;
|
||||
offset += 4;
|
||||
posXselfTestDataset.rawMagZ = *(packet + offset + 3) << 24 | *(packet + offset + 2) << 16
|
||||
| *(packet + offset + 1) << 8 | *(packet + offset);
|
||||
posXselfTestDataset.rawMagZ = (*(packet + offset + 3) << 24 | *(packet + offset + 2) << 16
|
||||
| *(packet + offset + 1) << 8 | *(packet + offset)) * 7.5;
|
||||
offset += 4;
|
||||
posXselfTestDataset.calMagX = *(packet + offset + 3) << 24 | *(packet + offset + 2) << 16
|
||||
| *(packet + offset + 1) << 8 | *(packet + offset);
|
||||
@ -664,11 +687,14 @@ void IMTQHandler::handlePositiveXSelfTestReply(const uint8_t* packet) {
|
||||
posXselfTestDataset.calMagZ = *(packet + offset + 3) << 24 | *(packet + offset + 2) << 16
|
||||
| *(packet + offset + 1) << 8 | *(packet + offset);
|
||||
offset += 4;
|
||||
posXselfTestDataset.coilXCurrent = *(packet + offset + 1) << 8 | *(packet + offset);
|
||||
posXselfTestDataset.coilXCurrent = (*(packet + offset + 1) << 8 | *(packet + offset))
|
||||
* 0.1;
|
||||
offset += 2;
|
||||
posXselfTestDataset.coilYCurrent = *(packet + offset + 1) << 8 | *(packet + offset);
|
||||
posXselfTestDataset.coilYCurrent = (*(packet + offset + 1) << 8 | *(packet + offset))
|
||||
* 0.1;
|
||||
offset += 2;
|
||||
posXselfTestDataset.coilZCurrent = *(packet + offset + 1) << 8 | *(packet + offset);
|
||||
posXselfTestDataset.coilZCurrent = (*(packet + offset + 1) << 8 | *(packet + offset))
|
||||
* 0.1;
|
||||
offset += 2;
|
||||
posXselfTestDataset.coilXTemperature = *(packet + offset + 1) << 8 | *(packet + offset);
|
||||
offset += 2;
|
||||
@ -681,14 +707,14 @@ void IMTQHandler::handlePositiveXSelfTestReply(const uint8_t* packet) {
|
||||
checkErrorByte(*(packet + offset), *(packet + offset + 1));
|
||||
posXselfTestDataset.finaErr = *(packet + offset);
|
||||
offset += 2; // STEP byte will not be stored
|
||||
posXselfTestDataset.finaRawMagX = *(packet + offset + 3) << 24 | *(packet + offset + 2) << 16
|
||||
| *(packet + offset + 1) << 8 | *(packet + offset);
|
||||
posXselfTestDataset.finaRawMagX = (*(packet + offset + 3) << 24 | *(packet + offset + 2) << 16
|
||||
| *(packet + offset + 1) << 8 | *(packet + offset)) * 7.5;
|
||||
offset += 4;
|
||||
posXselfTestDataset.finaRawMagY = *(packet + offset + 3) << 24 | *(packet + offset + 2) << 16
|
||||
| *(packet + offset + 1) << 8 | *(packet + offset);
|
||||
posXselfTestDataset.finaRawMagY = (*(packet + offset + 3) << 24 | *(packet + offset + 2) << 16
|
||||
| *(packet + offset + 1) << 8 | *(packet + offset)) * 7.5;
|
||||
offset += 4;
|
||||
posXselfTestDataset.finaRawMagZ = *(packet + offset + 3) << 24 | *(packet + offset + 2) << 16
|
||||
| *(packet + offset + 1) << 8 | *(packet + offset);
|
||||
posXselfTestDataset.finaRawMagZ = (*(packet + offset + 3) << 24 | *(packet + offset + 2) << 16
|
||||
| *(packet + offset + 1) << 8 | *(packet + offset)) * 7.5;
|
||||
offset += 4;
|
||||
posXselfTestDataset.finaCalMagX = *(packet + offset + 3) << 24 | *(packet + offset + 2) << 16
|
||||
| *(packet + offset + 1) << 8 | *(packet + offset);
|
||||
@ -699,11 +725,14 @@ void IMTQHandler::handlePositiveXSelfTestReply(const uint8_t* packet) {
|
||||
posXselfTestDataset.finaCalMagZ = *(packet + offset + 3) << 24 | *(packet + offset + 2) << 16
|
||||
| *(packet + offset + 1) << 8 | *(packet + offset);
|
||||
offset += 4;
|
||||
posXselfTestDataset.finaCoilXCurrent = *(packet + offset + 1) << 8 | *(packet + offset);
|
||||
posXselfTestDataset.finaCoilXCurrent = (*(packet + offset + 1) << 8 | *(packet + offset))
|
||||
* 0.1;
|
||||
offset += 2;
|
||||
posXselfTestDataset.finaCoilYCurrent = *(packet + offset + 1) << 8 | *(packet + offset);
|
||||
posXselfTestDataset.finaCoilYCurrent = (*(packet + offset + 1) << 8 | *(packet + offset))
|
||||
* 0.1;
|
||||
offset += 2;
|
||||
posXselfTestDataset.finaCoilZCurrent = *(packet + offset + 1) << 8 | *(packet + offset);
|
||||
posXselfTestDataset.finaCoilZCurrent = (*(packet + offset + 1) << 8 | *(packet + offset))
|
||||
* 0.1;
|
||||
offset += 2;
|
||||
posXselfTestDataset.finaCoilXTemperature = *(packet + offset + 1) << 8 | *(packet + offset);
|
||||
offset += 2;
|
||||
@ -716,23 +745,23 @@ void IMTQHandler::handlePositiveXSelfTestReply(const uint8_t* packet) {
|
||||
sif::info << "IMTQ self test (INIT) err: "
|
||||
<< static_cast<unsigned int>(posXselfTestDataset.initErr.value) << std::endl;
|
||||
sif::info << "IMTQ self test (INIT) raw magnetic field X: " << posXselfTestDataset.initRawMagX
|
||||
<< " 7.5 * 10^-9 T" << std::endl;
|
||||
<< " nT" << std::endl;
|
||||
sif::info << "IMTQ self test (INIT) raw magnetic field Y: " << posXselfTestDataset.initRawMagY
|
||||
<< " 7.5 * 10^-9 T" << std::endl;
|
||||
<< " nT" << std::endl;
|
||||
sif::info << "IMTQ self test (INIT) raw magnetic field Z: " << posXselfTestDataset.initRawMagZ
|
||||
<< " 7.5 * 10^-9 T" << std::endl;
|
||||
<< " nT" << std::endl;
|
||||
sif::info << "IMTQ self test (INIT) calibrated magnetic field X: " << posXselfTestDataset.initCalMagX
|
||||
<< " 10^-9 T" << std::endl;
|
||||
<< " nT" << std::endl;
|
||||
sif::info << "IMTQ self test (INIT) calibrated magnetic field Y: " << posXselfTestDataset.initCalMagY
|
||||
<< " 10^-9 T" << std::endl;
|
||||
<< " nT" << std::endl;
|
||||
sif::info << "IMTQ self test (INIT) calibrated magnetic field Z: " << posXselfTestDataset.initCalMagZ
|
||||
<< " 10^-9 T" << std::endl;
|
||||
<< " nT" << std::endl;
|
||||
sif::info << "IMTQ self test (INIT) coil X current: " << posXselfTestDataset.initCoilXCurrent
|
||||
<< " * 10^-4 A" << std::endl;
|
||||
<< " mA" << std::endl;
|
||||
sif::info << "IMTQ self test (INIT) coil Y current: " << posXselfTestDataset.initCoilYCurrent
|
||||
<< " * 10^-4 A" << std::endl;
|
||||
<< " mA" << std::endl;
|
||||
sif::info << "IMTQ self test (INIT) coil Z current: " << posXselfTestDataset.initCoilZCurrent
|
||||
<< " * 10^-4 A" << std::endl;
|
||||
<< " mA" << std::endl;
|
||||
sif::info << "IMTQ self test (INIT) coil X temperature: "
|
||||
<< posXselfTestDataset.initCoilXTemperature << " °C" << std::endl;
|
||||
sif::info << "IMTQ self test (INIT) coil Y temperature: "
|
||||
@ -743,23 +772,23 @@ void IMTQHandler::handlePositiveXSelfTestReply(const uint8_t* packet) {
|
||||
sif::info << "IMTQ self test (+X) err: " <<
|
||||
static_cast<unsigned int>(posXselfTestDataset.err.value) << std::endl;
|
||||
sif::info << "IMTQ self test (+X) raw magnetic field X: " << posXselfTestDataset.rawMagX
|
||||
<< " 7.5 * 10^-9 T" << std::endl;
|
||||
<< " nT" << std::endl;
|
||||
sif::info << "IMTQ self test (+X) raw magnetic field Y: " << posXselfTestDataset.rawMagY
|
||||
<< " 7.5 * 10^-9 T" << std::endl;
|
||||
<< " nT" << std::endl;
|
||||
sif::info << "IMTQ self test (+X) raw magnetic field Z: " << posXselfTestDataset.rawMagZ
|
||||
<< " 7.5 * 10^-9 T" << std::endl;
|
||||
<< " nT" << std::endl;
|
||||
sif::info << "IMTQ self test (+X) calibrated magnetic field X: " << posXselfTestDataset.calMagX
|
||||
<< " 10^-9 T" << std::endl;
|
||||
<< " nT" << std::endl;
|
||||
sif::info << "IMTQ self test (+X) calibrated magnetic field Y: " << posXselfTestDataset.calMagY
|
||||
<< " 10^-9 T" << std::endl;
|
||||
<< " nT" << std::endl;
|
||||
sif::info << "IMTQ self test (+X) calibrated magnetic field Z: " << posXselfTestDataset.calMagZ
|
||||
<< " 10^-9 T" << std::endl;
|
||||
<< " nT" << std::endl;
|
||||
sif::info << "IMTQ self test (+X) coil X current: " << posXselfTestDataset.coilXCurrent
|
||||
<< " * 10^-4 A" << std::endl;
|
||||
<< " mA" << std::endl;
|
||||
sif::info << "IMTQ self test (+X) coil Y current: " << posXselfTestDataset.coilYCurrent
|
||||
<< " * 10^-4 A" << std::endl;
|
||||
<< " mA" << std::endl;
|
||||
sif::info << "IMTQ self test (+X) coil Z current: " << posXselfTestDataset.coilZCurrent
|
||||
<< " * 10^-4 A" << std::endl;
|
||||
<< " mA" << std::endl;
|
||||
sif::info << "IMTQ self test (+X) coil X temperature: "
|
||||
<< posXselfTestDataset.coilXTemperature << " °C" << std::endl;
|
||||
sif::info << "IMTQ self test (+X) coil Y temperature: "
|
||||
@ -770,23 +799,23 @@ void IMTQHandler::handlePositiveXSelfTestReply(const uint8_t* packet) {
|
||||
sif::info << "IMTQ self test (FINA) err: "
|
||||
<< static_cast<unsigned int>(posXselfTestDataset.finaErr.value) << std::endl;
|
||||
sif::info << "IMTQ self test (FINA) raw magnetic field X: " << posXselfTestDataset.finaRawMagX
|
||||
<< " 7.5 * 10^-9 T" << std::endl;
|
||||
<< " nT" << std::endl;
|
||||
sif::info << "IMTQ self test (FINA) raw magnetic field Y: " << posXselfTestDataset.finaRawMagY
|
||||
<< " 7.5 * 10^-9 T" << std::endl;
|
||||
<< " nT" << std::endl;
|
||||
sif::info << "IMTQ self test (FINA) raw magnetic field Z: " << posXselfTestDataset.finaRawMagZ
|
||||
<< " 7.5 * 10^-9 T" << std::endl;
|
||||
<< " nT" << std::endl;
|
||||
sif::info << "IMTQ self test (FINA) calibrated magnetic field X: " << posXselfTestDataset.finaCalMagX
|
||||
<< " 10^-9 T" << std::endl;
|
||||
<< " nT" << std::endl;
|
||||
sif::info << "IMTQ self test (FINA) calibrated magnetic field Y: " << posXselfTestDataset.finaCalMagY
|
||||
<< " 10^-9 T" << std::endl;
|
||||
<< " nT" << std::endl;
|
||||
sif::info << "IMTQ self test (FINA) calibrated magnetic field Z: " << posXselfTestDataset.finaCalMagZ
|
||||
<< " 10^-9 T" << std::endl;
|
||||
<< " nT" << std::endl;
|
||||
sif::info << "IMTQ self test (FINA) coil X current: " << posXselfTestDataset.finaCoilXCurrent
|
||||
<< " * 10^-4 A" << std::endl;
|
||||
<< " mA" << std::endl;
|
||||
sif::info << "IMTQ self test (FINA) coil Y current: " << posXselfTestDataset.finaCoilYCurrent
|
||||
<< " * 10^-4 A" << std::endl;
|
||||
<< " mA" << std::endl;
|
||||
sif::info << "IMTQ self test (FINA) coil Z current: " << posXselfTestDataset.finaCoilZCurrent
|
||||
<< " * 10^-4 A" << std::endl;
|
||||
<< " mA" << std::endl;
|
||||
sif::info << "IMTQ self test (FINA) coil X temperature: "
|
||||
<< posXselfTestDataset.finaCoilXTemperature << " °C" << std::endl;
|
||||
sif::info << "IMTQ self test (FINA) coil Y temperature: "
|
||||
|
@ -34,6 +34,7 @@ protected:
|
||||
ReturnValue_t interpretDeviceReply(DeviceCommandId_t id,
|
||||
const uint8_t *packet) override;
|
||||
void setNormalDatapoolEntriesInvalid() override;
|
||||
virtual LocalPoolDataSetBase* getDataSetHandle(sid_t sid) override;
|
||||
uint32_t getTransitionDelayMs(Mode_t modeFrom, Mode_t modeTo) override;
|
||||
ReturnValue_t initializeLocalDataPool(localpool::DataPool& localDataPoolMap,
|
||||
LocalDataPoolManager& poolManager) override;
|
||||
|
@ -1,6 +1,8 @@
|
||||
#ifndef MISSION_DEVICES_DEVICEDEFINITIONS_IMTQDEFINITIONS_H_
|
||||
#define MISSION_DEVICES_DEVICEDEFINITIONS_IMTQDEFINITIONS_H_
|
||||
|
||||
#include <fsfw/datapoollocal/StaticLocalDataSet.h>
|
||||
|
||||
namespace IMTQ {
|
||||
|
||||
static const DeviceCommandId_t NONE = 0x0;
|
||||
@ -16,18 +18,23 @@ namespace IMTQ {
|
||||
static const DeviceCommandId_t POS_X_SELF_TEST = 0x7;
|
||||
static const DeviceCommandId_t NEG_X_SELF_TEST = 0x8;
|
||||
static const DeviceCommandId_t POS_Y_SELF_TEST = 0x9;
|
||||
static const DeviceCommandId_t NEG_Y_SELF_TEST = 0x10;
|
||||
static const DeviceCommandId_t POS_Z_SELF_TEST = 0x11;
|
||||
static const DeviceCommandId_t NEG_Z_SELF_TEST = 0x12;
|
||||
static const DeviceCommandId_t GET_SELF_TEST_RESULT = 0x13;
|
||||
static const DeviceCommandId_t NEG_Y_SELF_TEST = 0xA;
|
||||
static const DeviceCommandId_t POS_Z_SELF_TEST = 0xB;
|
||||
static const DeviceCommandId_t NEG_Z_SELF_TEST = 0xC;
|
||||
static const DeviceCommandId_t GET_SELF_TEST_RESULT = 0xD;
|
||||
|
||||
static const uint8_t GET_TEMP_REPLY_SIZE = 2;
|
||||
static const uint8_t CFGR_CMD_SIZE = 3;
|
||||
static const uint8_t POINTER_REG_SIZE = 1;
|
||||
|
||||
static const uint32_t ENG_HK_DATA_SET_ID = GET_ENG_HK_DATA;
|
||||
static const uint32_t CAL_MTM_SET = GET_CAL_MTM_MEASUREMENT;
|
||||
static const uint32_t SELF_TEST_DATA_SET = GET_SELF_TEST_RESULT;
|
||||
static const uint32_t ENG_HK_DATA_SET_ID = 1;
|
||||
static const uint32_t CAL_MTM_SET = 2;
|
||||
static const uint32_t POS_X_TEST_DATASET = 3;
|
||||
static const uint32_t NEG_X_TEST_DATASET = 4;
|
||||
static const uint32_t POS_Y_TEST_DATASET = 5;
|
||||
static const uint32_t NEG_Y_TEST_DATASET = 6;
|
||||
static const uint32_t POS_Z_TEST_DATASET = 7;
|
||||
static const uint32_t NEG_Z_TEST_DATASET = 8;
|
||||
|
||||
static const uint8_t SIZE_ENG_HK_COMMAND = 1;
|
||||
static const uint8_t SIZE_STATUS_REPLY = 2;
|
||||
@ -35,7 +42,7 @@ namespace IMTQ {
|
||||
static const uint8_t SIZE_GET_COMMANDED_DIPOLE_REPLY = 8;
|
||||
static const uint8_t SIZE_GET_CAL_MTM_MEASUREMENT = 15;
|
||||
static const uint8_t SIZE_GET_RAW_MTM_MEASUREMENT = 15;
|
||||
static const uint16_t SIZE_SELF_TEST_RESULTS = 320;
|
||||
static const uint16_t SIZE_SELF_TEST_RESULTS = 120;
|
||||
|
||||
static const uint16_t MAX_REPLY_SIZE = SIZE_SELF_TEST_RESULTS;
|
||||
static const uint8_t MAX_COMMAND_SIZE = 9;
|
||||
@ -447,9 +454,9 @@ public:
|
||||
* @brief This dataset can be used to store the self test results of the positve X axis test.
|
||||
*
|
||||
* @details Units of measurements:
|
||||
* Currents: [10^-4 A]
|
||||
* Raw MTM data: [7.5 * 10^-9 T]
|
||||
* Calibrated MTM data: [10^-9 T]
|
||||
* Raw magnetic field: [nT]
|
||||
* Calibrated magnetic field: [nT]
|
||||
* Coil currents: [mA]
|
||||
* Temperature: [°C]
|
||||
* The self test generates for each axis the positive and negative dipole and measures
|
||||
* the magnetic field with the built-in MTM. The procedure of the test is as follows:
|
||||
@ -461,26 +468,26 @@ class PosXselfTestSet: public StaticLocalDataSet<SELF_TEST_DATASET_ENTRIES> {
|
||||
public:
|
||||
|
||||
PosXselfTestSet(HasLocalDataPoolIF* owner) :
|
||||
StaticLocalDataSet(owner, SELF_TEST_DATA_SET) {
|
||||
StaticLocalDataSet(owner, POS_X_TEST_DATASET) {
|
||||
}
|
||||
|
||||
PosXselfTestSet(object_id_t objectId) :
|
||||
StaticLocalDataSet(sid_t(objectId, SELF_TEST_DATA_SET)) {
|
||||
StaticLocalDataSet(sid_t(objectId, POS_X_TEST_DATASET)) {
|
||||
}
|
||||
|
||||
/** INIT block */
|
||||
lp_var_t<uint8_t> initErr = lp_var_t<uint8_t>(sid.objectId, INIT_POS_X_ERR, this);
|
||||
lp_var_t<uint32_t> initRawMagX = lp_var_t<uint32_t>(sid.objectId, INIT_POS_X_RAW_MAG_X, this);
|
||||
lp_var_t<uint32_t> initRawMagY = lp_var_t<uint32_t>(sid.objectId, INIT_POS_X_RAW_MAG_Y, this);
|
||||
lp_var_t<uint32_t> initRawMagZ = lp_var_t<uint32_t>(sid.objectId, INIT_POS_X_RAW_MAG_Z, this);
|
||||
lp_var_t<uint32_t> initCalMagX = lp_var_t<uint32_t>(sid.objectId, INIT_POS_X_CAL_MAG_X, this);
|
||||
lp_var_t<uint32_t> initCalMagY = lp_var_t<uint32_t>(sid.objectId, INIT_POS_X_CAL_MAG_Y, this);
|
||||
lp_var_t<uint32_t> initCalMagZ = lp_var_t<uint32_t>(sid.objectId, INIT_POS_X_CAL_MAG_Z, this);
|
||||
lp_var_t<uint16_t> initCoilXCurrent = lp_var_t<uint16_t>(sid.objectId, INIT_POS_X_COIL_X_CURRENT,
|
||||
lp_var_t<float> initRawMagX = lp_var_t<float>(sid.objectId, INIT_POS_X_RAW_MAG_X, this);
|
||||
lp_var_t<float> initRawMagY = lp_var_t<float>(sid.objectId, INIT_POS_X_RAW_MAG_Y, this);
|
||||
lp_var_t<float> initRawMagZ = lp_var_t<float>(sid.objectId, INIT_POS_X_RAW_MAG_Z, this);
|
||||
lp_var_t<float> initCalMagX = lp_var_t<float>(sid.objectId, INIT_POS_X_CAL_MAG_X, this);
|
||||
lp_var_t<float> initCalMagY = lp_var_t<float>(sid.objectId, INIT_POS_X_CAL_MAG_Y, this);
|
||||
lp_var_t<float> initCalMagZ = lp_var_t<float>(sid.objectId, INIT_POS_X_CAL_MAG_Z, this);
|
||||
lp_var_t<float> initCoilXCurrent = lp_var_t<float>(sid.objectId, INIT_POS_X_COIL_X_CURRENT,
|
||||
this);
|
||||
lp_var_t<uint16_t> initCoilYCurrent = lp_var_t<uint16_t>(sid.objectId, INIT_POS_X_COIL_Y_CURRENT,
|
||||
lp_var_t<float> initCoilYCurrent = lp_var_t<float>(sid.objectId, INIT_POS_X_COIL_Y_CURRENT,
|
||||
this);
|
||||
lp_var_t<uint16_t> initCoilZCurrent = lp_var_t<uint16_t>(sid.objectId, INIT_POS_X_COIL_Z_CURRENT,
|
||||
lp_var_t<float> initCoilZCurrent = lp_var_t<float>(sid.objectId, INIT_POS_X_COIL_Z_CURRENT,
|
||||
this);
|
||||
lp_var_t<uint16_t> initCoilXTemperature = lp_var_t<uint16_t>(sid.objectId,
|
||||
INIT_POS_X_COIL_X_TEMPERATURE, this);
|
||||
@ -491,17 +498,17 @@ public:
|
||||
|
||||
/** +X block */
|
||||
lp_var_t<uint8_t> err = lp_var_t<uint8_t>(sid.objectId, POS_X_ERR, this);
|
||||
lp_var_t<uint32_t> rawMagX = lp_var_t<uint32_t>(sid.objectId, POS_X_RAW_MAG_X, this);
|
||||
lp_var_t<uint32_t> rawMagY = lp_var_t<uint32_t>(sid.objectId, POS_X_RAW_MAG_Y, this);
|
||||
lp_var_t<uint32_t> rawMagZ = lp_var_t<uint32_t>(sid.objectId, POS_X_RAW_MAG_Z, this);
|
||||
lp_var_t<uint32_t> calMagX = lp_var_t<uint32_t>(sid.objectId, POS_X_CAL_MAG_X, this);
|
||||
lp_var_t<uint32_t> calMagY = lp_var_t<uint32_t>(sid.objectId, POS_X_CAL_MAG_Y, this);
|
||||
lp_var_t<uint32_t> calMagZ = lp_var_t<uint32_t>(sid.objectId, POS_X_CAL_MAG_Z, this);
|
||||
lp_var_t<uint16_t> coilXCurrent = lp_var_t<uint16_t>(sid.objectId, POS_X_COIL_X_CURRENT,
|
||||
lp_var_t<float> rawMagX = lp_var_t<float>(sid.objectId, POS_X_RAW_MAG_X, this);
|
||||
lp_var_t<float> rawMagY = lp_var_t<float>(sid.objectId, POS_X_RAW_MAG_Y, this);
|
||||
lp_var_t<float> rawMagZ = lp_var_t<float>(sid.objectId, POS_X_RAW_MAG_Z, this);
|
||||
lp_var_t<float> calMagX = lp_var_t<float>(sid.objectId, POS_X_CAL_MAG_X, this);
|
||||
lp_var_t<float> calMagY = lp_var_t<float>(sid.objectId, POS_X_CAL_MAG_Y, this);
|
||||
lp_var_t<float> calMagZ = lp_var_t<float>(sid.objectId, POS_X_CAL_MAG_Z, this);
|
||||
lp_var_t<float> coilXCurrent = lp_var_t<float>(sid.objectId, POS_X_COIL_X_CURRENT,
|
||||
this);
|
||||
lp_var_t<uint16_t> coilYCurrent = lp_var_t<uint16_t>(sid.objectId, POS_X_COIL_Y_CURRENT,
|
||||
lp_var_t<float> coilYCurrent = lp_var_t<float>(sid.objectId, POS_X_COIL_Y_CURRENT,
|
||||
this);
|
||||
lp_var_t<uint16_t> coilZCurrent = lp_var_t<uint16_t>(sid.objectId, POS_X_COIL_Z_CURRENT,
|
||||
lp_var_t<float> coilZCurrent = lp_var_t<float>(sid.objectId, POS_X_COIL_Z_CURRENT,
|
||||
this);
|
||||
lp_var_t<uint16_t> coilXTemperature = lp_var_t<uint16_t>(sid.objectId,
|
||||
POS_X_COIL_X_TEMPERATURE, this);
|
||||
@ -512,17 +519,17 @@ public:
|
||||
|
||||
/** FINA block */
|
||||
lp_var_t<uint8_t> finaErr = lp_var_t<uint8_t>(sid.objectId, FINA_POS_X_ERR, this);
|
||||
lp_var_t<uint32_t> finaRawMagX = lp_var_t<uint32_t>(sid.objectId, FINA_POS_X_RAW_MAG_X, this);
|
||||
lp_var_t<uint32_t> finaRawMagY = lp_var_t<uint32_t>(sid.objectId, FINA_POS_X_RAW_MAG_Y, this);
|
||||
lp_var_t<uint32_t> finaRawMagZ = lp_var_t<uint32_t>(sid.objectId, FINA_POS_X_RAW_MAG_Z, this);
|
||||
lp_var_t<uint32_t> finaCalMagX = lp_var_t<uint32_t>(sid.objectId, FINA_POS_X_CAL_MAG_X, this);
|
||||
lp_var_t<uint32_t> finaCalMagY = lp_var_t<uint32_t>(sid.objectId, FINA_POS_X_CAL_MAG_Y, this);
|
||||
lp_var_t<uint32_t> finaCalMagZ = lp_var_t<uint32_t>(sid.objectId, FINA_POS_X_CAL_MAG_Z, this);
|
||||
lp_var_t<uint16_t> finaCoilXCurrent = lp_var_t<uint16_t>(sid.objectId, FINA_POS_X_COIL_X_CURRENT,
|
||||
lp_var_t<float> finaRawMagX = lp_var_t<float>(sid.objectId, FINA_POS_X_RAW_MAG_X, this);
|
||||
lp_var_t<float> finaRawMagY = lp_var_t<float>(sid.objectId, FINA_POS_X_RAW_MAG_Y, this);
|
||||
lp_var_t<float> finaRawMagZ = lp_var_t<float>(sid.objectId, FINA_POS_X_RAW_MAG_Z, this);
|
||||
lp_var_t<float> finaCalMagX = lp_var_t<float>(sid.objectId, FINA_POS_X_CAL_MAG_X, this);
|
||||
lp_var_t<float> finaCalMagY = lp_var_t<float>(sid.objectId, FINA_POS_X_CAL_MAG_Y, this);
|
||||
lp_var_t<float> finaCalMagZ = lp_var_t<float>(sid.objectId, FINA_POS_X_CAL_MAG_Z, this);
|
||||
lp_var_t<float> finaCoilXCurrent = lp_var_t<float>(sid.objectId, FINA_POS_X_COIL_X_CURRENT,
|
||||
this);
|
||||
lp_var_t<uint16_t> finaCoilYCurrent = lp_var_t<uint16_t>(sid.objectId, FINA_POS_X_COIL_Y_CURRENT,
|
||||
lp_var_t<float> finaCoilYCurrent = lp_var_t<float>(sid.objectId, FINA_POS_X_COIL_Y_CURRENT,
|
||||
this);
|
||||
lp_var_t<uint16_t> finaCoilZCurrent = lp_var_t<uint16_t>(sid.objectId, FINA_POS_X_COIL_Z_CURRENT,
|
||||
lp_var_t<float> finaCoilZCurrent = lp_var_t<float>(sid.objectId, FINA_POS_X_COIL_Z_CURRENT,
|
||||
this);
|
||||
lp_var_t<uint16_t> finaCoilXTemperature = lp_var_t<uint16_t>(sid.objectId,
|
||||
FINA_POS_X_COIL_X_TEMPERATURE, this);
|
||||
|
2
tmtc
2
tmtc
@ -1 +1 @@
|
||||
Subproject commit 58c20e31cc38f04229f1016b6810205aaaa9922d
|
||||
Subproject commit fe1e6a287710ebd90fa78c22feea5b82523b2324
|
Loading…
Reference in New Issue
Block a user