From b000f77f4b6b26e16a943d1f6f7d542ec18680fb Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Tue, 12 Dec 2023 17:55:09 +0100 Subject: [PATCH 01/64] smaller PLOC tweaks --- linux/payload/FreshSupvHandler.cpp | 2 +- linux/payload/PlocSupvUartMan.cpp | 10 +--------- 2 files changed, 2 insertions(+), 10 deletions(-) diff --git a/linux/payload/FreshSupvHandler.cpp b/linux/payload/FreshSupvHandler.cpp index 0d34b63f..88a68635 100644 --- a/linux/payload/FreshSupvHandler.cpp +++ b/linux/payload/FreshSupvHandler.cpp @@ -1115,7 +1115,7 @@ void FreshSupvHandler::handleEvent(EventMessage* eventMessage) { if (not isCommandAlreadyActive(supv::SHUTDOWN_MPSOC)) { CommandMessage actionMsg; ActionMessage::setCommand(&actionMsg, supv::SHUTDOWN_MPSOC, store_address_t::invalid()); - result = messageQueue->sendMessage(getCommandQueue(), &actionMsg); + result = messageQueue->sendMessageFrom(getCommandQueue(), &actionMsg, MessageQueueIF::NO_QUEUE); if (result != returnvalue::OK) { triggerEvent(supv::SUPV_MPSOC_SHUTDOWN_BUILD_FAILED); sif::warning << "PlocSupervisorHandler::handleEvent: Failed to build MPSoC shutdown " diff --git a/linux/payload/PlocSupvUartMan.cpp b/linux/payload/PlocSupvUartMan.cpp index f73ca560..56bb3dd5 100644 --- a/linux/payload/PlocSupvUartMan.cpp +++ b/linux/payload/PlocSupvUartMan.cpp @@ -945,15 +945,7 @@ ReturnValue_t PlocSupvUartManager::handleRunningLongerRequest() { break; } case Request::REQUEST_EVENT_BUFFER: { - // result = performEventBufferRequest(); - // if (result == returnvalue::OK) { - // triggerEvent(SUPV_EVENT_BUFFER_REQUEST_SUCCESSFUL, result); - // } else if (result == PROCESS_TERMINATED) { - // // Event already triggered - // break; - // } else { - // triggerEvent(SUPV_EVENT_BUFFER_REQUEST_FAILED, result); - // } + sif::error << "Requesting event buffer is not implemented" << std::endl; break; } case Request::DEFAULT: { From 0ae8b4e85ee664dd60c93f44dc594244ca5de0b5 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Mon, 1 Jan 2024 17:19:07 +0100 Subject: [PATCH 02/64] stupid PCDU --- mission/power/PcduHandler.cpp | 17 ++++++++++------- mission/power/PcduHandler.h | 2 +- 2 files changed, 11 insertions(+), 8 deletions(-) diff --git a/mission/power/PcduHandler.cpp b/mission/power/PcduHandler.cpp index 0561288c..1596d522 100644 --- a/mission/power/PcduHandler.cpp +++ b/mission/power/PcduHandler.cpp @@ -65,8 +65,8 @@ ReturnValue_t PcduHandler::performOperation(uint8_t counter) { ReturnValue_t PcduHandler::initialize() { ReturnValue_t result; - IPCStore = ObjectManager::instance()->get(objects::IPC_STORE); - if (IPCStore == nullptr) { + ipcStore = ObjectManager::instance()->get(objects::IPC_STORE); + if (ipcStore == nullptr) { return ObjectManagerIF::CHILD_INIT_FAILED; } @@ -162,10 +162,13 @@ void PcduHandler::updateHkTableDataset(store_address_t storeId, LocalPoolDataSet sizeof(CCSDSTime::CDS_short), dataset); const uint8_t* packet_ptr = nullptr; size_t size = 0; - result = IPCStore->getData(storeId, &packet_ptr, &size); + result = ipcStore->getData(storeId, &packet_ptr, &size); if (result != returnvalue::OK) { - sif::error << "PCDUHandler::updateHkTableDataset: Failed to get data from IPCStore." - << std::endl; + sif::error << "PCDUHandler::updateHkTableDataset: Failed to get data from IPC store, result 0x" + << std::hex << std::setw(4) << std::setfill('0') << result << std::dec + << std::setfill(' ') << std::endl; + result = ipcStore->deleteData(storeId); + return; } result = packetUpdate.deSerialize(&packet_ptr, &size, SerializeIF::Endianness::MACHINE); if (result != returnvalue::OK) { @@ -173,7 +176,7 @@ void PcduHandler::updateHkTableDataset(store_address_t storeId, LocalPoolDataSet "in hk table dataset" << std::endl; } - result = IPCStore->deleteData(storeId); + result = ipcStore->deleteData(storeId); if (result != returnvalue::OK) { sif::error << "PCDUHandler::updateHkTableDataset: Failed to delete data in IPCStore" << std::endl; @@ -396,7 +399,7 @@ ReturnValue_t PcduHandler::sendSwitchCommand(uint8_t switchNr, ReturnValue_t onO setParamMessage.serialize(&commandPtr, &serializedLength, maxSize, SerializeIF::Endianness::BIG); store_address_t storeAddress; - result = IPCStore->addData(&storeAddress, command, sizeof(command)); + result = ipcStore->addData(&storeAddress, command, sizeof(command)); CommandMessage message; ActionMessage::setCommand(&message, GOMSPACE::PARAM_SET, storeAddress); diff --git a/mission/power/PcduHandler.h b/mission/power/PcduHandler.h index 86d3747f..73df73ef 100644 --- a/mission/power/PcduHandler.h +++ b/mission/power/PcduHandler.h @@ -94,7 +94,7 @@ class PcduHandler : public PowerSwitchIF, * Pointer to the IPCStore. * This caches the pointer received from the objectManager in the constructor. */ - StorageManagerIF* IPCStore = nullptr; + StorageManagerIF* ipcStore = nullptr; /** * Message queue to communicate with other objetcs. Used for example to receive From 777b61376cf5da01ef679c72b525d04773e2622c Mon Sep 17 00:00:00 2001 From: meggert Date: Tue, 16 Jan 2024 15:51:37 +0100 Subject: [PATCH 03/64] small fix --- mission/controller/AcsController.cpp | 2 +- mission/controller/acs/control/PtgCtrl.cpp | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/mission/controller/AcsController.cpp b/mission/controller/AcsController.cpp index 6adb4a0b..724477fb 100644 --- a/mission/controller/AcsController.cpp +++ b/mission/controller/AcsController.cpp @@ -403,7 +403,7 @@ void AcsController::performPointingCtrl() { acs::ControlModeStrategy ptgCtrlStrat = ptgCtrl.pointingCtrlStrategy( mgmDataProcessed.mgmVecTot.isValid(), not mekfInvalidFlag, strValid, attitudeEstimationData.quatQuest.isValid(), fusedRotRateData.rotRateTotal.isValid(), - fusedRotRateData.rotRateSource.isValid(), useMekf); + fusedRotRateData.rotRateSource.value, useMekf); if (ptgCtrlStrat == acs::ControlModeStrategy::CTRL_NO_SENSORS_FOR_CONTROL) { ptgCtrlLostCounter++; diff --git a/mission/controller/acs/control/PtgCtrl.cpp b/mission/controller/acs/control/PtgCtrl.cpp index eb510c53..fd5b9f29 100644 --- a/mission/controller/acs/control/PtgCtrl.cpp +++ b/mission/controller/acs/control/PtgCtrl.cpp @@ -21,9 +21,8 @@ acs::ControlModeStrategy PtgCtrl::pointingCtrlStrategy( return acs::ControlModeStrategy::PTGCTRL_STR; } else if (questValid and fusedRateValid and rotRateSource > acs::rotrate::Source::SUSMGM) { return acs::ControlModeStrategy::PTGCTRL_QUEST; - } else { - return acs::ControlModeStrategy::CTRL_NO_SENSORS_FOR_CONTROL; } + return acs::ControlModeStrategy::CTRL_NO_SENSORS_FOR_CONTROL; } void PtgCtrl::ptgLaw(AcsParameters::PointingLawParameters *pointingLawParameters, From ebe4ca8084cb124c69c34e3ea9ac0030fadc823e Mon Sep 17 00:00:00 2001 From: meggert Date: Tue, 16 Jan 2024 16:28:53 +0100 Subject: [PATCH 04/64] datasets are now always written in pointing modes --- mission/controller/AcsController.cpp | 19 +++++++++++-------- mission/controller/AcsController.h | 7 ++++--- 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/mission/controller/AcsController.cpp b/mission/controller/AcsController.cpp index 724477fb..262ee215 100644 --- a/mission/controller/AcsController.cpp +++ b/mission/controller/AcsController.cpp @@ -411,6 +411,8 @@ void AcsController::performPointingCtrl() { triggerEvent(acs::PTG_CTRL_NO_ATTITUDE_INFORMATION); ptgCtrlLostCounter = 0; } + updateCtrlValData(ptgCtrlStrat); + updateActuatorCmdData(ZERO_VEC4, cmdSpeedRws, ZERO_VEC3_INT16); commandActuators(0, 0, 0, acsParameters.magnetorquerParameter.torqueDuration, cmdSpeedRws[0], cmdSpeedRws[1], cmdSpeedRws[2], cmdSpeedRws[3], acsParameters.rwHandlingParameters.rampTime); @@ -437,7 +439,7 @@ void AcsController::performPointingCtrl() { std::memcpy(rotRateB, fusedRotRateData.rotRateTotal.value, sizeof(rotRateB)); break; default: - sif::error << "AcsController: Invalid pointing mode strategy for performDetumble" + sif::error << "AcsController: Invalid pointing mode strategy for performPointingCtrl" << std::endl; break; } @@ -593,7 +595,7 @@ void AcsController::performPointingCtrl() { actuatorCmd.cmdDipoleMtq(*acsParameters.magnetorquerParameter.inverseAlignment, acsParameters.magnetorquerParameter.dipoleMax, mgtDpDes, cmdDipoleMtqs); - updateCtrlValData(targetQuat, errorQuat, errorAngle, targetSatRotRate); + updateCtrlValData(targetQuat, errorQuat, errorAngle, targetSatRotRate, ptgCtrlStrat); updateActuatorCmdData(torqueRws, cmdSpeedRws, cmdDipoleMtqs); commandActuators(cmdDipoleMtqs[0], cmdDipoleMtqs[1], cmdDipoleMtqs[2], acsParameters.magnetorquerParameter.torqueDuration, cmdSpeedRws[0], @@ -671,7 +673,7 @@ void AcsController::updateActuatorCmdData(const double *rwTargetTorque, } } -void AcsController::updateCtrlValData(uint8_t safeModeStrat) { +void AcsController::updateCtrlValData(acs::ControlModeStrategy ctrlStrat) { PoolReadGuard pg(&ctrlValData); if (pg.getReadResult() == returnvalue::OK) { std::memcpy(ctrlValData.tgtQuat.value, ZERO_VEC4, 4 * sizeof(double)); @@ -682,13 +684,13 @@ void AcsController::updateCtrlValData(uint8_t safeModeStrat) { ctrlValData.errAng.setValid(false); std::memcpy(ctrlValData.tgtRotRate.value, ZERO_VEC3, 3 * sizeof(double)); ctrlValData.tgtRotRate.setValid(false); - ctrlValData.safeStrat.value = safeModeStrat; + ctrlValData.safeStrat.value = ctrlStrat; ctrlValData.safeStrat.setValid(true); ctrlValData.setValidity(true, false); } } -void AcsController::updateCtrlValData(double errAng, uint8_t safeModeStrat) { +void AcsController::updateCtrlValData(double errAng, acs::ControlModeStrategy ctrlStrat) { PoolReadGuard pg(&ctrlValData); if (pg.getReadResult() == returnvalue::OK) { std::memcpy(ctrlValData.tgtQuat.value, ZERO_VEC4, 4 * sizeof(double)); @@ -699,21 +701,22 @@ void AcsController::updateCtrlValData(double errAng, uint8_t safeModeStrat) { ctrlValData.errAng.setValid(true); std::memcpy(ctrlValData.tgtRotRate.value, ZERO_VEC3, 3 * sizeof(double)); ctrlValData.tgtRotRate.setValid(false); - ctrlValData.safeStrat.value = safeModeStrat; + ctrlValData.safeStrat.value = ctrlStrat; ctrlValData.safeStrat.setValid(true); ctrlValData.setValidity(true, false); } } void AcsController::updateCtrlValData(const double *tgtQuat, const double *errQuat, double errAng, - const double *tgtRotRate) { + const double *tgtRotRate, + acs::ControlModeStrategy ctrlStrat) { PoolReadGuard pg(&ctrlValData); if (pg.getReadResult() == returnvalue::OK) { std::memcpy(ctrlValData.tgtQuat.value, tgtQuat, 4 * sizeof(double)); std::memcpy(ctrlValData.errQuat.value, errQuat, 4 * sizeof(double)); ctrlValData.errAng.value = errAng; std::memcpy(ctrlValData.tgtRotRate.value, tgtRotRate, 3 * sizeof(double)); - ctrlValData.safeStrat.value = acs::ControlModeStrategy::CTRL_OFF; + ctrlValData.safeStrat.value = ctrlStrat; ctrlValData.setValidity(true, true); } } diff --git a/mission/controller/AcsController.h b/mission/controller/AcsController.h index 2e1fe13e..aa2b9411 100644 --- a/mission/controller/AcsController.h +++ b/mission/controller/AcsController.h @@ -52,6 +52,7 @@ class AcsController : public ExtendedControllerBase, public ReceivesParameterMes void performPointingCtrl(); private: + static constexpr int16_t ZERO_VEC3_INT16[3] = {0, 0, 0}; static constexpr double ZERO_VEC3[3] = {0, 0, 0}; static constexpr double ZERO_VEC4[4] = {0, 0, 0, 0}; static constexpr double RW_OFF_TORQUE[4] = {0, 0, 0, 0}; @@ -143,10 +144,10 @@ class AcsController : public ExtendedControllerBase, public ReceivesParameterMes void updateActuatorCmdData(const int16_t* mtqTargetDipole); void updateActuatorCmdData(const double* rwTargetTorque, const int32_t* rwTargetSpeed, const int16_t* mtqTargetDipole); - void updateCtrlValData(uint8_t safeModeStrat); - void updateCtrlValData(double errAng, uint8_t safeModeStrat); + void updateCtrlValData(acs::ControlModeStrategy ctrlStrat); + void updateCtrlValData(double errAng, acs::ControlModeStrategy ctrlStrat); void updateCtrlValData(const double* tgtQuat, const double* errQuat, double errAng, - const double* tgtRotRate); + const double* tgtRotRate, acs::ControlModeStrategy cStrat); ReturnValue_t updateTle(const uint8_t* line1, const uint8_t* line2, bool fromFile); ReturnValue_t writeTleToFs(const uint8_t* tle); From 31fc559d8e921d103ee913e55a1ec0355f980744 Mon Sep 17 00:00:00 2001 From: meggert Date: Tue, 16 Jan 2024 16:35:45 +0100 Subject: [PATCH 05/64] this is an error case as well --- mission/controller/AcsController.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/mission/controller/AcsController.cpp b/mission/controller/AcsController.cpp index 262ee215..8e7ae8d4 100644 --- a/mission/controller/AcsController.cpp +++ b/mission/controller/AcsController.cpp @@ -405,7 +405,8 @@ void AcsController::performPointingCtrl() { attitudeEstimationData.quatQuest.isValid(), fusedRotRateData.rotRateTotal.isValid(), fusedRotRateData.rotRateSource.value, useMekf); - if (ptgCtrlStrat == acs::ControlModeStrategy::CTRL_NO_SENSORS_FOR_CONTROL) { + if (ptgCtrlStrat == acs::ControlModeStrategy::CTRL_NO_MAG_FIELD_FOR_CONTROL or + ptgCtrlStrat == acs::ControlModeStrategy::CTRL_NO_SENSORS_FOR_CONTROL) { ptgCtrlLostCounter++; if (ptgCtrlLostCounter > acsParameters.onBoardParams.ptgCtrlLostTimer) { triggerEvent(acs::PTG_CTRL_NO_ATTITUDE_INFORMATION); From 0fe6c1397d6a1ee623cd25683d8f26cc4526d5f3 Mon Sep 17 00:00:00 2001 From: meggert Date: Tue, 16 Jan 2024 16:36:17 +0100 Subject: [PATCH 06/64] changelog --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index cb798dc8..0cea2046 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,11 @@ will consitute of a breaking change warranting a new major release: # [unreleased] +## Fixed + +- Pointing strategy now actually uses fused rotation rate source instead of its valid flag. +- All datasets now get updated during pointing mode, even if the strategy is a fault one. + # [v7.5.3] 2023-12-19 ## Fixed From d3e08c36a2d6dd7eda7f0643ff3d7d8aa4f7ada4 Mon Sep 17 00:00:00 2001 From: meggert Date: Tue, 16 Jan 2024 16:53:55 +0100 Subject: [PATCH 07/64] changelog --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 0cea2046..85d63062 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,8 @@ will consitute of a breaking change warranting a new major release: # [unreleased] +# [v7.5.4] 2024-01-16 + ## Fixed - Pointing strategy now actually uses fused rotation rate source instead of its valid flag. From 68f875923317a3bcee4a5c41fb468ed0a5b23544 Mon Sep 17 00:00:00 2001 From: meggert Date: Tue, 16 Jan 2024 16:54:22 +0100 Subject: [PATCH 08/64] bump version --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2576fbb8..c9dfa157 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -11,7 +11,7 @@ cmake_minimum_required(VERSION 3.13) set(OBSW_VERSION_MAJOR 7) set(OBSW_VERSION_MINOR 5) -set(OBSW_VERSION_REVISION 3) +set(OBSW_VERSION_REVISION 4) # set(CMAKE_VERBOSE TRUE) From d8ae45b3520d0eeb4853c8909272b24fe2fa28c6 Mon Sep 17 00:00:00 2001 From: meggert Date: Fri, 19 Jan 2024 15:16:46 +0100 Subject: [PATCH 09/64] trigger transition into detumble no matter which mode we are in --- mission/controller/AcsController.cpp | 45 +++++++++++----------------- 1 file changed, 18 insertions(+), 27 deletions(-) diff --git a/mission/controller/AcsController.cpp b/mission/controller/AcsController.cpp index 8e7ae8d4..41ff69dd 100644 --- a/mission/controller/AcsController.cpp +++ b/mission/controller/AcsController.cpp @@ -178,6 +178,24 @@ void AcsController::performAttitudeControl() { result = navigation.useMekf(&sensorValues, &gyrDataProcessed, &mgmDataProcessed, &susDataProcessed, &attitudeEstimationData, &acsParameters); + if (not submode == acs::SafeSubmode::DETUMBLE) { + if (acsParameters.safeModeControllerParameters.useMekf) { + if (mgmDataProcessed.mgmVecTotDerivative.isValid() and + VectorOperations::norm(mgmDataProcessed.mgmVecTotDerivative.value, 3) > + acsParameters.detumbleParameter.omegaDetumbleStart) { + detumbleCounter++; + } + } else if (detumbleCounter > 0) { + detumbleCounter -= 1; + } + if (detumbleCounter > acsParameters.detumbleParameter.detumblecounter) { + detumbleCounter = 0; + // Triggers detumble mode transition in subsystem + triggerEvent(acs::SAFE_RATE_VIOLATION); + startTransition(mode, acs::SafeSubmode::DETUMBLE); + } + } + if (result != MultiplicativeKalmanFilter::MEKF_RUNNING and result != MultiplicativeKalmanFilter::MEKF_INITIALIZED) { if (not mekfInvalidFlag) { @@ -284,33 +302,6 @@ void AcsController::performSafe() { actuatorCmd.cmdDipoleMtq(*acsParameters.magnetorquerParameter.inverseAlignment, acsParameters.magnetorquerParameter.dipoleMax, magMomMtq, cmdDipoleMtqs); - // detumble check and switch - if (acsParameters.safeModeControllerParameters.useMekf) { - if (attitudeEstimationData.satRotRateMekf.isValid() and - VectorOperations::norm(attitudeEstimationData.satRotRateMekf.value, 3) > - acsParameters.detumbleParameter.omegaDetumbleStart) { - detumbleCounter++; - } - } else if (acsParameters.safeModeControllerParameters.useGyr) { - if (gyrDataProcessed.gyrVecTot.isValid() and - VectorOperations::norm(gyrDataProcessed.gyrVecTot.value, 3) > - acsParameters.detumbleParameter.omegaDetumbleStart) { - detumbleCounter++; - } - } else if (fusedRotRateData.rotRateTotal.isValid() and - VectorOperations::norm(fusedRotRateData.rotRateTotal.value, 3) > - acsParameters.detumbleParameter.omegaDetumbleStart) { - detumbleCounter++; - } else if (detumbleCounter > 0) { - detumbleCounter -= 1; - } - if (detumbleCounter > acsParameters.detumbleParameter.detumblecounter) { - detumbleCounter = 0; - // Triggers detumble mode transition in subsystem - triggerEvent(acs::SAFE_RATE_VIOLATION); - startTransition(mode, acs::SafeSubmode::DETUMBLE); - } - updateCtrlValData(errAng, safeCtrlStrat); updateActuatorCmdData(cmdDipoleMtqs); commandActuators(cmdDipoleMtqs[0], cmdDipoleMtqs[1], cmdDipoleMtqs[2], From ef730022a0c191442f8bce27f71c0e8041fc03e4 Mon Sep 17 00:00:00 2001 From: meggert Date: Fri, 19 Jan 2024 15:18:15 +0100 Subject: [PATCH 10/64] isnt finished --- mission/controller/AcsController.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mission/controller/AcsController.cpp b/mission/controller/AcsController.cpp index 41ff69dd..4980cbcd 100644 --- a/mission/controller/AcsController.cpp +++ b/mission/controller/AcsController.cpp @@ -181,7 +181,8 @@ void AcsController::performAttitudeControl() { if (not submode == acs::SafeSubmode::DETUMBLE) { if (acsParameters.safeModeControllerParameters.useMekf) { if (mgmDataProcessed.mgmVecTotDerivative.isValid() and - VectorOperations::norm(mgmDataProcessed.mgmVecTotDerivative.value, 3) > + VectorOperations::norm(mgmDataProcessed.mgmVecTotDerivative.value, + 3) > // units do not agree acsParameters.detumbleParameter.omegaDetumbleStart) { detumbleCounter++; } @@ -192,7 +193,7 @@ void AcsController::performAttitudeControl() { detumbleCounter = 0; // Triggers detumble mode transition in subsystem triggerEvent(acs::SAFE_RATE_VIOLATION); - startTransition(mode, acs::SafeSubmode::DETUMBLE); + startTransition(mode, acs::SafeSubmode::DETUMBLE); // this does not work } } From 367e879d91a60d12d1f5ae7a61f1cee1e1ead8e7 Mon Sep 17 00:00:00 2001 From: meggert Date: Fri, 19 Jan 2024 16:15:22 +0100 Subject: [PATCH 11/64] this should be it --- mission/controller/acs/Guidance.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/mission/controller/acs/Guidance.cpp b/mission/controller/acs/Guidance.cpp index 0be636ad..6d2d3e98 100644 --- a/mission/controller/acs/Guidance.cpp +++ b/mission/controller/acs/Guidance.cpp @@ -418,6 +418,7 @@ void Guidance::comparePtg(double currentQuat[4], double currentSatRotRate[3], do double targetSatRotRate[3], double refQuat[4], double refSatRotRate[3], double errorQuat[4], double errorSatRotRate[3], double &errorAngle) { // First calculate error quaternion between current and target orientation + QuaternionOperations::inverse(targetQuat, targetQuat); QuaternionOperations::multiply(currentQuat, targetQuat, errorQuat); // Last calculate add rotation from reference quaternion QuaternionOperations::multiply(refQuat, errorQuat, errorQuat); From 392a97bb651a0dbc93dc30b0e3d16458613367ca Mon Sep 17 00:00:00 2001 From: meggert Date: Fri, 19 Jan 2024 16:17:37 +0100 Subject: [PATCH 12/64] better safe than sorry --- mission/controller/acs/Guidance.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mission/controller/acs/Guidance.cpp b/mission/controller/acs/Guidance.cpp index 6d2d3e98..10d1393c 100644 --- a/mission/controller/acs/Guidance.cpp +++ b/mission/controller/acs/Guidance.cpp @@ -418,8 +418,9 @@ void Guidance::comparePtg(double currentQuat[4], double currentSatRotRate[3], do double targetSatRotRate[3], double refQuat[4], double refSatRotRate[3], double errorQuat[4], double errorSatRotRate[3], double &errorAngle) { // First calculate error quaternion between current and target orientation - QuaternionOperations::inverse(targetQuat, targetQuat); - QuaternionOperations::multiply(currentQuat, targetQuat, errorQuat); + double invTargetQuat[4] = {0, 0, 0, 0}; + QuaternionOperations::inverse(targetQuat, invTargetQuat); + QuaternionOperations::multiply(currentQuat, invTargetQuat, errorQuat); // Last calculate add rotation from reference quaternion QuaternionOperations::multiply(refQuat, errorQuat, errorQuat); // Keep scalar part of quaternion positive From 65502c0107e3a856404b8641a7854b85d37ac1f4 Mon Sep 17 00:00:00 2001 From: meggert Date: Mon, 22 Jan 2024 10:05:05 +0100 Subject: [PATCH 13/64] changelog --- CHANGELOG.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 85d63062..8202cea7 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,12 @@ will consitute of a breaking change warranting a new major release: # [unreleased] +# [v7.5.5] 2024-01-22 + +## Fixed + +- Calculation of error quaternion was done with inverse of the required target quaternion. + # [v7.5.4] 2024-01-16 ## Fixed From 4fcb7fc8c6cd000e9ea88b78546ce3c6643ab240 Mon Sep 17 00:00:00 2001 From: meggert Date: Mon, 22 Jan 2024 10:06:57 +0100 Subject: [PATCH 14/64] bump version --- CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index c9dfa157..5b8eb93e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -11,7 +11,7 @@ cmake_minimum_required(VERSION 3.13) set(OBSW_VERSION_MAJOR 7) set(OBSW_VERSION_MINOR 5) -set(OBSW_VERSION_REVISION 4) +set(OBSW_VERSION_REVISION 5) # set(CMAKE_VERBOSE TRUE) From 05b88dd29432b8abeeac75c025a7fadc4a976857 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Wed, 24 Jan 2024 14:20:15 +0100 Subject: [PATCH 15/64] add new parameter to skip SUPV commanding --- linux/payload/PlocMpsocHandler.cpp | 20 ++++++++++++++++++++ linux/payload/PlocMpsocHandler.h | 2 ++ linux/payload/plocMpsocHelpers.h | 4 ++++ 3 files changed, 26 insertions(+) diff --git a/linux/payload/PlocMpsocHandler.cpp b/linux/payload/PlocMpsocHandler.cpp index 05b3a04e..6601d957 100644 --- a/linux/payload/PlocMpsocHandler.cpp +++ b/linux/payload/PlocMpsocHandler.cpp @@ -7,6 +7,7 @@ #include "OBSWConfig.h" #include "fsfw/datapool/PoolReadGuard.h" #include "fsfw/globalfunctions/CRC.h" +#include "fsfw/parameters/HasParametersIF.h" PlocMpsocHandler::PlocMpsocHandler(object_id_t objectId, object_id_t uartComIFid, CookieIF* comCookie, PlocMpsocSpecialComHelper* plocMPSoCHelper, @@ -1395,6 +1396,9 @@ bool PlocMpsocHandler::handleHwStartup() { return true; #endif if (powerState == PowerState::IDLE) { + if (skipSupvCommandingToOn) { + powerState = PowerState::DONE; + } if (supv::SUPV_ON) { commandActionHelper.commandAction(supervisorHandler, supv::START_MPSOC); supvTransitionCd.resetTimer(); @@ -1532,3 +1536,19 @@ ReturnValue_t PlocMpsocHandler::checkModeCommand(Mode_t commandedMode, Submode_t } return DeviceHandlerBase::checkModeCommand(commandedMode, commandedSubmode, msToReachTheMode); } + +ReturnValue_t PlocMpsocHandler::getParameter(uint8_t domainId, uint8_t uniqueId, + ParameterWrapper* parameterWrapper, + const ParameterWrapper* newValues, + uint16_t startAtIndex) { + if (uniqueId == mpsoc::ParamId::SKIP_SUPV_ON_COMMANDING) { + uint8_t value = 0; + newValues->getElement(&value); + if (value > 1) { + return HasParametersIF::INVALID_VALUE; + } + parameterWrapper->set(skipSupvCommandingToOn); + } + return DeviceHandlerBase::getParameter(domainId, uniqueId, parameterWrapper, newValues, + startAtIndex); +} diff --git a/linux/payload/PlocMpsocHandler.h b/linux/payload/PlocMpsocHandler.h index 5d584943..42da39de 100644 --- a/linux/payload/PlocMpsocHandler.h +++ b/linux/payload/PlocMpsocHandler.h @@ -201,6 +201,8 @@ class PlocMpsocHandler : public DeviceHandlerBase, public CommandsActionsIF { PowerState powerState = PowerState::IDLE; + uint8_t skipSupvCommandingToOn = false; + /** * @brief Handles events received from the PLOC MPSoC helper */ diff --git a/linux/payload/plocMpsocHelpers.h b/linux/payload/plocMpsocHelpers.h index c9b08a28..f0a69049 100644 --- a/linux/payload/plocMpsocHelpers.h +++ b/linux/payload/plocMpsocHelpers.h @@ -13,6 +13,10 @@ namespace mpsoc { +enum ParamId: uint8_t { + SKIP_SUPV_ON_COMMANDING = 0x01 +}; + enum FileAccessModes : uint8_t { // Opens a file, fails if the file does not exist. OPEN_EXISTING = 0x00, From 928dd9e2e0d24625da2b62f22ee3eebf49020154 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Wed, 24 Jan 2024 14:34:34 +0100 Subject: [PATCH 16/64] some fixes --- linux/payload/PlocMpsocHandler.h | 3 +++ linux/payload/plocMpsocHelpers.h | 4 +--- tmtc | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/linux/payload/PlocMpsocHandler.h b/linux/payload/PlocMpsocHandler.h index 42da39de..cdab5884 100644 --- a/linux/payload/PlocMpsocHandler.h +++ b/linux/payload/PlocMpsocHandler.h @@ -318,6 +318,9 @@ class PlocMpsocHandler : public DeviceHandlerBase, public CommandsActionsIF { pwrctrl::EnablePl enablePl = pwrctrl::EnablePl(objects::POWER_CONTROLLER); ReturnValue_t checkModeCommand(Mode_t commandedMode, Submode_t commandedSubmode, uint32_t* msToReachTheMode) override; + + ReturnValue_t getParameter(uint8_t domainId, uint8_t uniqueId, ParameterWrapper* parameterWrapper, + const ParameterWrapper* newValues, uint16_t startAtIndex) override; }; #endif /* BSP_Q7S_DEVICES_PLOC_PLOCMPSOCHANDLER_H_ */ diff --git a/linux/payload/plocMpsocHelpers.h b/linux/payload/plocMpsocHelpers.h index f0a69049..ffd077d9 100644 --- a/linux/payload/plocMpsocHelpers.h +++ b/linux/payload/plocMpsocHelpers.h @@ -13,9 +13,7 @@ namespace mpsoc { -enum ParamId: uint8_t { - SKIP_SUPV_ON_COMMANDING = 0x01 -}; +enum ParamId : uint8_t { SKIP_SUPV_ON_COMMANDING = 0x01 }; enum FileAccessModes : uint8_t { // Opens a file, fails if the file does not exist. diff --git a/tmtc b/tmtc index 747ad34e..1831ea8b 160000 --- a/tmtc +++ b/tmtc @@ -1 +1 @@ -Subproject commit 747ad34eec5baa5199de49a1330687508c991550 +Subproject commit 1831ea8b7aa4b32d9fdc6b6598269a95b9f71a14 From 5df5c30e3037ca977bfae7c8a4da34ee0bc0979f Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Thu, 25 Jan 2024 11:02:39 +0100 Subject: [PATCH 17/64] skip param works --- linux/payload/PlocMpsocHandler.cpp | 18 ++++++++++-------- tmtc | 2 +- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/linux/payload/PlocMpsocHandler.cpp b/linux/payload/PlocMpsocHandler.cpp index 6601d957..9aa110e1 100644 --- a/linux/payload/PlocMpsocHandler.cpp +++ b/linux/payload/PlocMpsocHandler.cpp @@ -1398,15 +1398,16 @@ bool PlocMpsocHandler::handleHwStartup() { if (powerState == PowerState::IDLE) { if (skipSupvCommandingToOn) { powerState = PowerState::DONE; - } - if (supv::SUPV_ON) { - commandActionHelper.commandAction(supervisorHandler, supv::START_MPSOC); - supvTransitionCd.resetTimer(); - powerState = PowerState::PENDING_STARTUP; } else { - triggerEvent(SUPV_NOT_ON, 1); - // Set back to OFF for now, failing the transition. - setMode(MODE_OFF); + if (supv::SUPV_ON) { + commandActionHelper.commandAction(supervisorHandler, supv::START_MPSOC); + supvTransitionCd.resetTimer(); + powerState = PowerState::PENDING_STARTUP; + } else { + triggerEvent(SUPV_NOT_ON, 1); + // Set back to OFF for now, failing the transition. + setMode(MODE_OFF); + } } } if (powerState == PowerState::SUPV_FAILED) { @@ -1548,6 +1549,7 @@ ReturnValue_t PlocMpsocHandler::getParameter(uint8_t domainId, uint8_t uniqueId, return HasParametersIF::INVALID_VALUE; } parameterWrapper->set(skipSupvCommandingToOn); + return returnvalue::OK; } return DeviceHandlerBase::getParameter(domainId, uniqueId, parameterWrapper, newValues, startAtIndex); diff --git a/tmtc b/tmtc index 1831ea8b..bcdd12ca 160000 --- a/tmtc +++ b/tmtc @@ -1 +1 @@ -Subproject commit 1831ea8b7aa4b32d9fdc6b6598269a95b9f71a14 +Subproject commit bcdd12caf05b6a874b0d3ac2b9436c4061545312 From e4f8f20d784623220a2ad6fff9ae05a0a4a8754a Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Thu, 25 Jan 2024 11:13:37 +0100 Subject: [PATCH 18/64] allow slightly more time for on cmd --- linux/payload/plocSupvDefs.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/linux/payload/plocSupvDefs.h b/linux/payload/plocSupvDefs.h index a770fb49..c3c042e3 100644 --- a/linux/payload/plocSupvDefs.h +++ b/linux/payload/plocSupvDefs.h @@ -49,7 +49,7 @@ static const Event SUPV_EXE_ACK_UNKNOWN_COMMAND = MAKE_EVENT(10, severity::LOW); extern std::atomic_bool SUPV_ON; static constexpr uint32_t INTER_COMMAND_DELAY = 20; static constexpr uint32_t BOOT_TIMEOUT_MS = 4000; -static constexpr uint32_t MAX_TRANSITION_TIME_TO_ON_MS = BOOT_TIMEOUT_MS + 2000; +static constexpr uint32_t MAX_TRANSITION_TIME_TO_ON_MS = BOOT_TIMEOUT_MS + 3000; static constexpr uint32_t MAX_TRANSITION_TIME_TO_OFF_MS = 1000; namespace result { From a778daacfd14b968a6070a512a0ad9d13a9def59 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Thu, 25 Jan 2024 11:14:57 +0100 Subject: [PATCH 19/64] changelog --- CHANGELOG.md | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8202cea7..825810a6 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,14 @@ will consitute of a breaking change warranting a new major release: # [unreleased] +## Added + +- Added new parameter for MPSoC which allows to skip SUPV commanding. + +## Changed + +- Increased allowed mode transition time for PLOC SUPV. + # [v7.5.5] 2024-01-22 ## Fixed From 6c90777e4b9bd39858b61c4da57a8215079aae70 Mon Sep 17 00:00:00 2001 From: meggert Date: Thu, 25 Jan 2024 11:32:37 +0100 Subject: [PATCH 20/64] imagine being a newspace company and not even knowing what a mathematically positive sense of rotation is --- mission/controller/acs/AcsParameters.cpp | 8 ++++---- mission/controller/acs/AcsParameters.h | 24 ++++++++++++------------ 2 files changed, 16 insertions(+), 16 deletions(-) diff --git a/mission/controller/acs/AcsParameters.cpp b/mission/controller/acs/AcsParameters.cpp index a6ce6c5d..4731b6ee 100644 --- a/mission/controller/acs/AcsParameters.cpp +++ b/mission/controller/acs/AcsParameters.cpp @@ -333,16 +333,16 @@ ReturnValue_t AcsParameters::getParameter(uint8_t domainId, uint8_t parameterId, parameterWrapper->setMatrix(rwMatrices.pseudoInverse); break; case 0x2: - parameterWrapper->setMatrix(rwMatrices.without1); + parameterWrapper->setMatrix(rwMatrices.pseudoInverseWithoutRW1); break; case 0x3: - parameterWrapper->setMatrix(rwMatrices.without2); + parameterWrapper->setMatrix(rwMatrices.pseudoInverseWithoutRW2); break; case 0x4: - parameterWrapper->setMatrix(rwMatrices.without3); + parameterWrapper->setMatrix(rwMatrices.pseudoInverseWithoutRW3); break; case 0x5: - parameterWrapper->setMatrix(rwMatrices.without4); + parameterWrapper->setMatrix(rwMatrices.pseudoInverseWithoutRW4); break; case 0x6: parameterWrapper->setVector(rwMatrices.nullspaceVector); diff --git a/mission/controller/acs/AcsParameters.h b/mission/controller/acs/AcsParameters.h index f11a673b..122a932b 100644 --- a/mission/controller/acs/AcsParameters.h +++ b/mission/controller/acs/AcsParameters.h @@ -812,19 +812,19 @@ class AcsParameters : public HasParametersIF { } rwHandlingParameters; struct RwMatrices { - double alignmentMatrix[3][4] = {{0.9205, 0.0000, -0.9205, 0.0000}, - {0.0000, -0.9205, 0.0000, 0.9205}, - {0.3907, 0.3907, 0.3907, 0.3907}}; + double alignmentMatrix[3][4] = {{-0.9205, 0.0000, 0.9205, 0.0000}, + {0.0000, 0.9205, 0.0000, -0.9205}, + {-0.3907, -0.3907, -0.3907, -0.3907}}; double pseudoInverse[4][3] = { - {0.5432, 0, 0.6398}, {0, -0.5432, 0.6398}, {-0.5432, 0, 0.6398}, {0, 0.5432, 0.6398}}; - double without1[4][3] = { - {0, 0, 0}, {0.5432, -0.5432, 1.2797}, {-1.0864, 0, 0}, {0.5432, 0.5432, 1.2797}}; - double without2[4][3] = { - {0.5432, -0.5432, 1.2797}, {0, 0, 0}, {-0.5432, -0.5432, 1.2797}, {0, 1.0864, 0}}; - double without3[4][3] = { - {1.0864, 0, 0}, {-0.5432, -0.5432, 1.2797}, {0, 0, 0}, {-0.5432, 0.5432, 1.2797}}; - double without4[4][3] = { - {0.5432, 0.5432, 1.2797}, {0, -1.0864, 0}, {-0.5432, 0.5432, 1.2797}, {0, 0, 0}}; + {-0.5432, 0, -0.6399}, {0, 0.5432, -0.6399}, {0.5432, 0, -0.6399}, {0, -0.5432, -0.6399}}; + double pseudoInverseWithoutRW1[4][3] = { + {0, 0, 0}, {-0.5432, 0.5432, -1.2798}, {1.0864, 0, 0}, {-0.5432, -0.5432, -1.2798}}; + double pseudoInverseWithoutRW2[4][3] = { + {-0.5432, 0.5432, -1.2798}, {0, 0, 0}, {0.5432, 0.5432, -1.2798}, {0, -1.0864, 0}}; + double pseudoInverseWithoutRW3[4][3] = { + {1.0864, 0, 0}, {-0.5432, -0.5432, 1.2798}, {0, 0, 0}, {-0.5432, 0.5432, 1.2798}}; + double pseudoInverseWithoutRW4[4][3] = { + {-0.5432, -0.5432, -1.2798}, {0, 1.0864, 0}, {0.5432, -0.5432, -1.2798}, {0, 0, 0}}; double nullspaceVector[4] = {-1, 1, -1, 1}; } rwMatrices; From edf2f889c1b0f5ab736e270379616fc18392d87a Mon Sep 17 00:00:00 2001 From: meggert Date: Thu, 25 Jan 2024 13:15:10 +0100 Subject: [PATCH 21/64] forgot this one --- mission/controller/acs/AcsParameters.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mission/controller/acs/AcsParameters.h b/mission/controller/acs/AcsParameters.h index 122a932b..0ab1105d 100644 --- a/mission/controller/acs/AcsParameters.h +++ b/mission/controller/acs/AcsParameters.h @@ -822,7 +822,7 @@ class AcsParameters : public HasParametersIF { double pseudoInverseWithoutRW2[4][3] = { {-0.5432, 0.5432, -1.2798}, {0, 0, 0}, {0.5432, 0.5432, -1.2798}, {0, -1.0864, 0}}; double pseudoInverseWithoutRW3[4][3] = { - {1.0864, 0, 0}, {-0.5432, -0.5432, 1.2798}, {0, 0, 0}, {-0.5432, 0.5432, 1.2798}}; + {-1.0864, 0, 0}, {0.5432, 0.5432, -1.2798}, {0, 0, 0}, {0.5432, -0.5432, -1.2798}}; double pseudoInverseWithoutRW4[4][3] = { {-0.5432, -0.5432, -1.2798}, {0, 1.0864, 0}, {0.5432, -0.5432, -1.2798}, {0, 0, 0}}; double nullspaceVector[4] = {-1, 1, -1, 1}; From 3892276a5c7fd7f4ab62f9921ab058208f7e1ef5 Mon Sep 17 00:00:00 2001 From: meggert Date: Thu, 25 Jan 2024 13:19:59 +0100 Subject: [PATCH 22/64] reset guidance on mode change --- mission/controller/AcsController.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/mission/controller/AcsController.cpp b/mission/controller/AcsController.cpp index 8e7ae8d4..36d05fb2 100644 --- a/mission/controller/AcsController.cpp +++ b/mission/controller/AcsController.cpp @@ -885,6 +885,7 @@ ReturnValue_t AcsController::checkModeCommand(Mode_t mode, Submode_t submode, } void AcsController::modeChanged(Mode_t mode, Submode_t submode) { + guidance.resetValues(); return ExtendedControllerBase::modeChanged(mode, submode); } From ff5e1cd76b9c3794d0b5ef6ce8dd75c6225d275c Mon Sep 17 00:00:00 2001 From: meggert Date: Thu, 25 Jan 2024 13:25:11 +0100 Subject: [PATCH 23/64] reset guidance if lost --- mission/controller/AcsController.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/mission/controller/AcsController.cpp b/mission/controller/AcsController.cpp index 36d05fb2..3f44f327 100644 --- a/mission/controller/AcsController.cpp +++ b/mission/controller/AcsController.cpp @@ -412,6 +412,7 @@ void AcsController::performPointingCtrl() { triggerEvent(acs::PTG_CTRL_NO_ATTITUDE_INFORMATION); ptgCtrlLostCounter = 0; } + guidance.resetValues(); updateCtrlValData(ptgCtrlStrat); updateActuatorCmdData(ZERO_VEC4, cmdSpeedRws, ZERO_VEC3_INT16); commandActuators(0, 0, 0, acsParameters.magnetorquerParameter.torqueDuration, cmdSpeedRws[0], From 42b94ab581f2b32b7339512347f5b563f8b14455 Mon Sep 17 00:00:00 2001 From: meggert Date: Fri, 26 Jan 2024 10:50:11 +0100 Subject: [PATCH 24/64] we can only use the nullspace if all rws are available --- mission/controller/acs/control/PtgCtrl.cpp | 8 ++++++-- mission/controller/acs/control/PtgCtrl.h | 3 ++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/mission/controller/acs/control/PtgCtrl.cpp b/mission/controller/acs/control/PtgCtrl.cpp index fd5b9f29..8c3a7e7b 100644 --- a/mission/controller/acs/control/PtgCtrl.cpp +++ b/mission/controller/acs/control/PtgCtrl.cpp @@ -39,7 +39,7 @@ void PtgCtrl::ptgLaw(AcsParameters::PointingLawParameters *pointingLawParameters double qError[3] = {errorQuat[0], errorQuat[1], errorQuat[2]}; double cInt = 2 * om * zeta; - double kInt = 2 * pow(om, 2); + double kInt = 2 * om * om; double qErrorLaw[3] = {0, 0, 0}; @@ -111,9 +111,13 @@ void PtgCtrl::ptgLaw(AcsParameters::PointingLawParameters *pointingLawParameters VectorOperations::mulScalar(torqueRws, -1, torqueRws, 4); } -void PtgCtrl::ptgNullspace(AcsParameters::PointingLawParameters *pointingLawParameters, +void PtgCtrl::ptgNullspace(const bool allRwAvabilable, + AcsParameters::PointingLawParameters *pointingLawParameters, const int32_t speedRw0, const int32_t speedRw1, const int32_t speedRw2, const int32_t speedRw3, double *rwTrqNs) { + if (not allRwAvabilable) { + return; + } // concentrate RW speeds as vector and convert to double double speedRws[4] = {static_cast(speedRw0), static_cast(speedRw1), static_cast(speedRw2), static_cast(speedRw3)}; diff --git a/mission/controller/acs/control/PtgCtrl.h b/mission/controller/acs/control/PtgCtrl.h index a07849ec..66402b0d 100644 --- a/mission/controller/acs/control/PtgCtrl.h +++ b/mission/controller/acs/control/PtgCtrl.h @@ -33,7 +33,8 @@ class PtgCtrl { void ptgLaw(AcsParameters::PointingLawParameters *pointingLawParameters, const double *qError, const double *deltaRate, const double *rwPseudoInv, double *torqueRws); - void ptgNullspace(AcsParameters::PointingLawParameters *pointingLawParameters, + void ptgNullspace(const bool allRwAvabilable, + AcsParameters::PointingLawParameters *pointingLawParameters, const int32_t speedRw0, const int32_t speedRw1, const int32_t speedRw2, const int32_t speedRw3, double *rwTrqNs); From 10841a01b77a87259410fc9d125a9f90cbe05aae Mon Sep 17 00:00:00 2001 From: meggert Date: Fri, 26 Jan 2024 10:59:15 +0100 Subject: [PATCH 25/64] class id is defined here now --- mission/controller/controllerdefinitions/AcsCtrlDefinitions.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mission/controller/controllerdefinitions/AcsCtrlDefinitions.h b/mission/controller/controllerdefinitions/AcsCtrlDefinitions.h index 83a74552..78725755 100644 --- a/mission/controller/controllerdefinitions/AcsCtrlDefinitions.h +++ b/mission/controller/controllerdefinitions/AcsCtrlDefinitions.h @@ -8,6 +8,8 @@ namespace acsctrl { +static const uint8_t IF_ACS_CTRL_ID = CLASS_ID::ACS_CTRL; + enum SetIds : uint32_t { MGM_SENSOR_DATA, MGM_PROCESSED_DATA, From 7daeb9a148e08af0f4346f46e0dbeaa10ef0e654 Mon Sep 17 00:00:00 2001 From: meggert Date: Fri, 26 Jan 2024 10:59:57 +0100 Subject: [PATCH 26/64] better rw failure handling and use new classid location --- mission/controller/AcsController.cpp | 20 ++++++++++++-------- mission/controller/AcsController.h | 10 ++++++---- 2 files changed, 18 insertions(+), 12 deletions(-) diff --git a/mission/controller/AcsController.cpp b/mission/controller/AcsController.cpp index 3f44f327..2310a99b 100644 --- a/mission/controller/AcsController.cpp +++ b/mission/controller/AcsController.cpp @@ -447,9 +447,10 @@ void AcsController::performPointingCtrl() { } uint8_t enableAntiStiction = true; + bool allRwAvailable = true; double rwPseudoInv[4][3] = {{0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}}; ReturnValue_t result = guidance.getDistributionMatrixRw(&sensorValues, *rwPseudoInv); - if (result == returnvalue::FAILED) { + if (result == Guidance::MULTIPLE_RW_UNAVAILABLE) { if (multipleRwUnavailableCounter >= acsParameters.rwHandlingParameters.multipleRwInvalidTimeout) { triggerEvent(acs::MULTIPLE_RW_INVALID); @@ -457,8 +458,10 @@ void AcsController::performPointingCtrl() { } multipleRwUnavailableCounter++; return; - } else { - multipleRwUnavailableCounter = 0; + } + multipleRwUnavailableCounter = 0; + if (result == Guidance::SINGLE_RW_UNAVAILABLE) { + allRwAvailable = false; } // Variables required for guidance @@ -476,10 +479,11 @@ void AcsController::performPointingCtrl() { errorSatRotRate, errorAngle); ptgCtrl.ptgLaw(&acsParameters.idleModeControllerParameters, errorQuat, errorSatRotRate, *rwPseudoInv, torquePtgRws); - ptgCtrl.ptgNullspace(&acsParameters.idleModeControllerParameters, + ptgCtrl.ptgNullspace(allRwAvailable, &acsParameters.idleModeControllerParameters, sensorValues.rw1Set.currSpeed.value, sensorValues.rw2Set.currSpeed.value, sensorValues.rw3Set.currSpeed.value, sensorValues.rw4Set.currSpeed.value, rwTrqNs); + VectorOperations::add(torquePtgRws, rwTrqNs, torqueRws, 4); actuatorCmd.scalingTorqueRws(torqueRws, acsParameters.rwHandlingParameters.maxTrq); ptgCtrl.ptgDesaturation( @@ -500,7 +504,7 @@ void AcsController::performPointingCtrl() { errorSatRotRate, errorAngle); ptgCtrl.ptgLaw(&acsParameters.targetModeControllerParameters, errorQuat, errorSatRotRate, *rwPseudoInv, torquePtgRws); - ptgCtrl.ptgNullspace(&acsParameters.targetModeControllerParameters, + ptgCtrl.ptgNullspace(allRwAvailable, &acsParameters.targetModeControllerParameters, sensorValues.rw1Set.currSpeed.value, sensorValues.rw2Set.currSpeed.value, sensorValues.rw3Set.currSpeed.value, sensorValues.rw4Set.currSpeed.value, rwTrqNs); @@ -521,7 +525,7 @@ void AcsController::performPointingCtrl() { errorSatRotRate, errorAngle); ptgCtrl.ptgLaw(&acsParameters.gsTargetModeControllerParameters, errorQuat, errorSatRotRate, *rwPseudoInv, torquePtgRws); - ptgCtrl.ptgNullspace(&acsParameters.gsTargetModeControllerParameters, + ptgCtrl.ptgNullspace(allRwAvailable, &acsParameters.gsTargetModeControllerParameters, sensorValues.rw1Set.currSpeed.value, sensorValues.rw2Set.currSpeed.value, sensorValues.rw3Set.currSpeed.value, sensorValues.rw4Set.currSpeed.value, rwTrqNs); @@ -545,7 +549,7 @@ void AcsController::performPointingCtrl() { errorSatRotRate, errorAngle); ptgCtrl.ptgLaw(&acsParameters.nadirModeControllerParameters, errorQuat, errorSatRotRate, *rwPseudoInv, torquePtgRws); - ptgCtrl.ptgNullspace(&acsParameters.nadirModeControllerParameters, + ptgCtrl.ptgNullspace(allRwAvailable, &acsParameters.nadirModeControllerParameters, sensorValues.rw1Set.currSpeed.value, sensorValues.rw2Set.currSpeed.value, sensorValues.rw3Set.currSpeed.value, sensorValues.rw4Set.currSpeed.value, rwTrqNs); @@ -568,7 +572,7 @@ void AcsController::performPointingCtrl() { errorSatRotRate, errorAngle); ptgCtrl.ptgLaw(&acsParameters.inertialModeControllerParameters, errorQuat, errorSatRotRate, *rwPseudoInv, torquePtgRws); - ptgCtrl.ptgNullspace(&acsParameters.inertialModeControllerParameters, + ptgCtrl.ptgNullspace(allRwAvailable, &acsParameters.inertialModeControllerParameters, sensorValues.rw1Set.currSpeed.value, sensorValues.rw2Set.currSpeed.value, sensorValues.rw3Set.currSpeed.value, sensorValues.rw4Set.currSpeed.value, rwTrqNs); diff --git a/mission/controller/AcsController.h b/mission/controller/AcsController.h index aa2b9411..bb4e3c37 100644 --- a/mission/controller/AcsController.h +++ b/mission/controller/AcsController.h @@ -108,13 +108,15 @@ class AcsController : public ExtendedControllerBase, public ReceivesParameterMes static const DeviceCommandId_t UPDATE_TLE = 0x3; static const DeviceCommandId_t READ_TLE = 0x4; - static const uint8_t INTERFACE_ID = CLASS_ID::ACS_CTRL; //! [EXPORT] : [COMMENT] File deletion failed and at least one file is still existent. - static constexpr ReturnValue_t FILE_DELETION_FAILED = MAKE_RETURN_CODE(0); + static constexpr ReturnValue_t FILE_DELETION_FAILED = + returnvalue::makeCode(acsctrl::IF_ACS_CTRL_ID, 0); //! [EXPORT] : [COMMENT] Writing the TLE to the file has failed. - static constexpr ReturnValue_t WRITE_FILE_FAILED = MAKE_RETURN_CODE(1); + static constexpr ReturnValue_t WRITE_FILE_FAILED = + returnvalue::makeCode(acsctrl::IF_ACS_CTRL_ID, 1); //! [EXPORT] : [COMMENT] Reading the TLE to the file has failed. - static constexpr ReturnValue_t READ_FILE_FAILED = MAKE_RETURN_CODE(2); + static constexpr ReturnValue_t READ_FILE_FAILED = + returnvalue::makeCode(acsctrl::IF_ACS_CTRL_ID, 2); ReturnValue_t initialize() override; ReturnValue_t handleCommandMessage(CommandMessage* message) override; From c1e7ac7e9a6a44dcc0cde99a4dfee28eae49d1bc Mon Sep 17 00:00:00 2001 From: meggert Date: Fri, 26 Jan 2024 11:12:28 +0100 Subject: [PATCH 27/64] bump fsfw --- fsfw | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fsfw b/fsfw index e64e8b27..5879eb7f 160000 --- a/fsfw +++ b/fsfw @@ -1 +1 @@ -Subproject commit e64e8b274d436502d5c5b87865b9006e52e4b1aa +Subproject commit 5879eb7f7b83205c64980580c16d3aa78d6ea073 From 291c9ea99ba8763924c2be7eb8c374dea744812d Mon Sep 17 00:00:00 2001 From: meggert Date: Fri, 26 Jan 2024 11:16:59 +0100 Subject: [PATCH 28/64] calculate the rotation rate in normal way --- mission/controller/acs/Guidance.cpp | 77 +++++++++-------------------- mission/controller/acs/Guidance.h | 25 ++++++++-- 2 files changed, 44 insertions(+), 58 deletions(-) diff --git a/mission/controller/acs/Guidance.cpp b/mission/controller/acs/Guidance.cpp index 10d1393c..9ac7b5e9 100644 --- a/mission/controller/acs/Guidance.cpp +++ b/mission/controller/acs/Guidance.cpp @@ -1,15 +1,5 @@ #include "Guidance.h" -#include -#include -#include -#include -#include - -#include -#include -#include - Guidance::Guidance(AcsParameters *acsParameters_) { acsParameters = acsParameters_; } Guidance::~Guidance() {} @@ -455,44 +445,16 @@ void Guidance::comparePtg(double currentQuat[4], double currentSatRotRate[3], do } void Guidance::targetRotationRate(const int8_t timeElapsedMax, const double timeDelta, - double quatInertialTarget[4], double *refSatRate) { - //------------------------------------------------------------------------------------- - // Calculation of target rotation rate - //------------------------------------------------------------------------------------- - if (VectorOperations::norm(savedQuaternion, 4) == 0) { - std::memcpy(savedQuaternion, quatInertialTarget, sizeof(savedQuaternion)); + double quatIX[4], double *refSatRate) { + if (VectorOperations::norm(quatIXprev, 4) == 0) { + std::memcpy(quatIXprev, quatIX, sizeof(quatIXprev)); } - if (timeDelta < timeElapsedMax and timeDelta != 0.0) { - double q[4] = {0, 0, 0, 0}, qS[4] = {0, 0, 0, 0}; - QuaternionOperations::inverse(quatInertialTarget, q); - QuaternionOperations::inverse(savedQuaternion, qS); - double qDiff[4] = {0, 0, 0, 0}; - VectorOperations::subtract(q, qS, qDiff, 4); - VectorOperations::mulScalar(qDiff, 1. / timeDelta, qDiff, 4); - - double tgtQuatVec[3] = {q[0], q[1], q[2]}; - double qDiffVec[3] = {qDiff[0], qDiff[1], qDiff[2]}; - double sum1[3] = {0, 0, 0}, sum2[3] = {0, 0, 0}, sum3[3] = {0, 0, 0}, sum[3] = {0, 0, 0}; - VectorOperations::cross(tgtQuatVec, qDiffVec, sum1); - VectorOperations::mulScalar(tgtQuatVec, qDiff[3], sum2, 3); - VectorOperations::mulScalar(qDiffVec, q[3], sum3, 3); - VectorOperations::add(sum1, sum2, sum, 3); - VectorOperations::subtract(sum, sum3, sum, 3); - double omegaRefNew[3] = {0, 0, 0}; - VectorOperations::mulScalar(sum, -2, omegaRefNew, 3); - - VectorOperations::mulScalar(omegaRefNew, 2, refSatRate, 3); - VectorOperations::subtract(refSatRate, omegaRefSaved, refSatRate, 3); - omegaRefSaved[0] = omegaRefNew[0]; - omegaRefSaved[1] = omegaRefNew[1]; - omegaRefSaved[2] = omegaRefNew[2]; + if (not timeDelta != 0.0) { + QuaternionOperations::rotationFromQuaternions(quatIX, quatIXprev, timeDelta, refSatRate); } else { - refSatRate[0] = 0; - refSatRate[1] = 0; - refSatRate[2] = 0; + std::memcpy(refSatRate, ZERO_VEC3, sizeof(refSatRate)); } - - std::memcpy(savedQuaternion, quatInertialTarget, sizeof(savedQuaternion)); + std::memcpy(quatIXprev, quatIX, sizeof(quatIXprev)); } ReturnValue_t Guidance::getDistributionMatrixRw(ACS::SensorValues *sensorValues, @@ -506,22 +468,27 @@ ReturnValue_t Guidance::getDistributionMatrixRw(ACS::SensorValues *sensorValues, std::memcpy(rwPseudoInv, acsParameters->rwMatrices.pseudoInverse, 12 * sizeof(double)); return returnvalue::OK; } else if (not rw1valid and rw2valid and rw3valid and rw4valid) { - std::memcpy(rwPseudoInv, acsParameters->rwMatrices.without1, 12 * sizeof(double)); - return returnvalue::OK; + std::memcpy(rwPseudoInv, acsParameters->rwMatrices.pseudoInverseWithoutRW1, + 12 * sizeof(double)); + return SINGLE_RW_UNAVAILABLE; } else if (rw1valid and not rw2valid and rw3valid and rw4valid) { - std::memcpy(rwPseudoInv, acsParameters->rwMatrices.without2, 12 * sizeof(double)); - return returnvalue::OK; + std::memcpy(rwPseudoInv, acsParameters->rwMatrices.pseudoInverseWithoutRW2, + 12 * sizeof(double)); + return SINGLE_RW_UNAVAILABLE; } else if (rw1valid and rw2valid and not rw3valid and rw4valid) { - std::memcpy(rwPseudoInv, acsParameters->rwMatrices.without3, 12 * sizeof(double)); - return returnvalue::OK; + std::memcpy(rwPseudoInv, acsParameters->rwMatrices.pseudoInverseWithoutRW3, + 12 * sizeof(double)); + return SINGLE_RW_UNAVAILABLE; } else if (rw1valid and rw2valid and rw3valid and not rw4valid) { - std::memcpy(rwPseudoInv, acsParameters->rwMatrices.without4, 12 * sizeof(double)); - return returnvalue::OK; - } else { - return returnvalue::FAILED; + std::memcpy(rwPseudoInv, acsParameters->rwMatrices.pseudoInverseWithoutRW4, + 12 * sizeof(double)); + return SINGLE_RW_UNAVAILABLE; } + return MULTIPLE_RW_UNAVAILABLE; } +void Guidance::resetValues() { std::memcpy(quatIXprev, ZERO_VEC4, sizeof(quatIXprev)); } + void Guidance::getTargetParamsSafe(double sunTargetSafe[3]) { std::error_code e; if (not std::filesystem::exists(SD_0_SKEWED_PTG_FILE, e) or diff --git a/mission/controller/acs/Guidance.h b/mission/controller/acs/Guidance.h index 1cf5b8a9..98f77766 100644 --- a/mission/controller/acs/Guidance.h +++ b/mission/controller/acs/Guidance.h @@ -1,9 +1,18 @@ #ifndef GUIDANCE_H_ #define GUIDANCE_H_ +#include +#include +#include +#include +#include +#include #include -#include "../controllerdefinitions/AcsCtrlDefinitions.h" +#include +#include +#include + #include "AcsParameters.h" #include "SensorValues.h" @@ -14,6 +23,7 @@ class Guidance { void getTargetParamsSafe(double sunTargetSafe[3]); ReturnValue_t solarArrayDeploymentComplete(); + void resetValues(); // Function to get the target quaternion and reference rotation rate from gps position and // position of the ground station @@ -56,12 +66,21 @@ class Guidance { // reation wheel maybe can be done in "commanding.h" ReturnValue_t getDistributionMatrixRw(ACS::SensorValues *sensorValues, double *rwPseudoInv); + //! [EXPORT] : [COMMENT] A single RW has failed. + static constexpr ReturnValue_t SINGLE_RW_UNAVAILABLE = + returnvalue::makeCode(acsctrl::IF_ACS_CTRL_ID, 3); + //! [EXPORT] : [COMMENT] Multiple RWs have failed. + static constexpr ReturnValue_t MULTIPLE_RW_UNAVAILABLE = + returnvalue::makeCode(acsctrl::IF_ACS_CTRL_ID, 4); + private: const AcsParameters *acsParameters; + static constexpr double ZERO_VEC3[3] = {0, 0, 0}; + static constexpr double ZERO_VEC4[3] = {0, 0, 0, 0}; + bool strBlindAvoidFlag = false; - double savedQuaternion[4] = {0, 0, 0, 0}; - double omegaRefSaved[3] = {0, 0, 0}; + double quatIXprev[4] = {0, 0, 0, 0}; static constexpr char SD_0_SKEWED_PTG_FILE[] = "/mnt/sd0/conf/acsDeploymentConfirm"; static constexpr char SD_1_SKEWED_PTG_FILE[] = "/mnt/sd1/conf/acsDeploymentConfirm"; From 944dfb6f81218cfd97b85645cec3628b6d9b46d0 Mon Sep 17 00:00:00 2001 From: meggert Date: Fri, 26 Jan 2024 13:16:27 +0100 Subject: [PATCH 29/64] convert target rot rate into body rf --- mission/controller/acs/Guidance.cpp | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/mission/controller/acs/Guidance.cpp b/mission/controller/acs/Guidance.cpp index 9ac7b5e9..d7e8fe26 100644 --- a/mission/controller/acs/Guidance.cpp +++ b/mission/controller/acs/Guidance.cpp @@ -421,7 +421,11 @@ void Guidance::comparePtg(double currentQuat[4], double currentSatRotRate[3], do errorAngle = QuaternionOperations::getAngle(errorQuat, true); // Calculate error satellite rotational rate - // First combine the target and reference satellite rotational rates + // Convert target rotational rate into body RF + double errorQuatInv[4] = {0, 0, 0, 0}, targetSatRotRateB[3] = {0, 0, 0}; + QuaternionOperations::inverse(errorQuat, errorQuatInv); + QuaternionOperations::multiplyVector(errorQuat, targetSatRotRate, targetSatRotRateB); + // Combine the target and reference satellite rotational rates double combinedRefSatRotRate[3] = {0, 0, 0}; VectorOperations::add(targetSatRotRate, refSatRotRate, combinedRefSatRotRate, 3); // Then subtract the combined required satellite rotational rates from the actual rate From 588612875d67a78eb780aac76f56ec322dae3420 Mon Sep 17 00:00:00 2001 From: meggert Date: Fri, 26 Jan 2024 13:36:51 +0100 Subject: [PATCH 30/64] this is not not funny --- mission/controller/acs/Guidance.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mission/controller/acs/Guidance.cpp b/mission/controller/acs/Guidance.cpp index d7e8fe26..185158d5 100644 --- a/mission/controller/acs/Guidance.cpp +++ b/mission/controller/acs/Guidance.cpp @@ -453,10 +453,10 @@ void Guidance::targetRotationRate(const int8_t timeElapsedMax, const double time if (VectorOperations::norm(quatIXprev, 4) == 0) { std::memcpy(quatIXprev, quatIX, sizeof(quatIXprev)); } - if (not timeDelta != 0.0) { + if (timeDelta != 0.0) { QuaternionOperations::rotationFromQuaternions(quatIX, quatIXprev, timeDelta, refSatRate); } else { - std::memcpy(refSatRate, ZERO_VEC3, sizeof(refSatRate)); + std::memcpy(refSatRate, ZERO_VEC3, 3 * sizeof(double)); } std::memcpy(quatIXprev, quatIX, sizeof(quatIXprev)); } From 2f296c3c8c444c227a89d1bf860aaec2afacac80 Mon Sep 17 00:00:00 2001 From: meggert Date: Fri, 26 Jan 2024 13:37:30 +0100 Subject: [PATCH 31/64] whoopsies --- mission/controller/acs/Guidance.h | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/mission/controller/acs/Guidance.h b/mission/controller/acs/Guidance.h index 98f77766..f6319c7b 100644 --- a/mission/controller/acs/Guidance.h +++ b/mission/controller/acs/Guidance.h @@ -5,6 +5,8 @@ #include #include #include +#include +#include #include #include #include @@ -13,9 +15,6 @@ #include #include -#include "AcsParameters.h" -#include "SensorValues.h" - class Guidance { public: Guidance(AcsParameters *acsParameters_); @@ -77,7 +76,7 @@ class Guidance { const AcsParameters *acsParameters; static constexpr double ZERO_VEC3[3] = {0, 0, 0}; - static constexpr double ZERO_VEC4[3] = {0, 0, 0, 0}; + static constexpr double ZERO_VEC4[4] = {0, 0, 0, 0}; bool strBlindAvoidFlag = false; double quatIXprev[4] = {0, 0, 0, 0}; From ec3523e5adc5b455bf2875f75d5f88ee302134df Mon Sep 17 00:00:00 2001 From: meggert Date: Fri, 26 Jan 2024 15:36:01 +0100 Subject: [PATCH 32/64] cleanup --- mission/controller/acs/util/MathOperations.h | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/mission/controller/acs/util/MathOperations.h b/mission/controller/acs/util/MathOperations.h index dd4c3f57..023e9379 100644 --- a/mission/controller/acs/util/MathOperations.h +++ b/mission/controller/acs/util/MathOperations.h @@ -4,15 +4,12 @@ #include #include #include -#include -#include -#include +#include #include +#include #include -#include "fsfw/serviceinterface.h" - template class MathOperations { public: @@ -46,7 +43,7 @@ class MathOperations { static void selectionSort(const T1 *matrix, T1 *result, uint8_t rowSize, uint8_t colSize) { int min_idx; T1 temp; - memcpy(result, matrix, rowSize * colSize * sizeof(*result)); + std::memcpy(result, matrix, rowSize * colSize * sizeof(*result)); // One by one move boundary of unsorted subarray for (int k = 0; k < rowSize; k++) { for (int i = 0; i < colSize - 1; i++) { From 26f69d611e260e068c1c71c52028701e7cbf0938 Mon Sep 17 00:00:00 2001 From: meggert Date: Fri, 26 Jan 2024 15:45:24 +0100 Subject: [PATCH 33/64] never try sending invalid command --- mission/controller/acs/control/PtgCtrl.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mission/controller/acs/control/PtgCtrl.cpp b/mission/controller/acs/control/PtgCtrl.cpp index fd5b9f29..e1069aba 100644 --- a/mission/controller/acs/control/PtgCtrl.cpp +++ b/mission/controller/acs/control/PtgCtrl.cpp @@ -220,6 +220,8 @@ void PtgCtrl::rwAntistiction(ACS::SensorValues *sensorValues, int32_t *rwCmdSpee } } } + } else { + rwCmdSpeeds[i] = 0.0; } } } From 5f388d53a6b0742ae758d2841e36335196bb2ad3 Mon Sep 17 00:00:00 2001 From: meggert Date: Sat, 27 Jan 2024 10:33:49 +0100 Subject: [PATCH 34/64] reset RW cmds to 0 if they are not used anymore --- mission/controller/AcsController.cpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/mission/controller/AcsController.cpp b/mission/controller/AcsController.cpp index 8e7ae8d4..43e2ccb6 100644 --- a/mission/controller/AcsController.cpp +++ b/mission/controller/AcsController.cpp @@ -885,6 +885,24 @@ ReturnValue_t AcsController::checkModeCommand(Mode_t mode, Submode_t submode, } void AcsController::modeChanged(Mode_t mode, Submode_t submode) { + if (mode == acs::AcsMode::SAFE) { + { + PoolReadGuard pg(&rw1SpeedSet); + rw1SpeedSet.setRwSpeed(0, 10); + } + { + PoolReadGuard pg(&rw2SpeedSet); + rw2SpeedSet.setRwSpeed(0, 10); + } + { + PoolReadGuard pg(&rw3SpeedSet); + rw3SpeedSet.setRwSpeed(0, 10); + } + { + PoolReadGuard pg(&rw4SpeedSet); + rw4SpeedSet.setRwSpeed(0, 10); + } + } return ExtendedControllerBase::modeChanged(mode, submode); } From 6cf746463b4f75c6be636af027b06fe82bb84cf2 Mon Sep 17 00:00:00 2001 From: meggert Date: Sat, 27 Jan 2024 10:35:33 +0100 Subject: [PATCH 35/64] is of type int --- mission/controller/acs/control/PtgCtrl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mission/controller/acs/control/PtgCtrl.cpp b/mission/controller/acs/control/PtgCtrl.cpp index e1069aba..a7ed422a 100644 --- a/mission/controller/acs/control/PtgCtrl.cpp +++ b/mission/controller/acs/control/PtgCtrl.cpp @@ -221,7 +221,7 @@ void PtgCtrl::rwAntistiction(ACS::SensorValues *sensorValues, int32_t *rwCmdSpee } } } else { - rwCmdSpeeds[i] = 0.0; + rwCmdSpeeds[i] = 0; } } } From 315365921ec2825ef82cd0aa1cf8406357257b2f Mon Sep 17 00:00:00 2001 From: meggert Date: Sat, 27 Jan 2024 10:37:39 +0100 Subject: [PATCH 36/64] changelog --- CHANGELOG.md | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8202cea7..8e866eb0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,13 @@ will consitute of a breaking change warranting a new major release: # [unreleased] +## Fixed + +- RW speed commands get reset to 0 RPM, if the `AcsController` is has changed its mode + to Safe +- Antistiction for RWs will set commanded speed to 0 RPM, if a wheel is detected as not + working + # [v7.5.5] 2024-01-22 ## Fixed From 772e8f11492dd837a8c8a4a5430179f1873b5840 Mon Sep 17 00:00:00 2001 From: meggert Date: Sat, 27 Jan 2024 10:45:00 +0100 Subject: [PATCH 37/64] enableAntistiction must not be optional as it prevents the ACS ctrl from sending invalid speed cmds --- mission/controller/AcsController.cpp | 10 +--- mission/controller/acs/AcsParameters.cpp | 61 +++++++++--------------- mission/controller/acs/AcsParameters.h | 1 - 3 files changed, 24 insertions(+), 48 deletions(-) diff --git a/mission/controller/AcsController.cpp b/mission/controller/AcsController.cpp index 43e2ccb6..410ee81d 100644 --- a/mission/controller/AcsController.cpp +++ b/mission/controller/AcsController.cpp @@ -445,7 +445,6 @@ void AcsController::performPointingCtrl() { break; } - uint8_t enableAntiStiction = true; double rwPseudoInv[4][3] = {{0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}}; ReturnValue_t result = guidance.getDistributionMatrixRw(&sensorValues, *rwPseudoInv); if (result == returnvalue::FAILED) { @@ -486,7 +485,6 @@ void AcsController::performPointingCtrl() { mgmDataProcessed.mgmVecTot.isValid(), rotRateB, sensorValues.rw1Set.currSpeed.value, sensorValues.rw2Set.currSpeed.value, sensorValues.rw3Set.currSpeed.value, sensorValues.rw4Set.currSpeed.value, mgtDpDes); - enableAntiStiction = acsParameters.idleModeControllerParameters.enableAntiStiction; break; case acs::PTG_TARGET: @@ -510,7 +508,6 @@ void AcsController::performPointingCtrl() { mgmDataProcessed.mgmVecTot.isValid(), rotRateB, sensorValues.rw1Set.currSpeed.value, sensorValues.rw2Set.currSpeed.value, sensorValues.rw3Set.currSpeed.value, sensorValues.rw4Set.currSpeed.value, mgtDpDes); - enableAntiStiction = acsParameters.targetModeControllerParameters.enableAntiStiction; break; case acs::PTG_TARGET_GS: @@ -531,7 +528,6 @@ void AcsController::performPointingCtrl() { mgmDataProcessed.mgmVecTot.isValid(), rotRateB, sensorValues.rw1Set.currSpeed.value, sensorValues.rw2Set.currSpeed.value, sensorValues.rw3Set.currSpeed.value, sensorValues.rw4Set.currSpeed.value, mgtDpDes); - enableAntiStiction = acsParameters.gsTargetModeControllerParameters.enableAntiStiction; break; case acs::PTG_NADIR: @@ -555,7 +551,6 @@ void AcsController::performPointingCtrl() { mgmDataProcessed.mgmVecTot.isValid(), rotRateB, sensorValues.rw1Set.currSpeed.value, sensorValues.rw2Set.currSpeed.value, sensorValues.rw3Set.currSpeed.value, sensorValues.rw4Set.currSpeed.value, mgtDpDes); - enableAntiStiction = acsParameters.nadirModeControllerParameters.enableAntiStiction; break; case acs::PTG_INERTIAL: @@ -578,7 +573,6 @@ void AcsController::performPointingCtrl() { mgmDataProcessed.mgmVecTot.isValid(), rotRateB, sensorValues.rw1Set.currSpeed.value, sensorValues.rw2Set.currSpeed.value, sensorValues.rw3Set.currSpeed.value, sensorValues.rw4Set.currSpeed.value, mgtDpDes); - enableAntiStiction = acsParameters.inertialModeControllerParameters.enableAntiStiction; break; default: sif::error << "AcsController: Invalid mode for performPointingCtrl" << std::endl; @@ -590,9 +584,7 @@ void AcsController::performPointingCtrl() { sensorValues.rw3Set.currSpeed.value, sensorValues.rw4Set.currSpeed.value, acsParameters.onBoardParams.sampleTime, acsParameters.rwHandlingParameters.inertiaWheel, acsParameters.rwHandlingParameters.maxRwSpeed, torqueRws, cmdSpeedRws); - if (enableAntiStiction) { - ptgCtrl.rwAntistiction(&sensorValues, cmdSpeedRws); - } + ptgCtrl.rwAntistiction(&sensorValues, cmdSpeedRws); actuatorCmd.cmdDipoleMtq(*acsParameters.magnetorquerParameter.inverseAlignment, acsParameters.magnetorquerParameter.dipoleMax, mgtDpDes, cmdDipoleMtqs); diff --git a/mission/controller/acs/AcsParameters.cpp b/mission/controller/acs/AcsParameters.cpp index a6ce6c5d..4eb11246 100644 --- a/mission/controller/acs/AcsParameters.cpp +++ b/mission/controller/acs/AcsParameters.cpp @@ -432,9 +432,6 @@ ReturnValue_t AcsParameters::getParameter(uint8_t domainId, uint8_t parameterId, parameterWrapper->set(idleModeControllerParameters.desatOn); break; case 0x9: - parameterWrapper->set(idleModeControllerParameters.enableAntiStiction); - break; - case 0xA: parameterWrapper->set(idleModeControllerParameters.useMekf); break; default: @@ -471,42 +468,39 @@ ReturnValue_t AcsParameters::getParameter(uint8_t domainId, uint8_t parameterId, parameterWrapper->set(targetModeControllerParameters.desatOn); break; case 0x9: - parameterWrapper->set(targetModeControllerParameters.enableAntiStiction); - break; - case 0xA: parameterWrapper->set(targetModeControllerParameters.useMekf); break; - case 0xB: + case 0xA: parameterWrapper->setVector(targetModeControllerParameters.refDirection); break; - case 0xC: + case 0xB: parameterWrapper->setVector(targetModeControllerParameters.refRotRate); break; - case 0xD: + case 0xC: parameterWrapper->setVector(targetModeControllerParameters.quatRef); break; - case 0xE: + case 0xD: parameterWrapper->set(targetModeControllerParameters.timeElapsedMax); break; - case 0xF: + case 0xE: parameterWrapper->set(targetModeControllerParameters.latitudeTgt); break; - case 0x10: + case 0xF: parameterWrapper->set(targetModeControllerParameters.longitudeTgt); break; - case 0x11: + case 0x10: parameterWrapper->set(targetModeControllerParameters.altitudeTgt); break; - case 0x12: + case 0x11: parameterWrapper->set(targetModeControllerParameters.avoidBlindStr); break; - case 0x13: + case 0x12: parameterWrapper->set(targetModeControllerParameters.blindAvoidStart); break; - case 0x14: + case 0x13: parameterWrapper->set(targetModeControllerParameters.blindAvoidStop); break; - case 0x15: + case 0x14: parameterWrapper->set(targetModeControllerParameters.blindRotRate); break; default: @@ -543,24 +537,21 @@ ReturnValue_t AcsParameters::getParameter(uint8_t domainId, uint8_t parameterId, parameterWrapper->set(gsTargetModeControllerParameters.desatOn); break; case 0x9: - parameterWrapper->set(gsTargetModeControllerParameters.enableAntiStiction); - break; - case 0xA: parameterWrapper->set(gsTargetModeControllerParameters.useMekf); break; - case 0xB: + case 0xA: parameterWrapper->setVector(gsTargetModeControllerParameters.refDirection); break; - case 0xC: + case 0xB: parameterWrapper->set(gsTargetModeControllerParameters.timeElapsedMax); break; - case 0xD: + case 0xC: parameterWrapper->set(gsTargetModeControllerParameters.latitudeTgt); break; - case 0xE: + case 0xD: parameterWrapper->set(gsTargetModeControllerParameters.longitudeTgt); break; - case 0xF: + case 0xE: parameterWrapper->set(gsTargetModeControllerParameters.altitudeTgt); break; default: @@ -597,21 +588,18 @@ ReturnValue_t AcsParameters::getParameter(uint8_t domainId, uint8_t parameterId, parameterWrapper->set(nadirModeControllerParameters.desatOn); break; case 0x9: - parameterWrapper->set(nadirModeControllerParameters.enableAntiStiction); - break; - case 0xA: parameterWrapper->set(nadirModeControllerParameters.useMekf); break; - case 0xB: + case 0xA: parameterWrapper->setVector(nadirModeControllerParameters.refDirection); break; - case 0xC: + case 0xB: parameterWrapper->setVector(nadirModeControllerParameters.quatRef); break; - case 0xD: + case 0xC: parameterWrapper->setVector(nadirModeControllerParameters.refRotRate); break; - case 0xE: + case 0xD: parameterWrapper->set(nadirModeControllerParameters.timeElapsedMax); break; default: @@ -648,18 +636,15 @@ ReturnValue_t AcsParameters::getParameter(uint8_t domainId, uint8_t parameterId, parameterWrapper->set(inertialModeControllerParameters.desatOn); break; case 0x9: - parameterWrapper->set(inertialModeControllerParameters.enableAntiStiction); - break; - case 0xA: parameterWrapper->set(inertialModeControllerParameters.useMekf); break; - case 0xB: + case 0xA: parameterWrapper->setVector(inertialModeControllerParameters.tgtQuat); break; - case 0xC: + case 0xB: parameterWrapper->setVector(inertialModeControllerParameters.refRotRate); break; - case 0xD: + case 0xC: parameterWrapper->setVector(inertialModeControllerParameters.quatRef); break; default: diff --git a/mission/controller/acs/AcsParameters.h b/mission/controller/acs/AcsParameters.h index f11a673b..d58a2d44 100644 --- a/mission/controller/acs/AcsParameters.h +++ b/mission/controller/acs/AcsParameters.h @@ -863,7 +863,6 @@ class AcsParameters : public HasParametersIF { double desatMomentumRef[3] = {0, 0, 0}; double deSatGainFactor = 1000; uint8_t desatOn = true; - uint8_t enableAntiStiction = true; uint8_t useMekf = false; } pointingLawParameters; From c4297975ff77b87d0b5546fe7caf8fa7f54eda7c Mon Sep 17 00:00:00 2001 From: meggert Date: Sat, 27 Jan 2024 10:47:42 +0100 Subject: [PATCH 38/64] changelog --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8e866eb0..dbbcd40b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -22,6 +22,9 @@ will consitute of a breaking change warranting a new major release: to Safe - Antistiction for RWs will set commanded speed to 0 RPM, if a wheel is detected as not working +- Removed parameter to disable antistiction, as deactivating it would result in the + `AcsController` being allowed sending invalid speed commands to the RW Handler, which + would then trigger FDIR and turning off the functioning device # [v7.5.5] 2024-01-22 From 398ddd1a3fca50998206aca89ac2e1cdaeaebe50 Mon Sep 17 00:00:00 2001 From: meggert Date: Sat, 27 Jan 2024 11:30:37 +0100 Subject: [PATCH 39/64] typo --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index dbbcd40b..57dc0902 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,7 +18,7 @@ will consitute of a breaking change warranting a new major release: ## Fixed -- RW speed commands get reset to 0 RPM, if the `AcsController` is has changed its mode +- RW speed commands get reset to 0 RPM, if the `AcsController` has changed its mode to Safe - Antistiction for RWs will set commanded speed to 0 RPM, if a wheel is detected as not working From 0d7f5d5dcafdddc0269f8de189513da6b4cee8f3 Mon Sep 17 00:00:00 2001 From: meggert Date: Sat, 27 Jan 2024 11:32:23 +0100 Subject: [PATCH 40/64] prevent use of if_id of DHB for rw rtvals --- mission/acs/RwHandler.h | 1 + 1 file changed, 1 insertion(+) diff --git a/mission/acs/RwHandler.h b/mission/acs/RwHandler.h index a8903b81..87689fe6 100644 --- a/mission/acs/RwHandler.h +++ b/mission/acs/RwHandler.h @@ -59,6 +59,7 @@ class RwHandler : public DeviceHandlerBase { LocalPoolDataSetBase* getDataSetHandle(sid_t sid) override; private: + static const uint8_t INTERFACE_ID = CLASS_ID::RW_HANDLER; //! [EXPORT] : [COMMENT] Action Message with invalid speed was received. Valid speeds must be in //! the range of [-65000; 1000] or [1000; 65000] static const ReturnValue_t INVALID_SPEED = MAKE_RETURN_CODE(0xA0); From 060217fbb4825cdf19a346ab131bbf89f35ff853 Mon Sep 17 00:00:00 2001 From: meggert Date: Sat, 27 Jan 2024 11:33:33 +0100 Subject: [PATCH 41/64] changelog --- CHANGELOG.md | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 57dc0902..33d9eeae 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -25,6 +25,7 @@ will consitute of a breaking change warranting a new major release: - Removed parameter to disable antistiction, as deactivating it would result in the `AcsController` being allowed sending invalid speed commands to the RW Handler, which would then trigger FDIR and turning off the functioning device +- `RwHandler` returnvalues would use the `INTERFACE_ID` of the `DeviceHandlerBase` # [v7.5.5] 2024-01-22 From ec2b026103e14dd334c6d269f7cdf4f3afaa3a7b Mon Sep 17 00:00:00 2001 From: meggert Date: Sat, 27 Jan 2024 12:50:58 +0100 Subject: [PATCH 42/64] fix? --- mission/controller/controllerdefinitions/AcsCtrlDefinitions.h | 1 + 1 file changed, 1 insertion(+) diff --git a/mission/controller/controllerdefinitions/AcsCtrlDefinitions.h b/mission/controller/controllerdefinitions/AcsCtrlDefinitions.h index 78725755..7de3e36e 100644 --- a/mission/controller/controllerdefinitions/AcsCtrlDefinitions.h +++ b/mission/controller/controllerdefinitions/AcsCtrlDefinitions.h @@ -1,6 +1,7 @@ #ifndef MISSION_CONTROLLER_CONTROLLERDEFINITIONS_ACSCTRLDEFINITIONS_H_ #define MISSION_CONTROLLER_CONTROLLERDEFINITIONS_ACSCTRLDEFINITIONS_H_ +#include #include #include From ba6eac505e97d3bd9e8bc1ebe415e9495b467cdf Mon Sep 17 00:00:00 2001 From: meggert Date: Sat, 27 Jan 2024 13:58:17 +0100 Subject: [PATCH 43/64] we prob need a state machine here --- mission/acs/defs.h | 6 +++-- mission/controller/AcsController.cpp | 36 ++++++++++++++++++++-------- mission/controller/AcsController.h | 3 +++ 3 files changed, 33 insertions(+), 12 deletions(-) diff --git a/mission/acs/defs.h b/mission/acs/defs.h index 3a62b51f..67fcf024 100644 --- a/mission/acs/defs.h +++ b/mission/acs/defs.h @@ -66,8 +66,10 @@ enum Source : uint8_t { static const uint8_t SUBSYSTEM_ID = SUBSYSTEM_ID::ACS_SUBSYSTEM; //! [EXPORT] : [COMMENT] The limits for the rotation in safe mode were violated. static constexpr Event SAFE_RATE_VIOLATION = MAKE_EVENT(0, severity::MEDIUM); -//! [EXPORT] : [COMMENT] The system has recovered from a safe rate rotation violation. -static constexpr Event SAFE_RATE_RECOVERY = MAKE_EVENT(1, severity::MEDIUM); +//! [EXPORT] : [COMMENT] The limits for the rotation in pointing mode were violated. +static constexpr Event PTG_RATE_VIOLATION = MAKE_EVENT(10, severity::MEDIUM); +//! [EXPORT] : [COMMENT] The system has recovered from a rate rotation violation. +static constexpr Event RATE_RECOVERY = MAKE_EVENT(1, severity::MEDIUM); //! [EXPORT] : [COMMENT] Multiple RWs are invalid, uncommandable and therefore higher ACS modes //! cannot be maintained. static constexpr Event MULTIPLE_RW_INVALID = MAKE_EVENT(2, severity::HIGH); diff --git a/mission/controller/AcsController.cpp b/mission/controller/AcsController.cpp index 4980cbcd..9ed6b1c5 100644 --- a/mission/controller/AcsController.cpp +++ b/mission/controller/AcsController.cpp @@ -179,22 +179,38 @@ void AcsController::performAttitudeControl() { &susDataProcessed, &attitudeEstimationData, &acsParameters); if (not submode == acs::SafeSubmode::DETUMBLE) { - if (acsParameters.safeModeControllerParameters.useMekf) { - if (mgmDataProcessed.mgmVecTotDerivative.isValid() and - VectorOperations::norm(mgmDataProcessed.mgmVecTotDerivative.value, - 3) > // units do not agree + } + + switch (detumbleState) { + case DetumbleState::NO_DETUMBLE: + if (fusedRotRateData.rotRateTotal.isValid() and + VectorOperations::norm(fusedRotRateData.rotRateTotal.value, 3) > acsParameters.detumbleParameter.omegaDetumbleStart) { detumbleCounter++; + } else if (detumbleCounter > 0) { + detumbleCounter -= 1; } - } else if (detumbleCounter > 0) { - detumbleCounter -= 1; - } - if (detumbleCounter > acsParameters.detumbleParameter.detumblecounter) { + if (detumbleCounter > acsParameters.detumbleParameter.detumblecounter) { + if (mode == acs::AcsMode::SAFE) { + detumbleState = DetumbleState::DETUMBLE_FROM_SAFE; + break; + } + detumbleState = DetumbleState::DETUMBLE_FROM_PTG; + } + break; + case DetumbleState::DETUMBLE_FROM_PTG: + triggerEvent(acs::PTG_RATE_VIOLATION); + break; + case DetumbleState::DETUMBLE_FROM_SAFE: detumbleCounter = 0; // Triggers detumble mode transition in subsystem triggerEvent(acs::SAFE_RATE_VIOLATION); - startTransition(mode, acs::SafeSubmode::DETUMBLE); // this does not work - } + startTransition(mode, acs::SafeSubmode::DETUMBLE); + break; + case DetumbleState::IN_DETUMBLE: + break; + default: + sif::error << "AcsController: Invalid DetumbleState: " << detumbleState << std::endl; } if (result != MultiplicativeKalmanFilter::MEKF_RUNNING and diff --git a/mission/controller/AcsController.h b/mission/controller/AcsController.h index aa2b9411..2d832f4f 100644 --- a/mission/controller/AcsController.h +++ b/mission/controller/AcsController.h @@ -101,6 +101,9 @@ class AcsController : public ExtendedControllerBase, public ReceivesParameterMes enum class InternalState { STARTUP, INITIAL_DELAY, READY }; InternalState internalState = InternalState::STARTUP; + enum class DetumbleState { NO_DETUMBLE, DETUMBLE_FROM_SAFE, DETUMBLE_FROM_PTG, IN_DETUMBLE }; + DetumbleState detumbleState = DetumbleState::NO_DETUMBLE; + /** Device command IDs */ static const DeviceCommandId_t SOLAR_ARRAY_DEPLOYMENT_SUCCESSFUL = 0x0; static const DeviceCommandId_t RESET_MEKF = 0x1; From c67f65369c6bdd75475d88faf6659bbaf79a93fb Mon Sep 17 00:00:00 2001 From: meggert Date: Mon, 29 Jan 2024 09:32:01 +0100 Subject: [PATCH 44/64] acs ctrl state machine done --- mission/controller/AcsController.cpp | 117 +++++++++++++-------------- mission/controller/AcsController.h | 20 +++-- 2 files changed, 69 insertions(+), 68 deletions(-) diff --git a/mission/controller/AcsController.cpp b/mission/controller/AcsController.cpp index 9ed6b1c5..f6aac85b 100644 --- a/mission/controller/AcsController.cpp +++ b/mission/controller/AcsController.cpp @@ -178,41 +178,6 @@ void AcsController::performAttitudeControl() { result = navigation.useMekf(&sensorValues, &gyrDataProcessed, &mgmDataProcessed, &susDataProcessed, &attitudeEstimationData, &acsParameters); - if (not submode == acs::SafeSubmode::DETUMBLE) { - } - - switch (detumbleState) { - case DetumbleState::NO_DETUMBLE: - if (fusedRotRateData.rotRateTotal.isValid() and - VectorOperations::norm(fusedRotRateData.rotRateTotal.value, 3) > - acsParameters.detumbleParameter.omegaDetumbleStart) { - detumbleCounter++; - } else if (detumbleCounter > 0) { - detumbleCounter -= 1; - } - if (detumbleCounter > acsParameters.detumbleParameter.detumblecounter) { - if (mode == acs::AcsMode::SAFE) { - detumbleState = DetumbleState::DETUMBLE_FROM_SAFE; - break; - } - detumbleState = DetumbleState::DETUMBLE_FROM_PTG; - } - break; - case DetumbleState::DETUMBLE_FROM_PTG: - triggerEvent(acs::PTG_RATE_VIOLATION); - break; - case DetumbleState::DETUMBLE_FROM_SAFE: - detumbleCounter = 0; - // Triggers detumble mode transition in subsystem - triggerEvent(acs::SAFE_RATE_VIOLATION); - startTransition(mode, acs::SafeSubmode::DETUMBLE); - break; - case DetumbleState::IN_DETUMBLE: - break; - default: - sif::error << "AcsController: Invalid DetumbleState: " << detumbleState << std::endl; - } - if (result != MultiplicativeKalmanFilter::MEKF_RUNNING and result != MultiplicativeKalmanFilter::MEKF_INITIALIZED) { if (not mekfInvalidFlag) { @@ -354,33 +319,6 @@ void AcsController::performDetumble() { actuatorCmd.cmdDipoleMtq(*acsParameters.magnetorquerParameter.inverseAlignment, acsParameters.magnetorquerParameter.dipoleMax, magMomMtq, cmdDipoleMtqs); - if (acsParameters.safeModeControllerParameters.useMekf) { - if (attitudeEstimationData.satRotRateMekf.isValid() and - VectorOperations::norm(attitudeEstimationData.satRotRateMekf.value, 3) < - acsParameters.detumbleParameter.omegaDetumbleEnd) { - detumbleCounter++; - } - } else if (acsParameters.safeModeControllerParameters.useGyr) { - if (gyrDataProcessed.gyrVecTot.isValid() and - VectorOperations::norm(gyrDataProcessed.gyrVecTot.value, 3) < - acsParameters.detumbleParameter.omegaDetumbleEnd) { - detumbleCounter++; - } - } else if (fusedRotRateData.rotRateTotal.isValid() and - VectorOperations::norm(fusedRotRateData.rotRateTotal.value, 3) < - acsParameters.detumbleParameter.omegaDetumbleEnd) { - detumbleCounter++; - } else if (detumbleCounter > 0) { - detumbleCounter -= 1; - } - - if (detumbleCounter > acsParameters.detumbleParameter.detumblecounter) { - detumbleCounter = 0; - // Triggers safe mode transition in subsystem - triggerEvent(acs::SAFE_RATE_RECOVERY); - startTransition(mode, acs::SafeSubmode::DEFAULT); - } - updateCtrlValData(safeCtrlStrat); updateActuatorCmdData(cmdDipoleMtqs); commandActuators(cmdDipoleMtqs[0], cmdDipoleMtqs[1], cmdDipoleMtqs[2], @@ -612,6 +550,61 @@ void AcsController::performPointingCtrl() { acsParameters.rwHandlingParameters.rampTime); } +void AcsController::handleDetumbling() { + switch (detumbleState) { + case DetumbleState::NO_DETUMBLE: + if (fusedRotRateData.rotRateTotal.isValid() and + VectorOperations::norm(fusedRotRateData.rotRateTotal.value, 3) > + acsParameters.detumbleParameter.omegaDetumbleStart) { + detumbleCounter++; + } else if (detumbleCounter > 0) { + detumbleCounter -= 1; + } + if (detumbleCounter > acsParameters.detumbleParameter.detumblecounter) { + if (mode == acs::AcsMode::SAFE) { + detumbleState = DetumbleState::DETUMBLE_FROM_SAFE; + break; + } + detumbleState = DetumbleState::DETUMBLE_FROM_PTG; + } + break; + case DetumbleState::DETUMBLE_FROM_PTG: + triggerEvent(acs::PTG_RATE_VIOLATION); + detumbleState = DetumbleState::PTG_TO_SAFE_TRANSITION; + break; + case DetumbleState::PTG_TO_SAFE_TRANSITION: + if (mode == acs::AcsMode::SAFE) { + detumbleState = DetumbleState::DETUMBLE_FROM_SAFE; + } + break; + case DetumbleState::DETUMBLE_FROM_SAFE: + detumbleCounter = 0; + // Triggers detumble mode transition in subsystem + triggerEvent(acs::SAFE_RATE_VIOLATION); + startTransition(mode, acs::SafeSubmode::DETUMBLE); + break; + case DetumbleState::IN_DETUMBLE: + if (fusedRotRateData.rotRateTotal.isValid() and + VectorOperations::norm(fusedRotRateData.rotRateTotal.value, 3) < + acsParameters.detumbleParameter.omegaDetumbleEnd) { + detumbleCounter++; + } else if (detumbleCounter > 0) { + detumbleCounter -= 1; + } + + if (detumbleCounter > acsParameters.detumbleParameter.detumblecounter) { + detumbleCounter = 0; + // Triggers safe mode transition in subsystem + triggerEvent(acs::RATE_RECOVERY); + startTransition(mode, acs::SafeSubmode::DEFAULT); + detumbleState = DetumbleState::NO_DETUMBLE; + } + break; + default: + sif::error << "AcsController: Invalid DetumbleState: " << detumbleState << std::endl; + } +} + void AcsController::safeCtrlFailure(uint8_t mgmFailure, uint8_t sensorFailure) { if (not safeCtrlFailureFlag) { triggerEvent(acs::SAFE_MODE_CONTROLLER_FAILURE, mgmFailure, sensorFailure); diff --git a/mission/controller/AcsController.h b/mission/controller/AcsController.h index 2d832f4f..2383c381 100644 --- a/mission/controller/AcsController.h +++ b/mission/controller/AcsController.h @@ -46,11 +46,6 @@ class AcsController : public ExtendedControllerBase, public ReceivesParameterMes uint16_t startAtIndex) override; protected: - void performAttitudeControl(); - void performSafe(); - void performDetumble(); - void performPointingCtrl(); - private: static constexpr int16_t ZERO_VEC3_INT16[3] = {0, 0, 0}; static constexpr double ZERO_VEC3[3] = {0, 0, 0}; @@ -101,7 +96,13 @@ class AcsController : public ExtendedControllerBase, public ReceivesParameterMes enum class InternalState { STARTUP, INITIAL_DELAY, READY }; InternalState internalState = InternalState::STARTUP; - enum class DetumbleState { NO_DETUMBLE, DETUMBLE_FROM_SAFE, DETUMBLE_FROM_PTG, IN_DETUMBLE }; + enum class DetumbleState { + NO_DETUMBLE, + DETUMBLE_FROM_PTG, + PTG_TO_SAFE_TRANSITION, + DETUMBLE_FROM_SAFE, + IN_DETUMBLE + }; DetumbleState detumbleState = DetumbleState::NO_DETUMBLE; /** Device command IDs */ @@ -137,6 +138,13 @@ class AcsController : public ExtendedControllerBase, public ReceivesParameterMes void modeChanged(Mode_t mode, Submode_t submode); void announceMode(bool recursive); + void performAttitudeControl(); + void performSafe(); + void performDetumble(); + void performPointingCtrl(); + + void handleDetumbling(); + void safeCtrlFailure(uint8_t mgmFailure, uint8_t sensorFailure); ReturnValue_t commandActuators(int16_t xDipole, int16_t yDipole, int16_t zDipole, From 3441365c65e13050794473a3ae182b5188f4c194 Mon Sep 17 00:00:00 2001 From: meggert Date: Mon, 29 Jan 2024 10:10:36 +0100 Subject: [PATCH 45/64] some fixes --- mission/controller/AcsController.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/mission/controller/AcsController.cpp b/mission/controller/AcsController.cpp index f6aac85b..504a8587 100644 --- a/mission/controller/AcsController.cpp +++ b/mission/controller/AcsController.cpp @@ -195,6 +195,8 @@ void AcsController::performAttitudeControl() { mekfInvalidFlag = false; } + handleDetumbling(); + switch (mode) { case acs::SAFE: switch (submode) { @@ -582,6 +584,7 @@ void AcsController::handleDetumbling() { // Triggers detumble mode transition in subsystem triggerEvent(acs::SAFE_RATE_VIOLATION); startTransition(mode, acs::SafeSubmode::DETUMBLE); + detumbleState = DetumbleState::IN_DETUMBLE; break; case DetumbleState::IN_DETUMBLE: if (fusedRotRateData.rotRateTotal.isValid() and @@ -601,7 +604,7 @@ void AcsController::handleDetumbling() { } break; default: - sif::error << "AcsController: Invalid DetumbleState: " << detumbleState << std::endl; + sif::error << "AcsController: Invalid DetumbleState" << std::endl; } } From bec57f98c0e5cdea9e40d84332c4cc8747dc9725 Mon Sep 17 00:00:00 2001 From: meggert Date: Mon, 29 Jan 2024 10:10:59 +0100 Subject: [PATCH 46/64] handle fallback to safe in case of rate violation --- mission/system/EiveSystem.cpp | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/mission/system/EiveSystem.cpp b/mission/system/EiveSystem.cpp index cd450502..bb0f5e69 100644 --- a/mission/system/EiveSystem.cpp +++ b/mission/system/EiveSystem.cpp @@ -174,6 +174,7 @@ ReturnValue_t EiveSystem::initialize() { manager->subscribeToEvent(eventQueue->getId(), event::getEventId(pdec::INVALID_TC_FRAME)); manager->subscribeToEvent(eventQueue->getId(), event::getEventId(power::POWER_LEVEL_LOW)); manager->subscribeToEvent(eventQueue->getId(), event::getEventId(power::POWER_LEVEL_CRITICAL)); + manager->subscribeToEvent(eventQueue->getId(), event::getEventId(acs::PTG_RATE_VIOLATION)); return Subsystem::initialize(); } @@ -224,6 +225,16 @@ void EiveSystem::handleEventMessages() { } break; } + case acs::PTG_RATE_VIOLATION: { + CommandMessage msg; + HealthMessage::setHealthMessage(&msg, HealthMessage::HEALTH_SET, HasHealthIF::FAULTY); + ReturnValue_t result = MessageQueueSenderIF::sendMessage( + strQueueId, &msg, MessageQueueIF::NO_QUEUE, false); + if (result != returnvalue::OK) { + sif::error << "EIVE System: Sending FAULTY command to STR Assembly failed" + << std::endl; + } + } } break; default: From 68b0e3b20adfbb790c0681fa61be93960cb6a7d6 Mon Sep 17 00:00:00 2001 From: meggert Date: Mon, 29 Jan 2024 10:25:23 +0100 Subject: [PATCH 47/64] changelog --- CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 825810a6..4c4736b3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -23,6 +23,9 @@ will consitute of a breaking change warranting a new major release: ## Changed - Increased allowed mode transition time for PLOC SUPV. +- Detumbling can now be triggered from all modes of the `AcsController`. In case the + current mode is a higher pointing mode, the STR will be set to faulty, to trigger a + transition to safe first. Then, in a second step, a transition to detumble is triggered. # [v7.5.5] 2024-01-22 From 5ec173f8c9c13db5e3b5d78dd1e1b2d31ee2b8ae Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Mon, 29 Jan 2024 10:38:29 +0100 Subject: [PATCH 48/64] changelog --- CHANGELOG.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 825810a6..152283c0 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -24,6 +24,11 @@ will consitute of a breaking change warranting a new major release: - Increased allowed mode transition time for PLOC SUPV. +## Fixed + +- If the PCDU handler fails reading data from the IPC store, it will + not try to do a deserialization anymore. + # [v7.5.5] 2024-01-22 ## Fixed From c4d02038460f06b3d48b052037ea958fcc55f507 Mon Sep 17 00:00:00 2001 From: Robin Mueller Date: Mon, 29 Jan 2024 10:39:50 +0100 Subject: [PATCH 49/64] changelog --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 03fd90ee..16b335c9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,10 @@ will consitute of a breaking change warranting a new major release: # [unreleased] +## Fixed + +- All action commands sent by the PLOC SUPV to itself will have no sender now. + # [v7.5.1] 2023-12-13 - `eive-tmtc` v5.12.1 From f7c997980c01c51e46f4185983e3e4fdb0f2d620 Mon Sep 17 00:00:00 2001 From: meggert Date: Mon, 29 Jan 2024 11:08:47 +0100 Subject: [PATCH 50/64] this makes more sense --- mission/controller/AcsController.cpp | 10 +++++----- mission/controller/AcsController.h | 10 ---------- mission/controller/acs/Guidance.cpp | 10 +++++----- mission/controller/acs/Guidance.h | 7 ------- .../controllerdefinitions/AcsCtrlDefinitions.h | 14 ++++++++++++++ 5 files changed, 24 insertions(+), 27 deletions(-) diff --git a/mission/controller/AcsController.cpp b/mission/controller/AcsController.cpp index 2310a99b..22eb7a41 100644 --- a/mission/controller/AcsController.cpp +++ b/mission/controller/AcsController.cpp @@ -450,7 +450,7 @@ void AcsController::performPointingCtrl() { bool allRwAvailable = true; double rwPseudoInv[4][3] = {{0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}}; ReturnValue_t result = guidance.getDistributionMatrixRw(&sensorValues, *rwPseudoInv); - if (result == Guidance::MULTIPLE_RW_UNAVAILABLE) { + if (result == acsctrl::MULTIPLE_RW_UNAVAILABLE) { if (multipleRwUnavailableCounter >= acsParameters.rwHandlingParameters.multipleRwInvalidTimeout) { triggerEvent(acs::MULTIPLE_RW_INVALID); @@ -460,7 +460,7 @@ void AcsController::performPointingCtrl() { return; } multipleRwUnavailableCounter = 0; - if (result == Guidance::SINGLE_RW_UNAVAILABLE) { + if (result == acsctrl::SINGLE_RW_UNAVAILABLE) { allRwAvailable = false; } @@ -1087,7 +1087,7 @@ ReturnValue_t AcsController::writeTleToFs(const uint8_t *tle) { tleFile << "\n"; tleFile.write(reinterpret_cast(tle + 69), 69); } else { - return WRITE_FILE_FAILED; + return acsctrl::WRITE_FILE_FAILED; } tleFile.close(); return returnvalue::OK; @@ -1111,12 +1111,12 @@ ReturnValue_t AcsController::readTleFromFs(uint8_t *line1, uint8_t *line2) { std::memcpy(line2, tleLine2.c_str(), 69); } else { triggerEvent(acs::TLE_FILE_READ_FAILED); - return READ_FILE_FAILED; + return acsctrl::READ_FILE_FAILED; } tleFile.close(); } else { triggerEvent(acs::TLE_FILE_READ_FAILED); - return READ_FILE_FAILED; + return acsctrl::READ_FILE_FAILED; } return returnvalue::OK; } diff --git a/mission/controller/AcsController.h b/mission/controller/AcsController.h index bb4e3c37..928926fb 100644 --- a/mission/controller/AcsController.h +++ b/mission/controller/AcsController.h @@ -108,16 +108,6 @@ class AcsController : public ExtendedControllerBase, public ReceivesParameterMes static const DeviceCommandId_t UPDATE_TLE = 0x3; static const DeviceCommandId_t READ_TLE = 0x4; - //! [EXPORT] : [COMMENT] File deletion failed and at least one file is still existent. - static constexpr ReturnValue_t FILE_DELETION_FAILED = - returnvalue::makeCode(acsctrl::IF_ACS_CTRL_ID, 0); - //! [EXPORT] : [COMMENT] Writing the TLE to the file has failed. - static constexpr ReturnValue_t WRITE_FILE_FAILED = - returnvalue::makeCode(acsctrl::IF_ACS_CTRL_ID, 1); - //! [EXPORT] : [COMMENT] Reading the TLE to the file has failed. - static constexpr ReturnValue_t READ_FILE_FAILED = - returnvalue::makeCode(acsctrl::IF_ACS_CTRL_ID, 2); - ReturnValue_t initialize() override; ReturnValue_t handleCommandMessage(CommandMessage* message) override; void performControlOperation() override; diff --git a/mission/controller/acs/Guidance.cpp b/mission/controller/acs/Guidance.cpp index 185158d5..3b5d325c 100644 --- a/mission/controller/acs/Guidance.cpp +++ b/mission/controller/acs/Guidance.cpp @@ -474,21 +474,21 @@ ReturnValue_t Guidance::getDistributionMatrixRw(ACS::SensorValues *sensorValues, } else if (not rw1valid and rw2valid and rw3valid and rw4valid) { std::memcpy(rwPseudoInv, acsParameters->rwMatrices.pseudoInverseWithoutRW1, 12 * sizeof(double)); - return SINGLE_RW_UNAVAILABLE; + return acsctrl::SINGLE_RW_UNAVAILABLE; } else if (rw1valid and not rw2valid and rw3valid and rw4valid) { std::memcpy(rwPseudoInv, acsParameters->rwMatrices.pseudoInverseWithoutRW2, 12 * sizeof(double)); - return SINGLE_RW_UNAVAILABLE; + return acsctrl::SINGLE_RW_UNAVAILABLE; } else if (rw1valid and rw2valid and not rw3valid and rw4valid) { std::memcpy(rwPseudoInv, acsParameters->rwMatrices.pseudoInverseWithoutRW3, 12 * sizeof(double)); - return SINGLE_RW_UNAVAILABLE; + return acsctrl::SINGLE_RW_UNAVAILABLE; } else if (rw1valid and rw2valid and rw3valid and not rw4valid) { std::memcpy(rwPseudoInv, acsParameters->rwMatrices.pseudoInverseWithoutRW4, 12 * sizeof(double)); - return SINGLE_RW_UNAVAILABLE; + return acsctrl::SINGLE_RW_UNAVAILABLE; } - return MULTIPLE_RW_UNAVAILABLE; + return acsctrl::MULTIPLE_RW_UNAVAILABLE; } void Guidance::resetValues() { std::memcpy(quatIXprev, ZERO_VEC4, sizeof(quatIXprev)); } diff --git a/mission/controller/acs/Guidance.h b/mission/controller/acs/Guidance.h index f6319c7b..bdf6d7fb 100644 --- a/mission/controller/acs/Guidance.h +++ b/mission/controller/acs/Guidance.h @@ -65,13 +65,6 @@ class Guidance { // reation wheel maybe can be done in "commanding.h" ReturnValue_t getDistributionMatrixRw(ACS::SensorValues *sensorValues, double *rwPseudoInv); - //! [EXPORT] : [COMMENT] A single RW has failed. - static constexpr ReturnValue_t SINGLE_RW_UNAVAILABLE = - returnvalue::makeCode(acsctrl::IF_ACS_CTRL_ID, 3); - //! [EXPORT] : [COMMENT] Multiple RWs have failed. - static constexpr ReturnValue_t MULTIPLE_RW_UNAVAILABLE = - returnvalue::makeCode(acsctrl::IF_ACS_CTRL_ID, 4); - private: const AcsParameters *acsParameters; diff --git a/mission/controller/controllerdefinitions/AcsCtrlDefinitions.h b/mission/controller/controllerdefinitions/AcsCtrlDefinitions.h index 7de3e36e..a9e527f4 100644 --- a/mission/controller/controllerdefinitions/AcsCtrlDefinitions.h +++ b/mission/controller/controllerdefinitions/AcsCtrlDefinitions.h @@ -10,6 +10,20 @@ namespace acsctrl { static const uint8_t IF_ACS_CTRL_ID = CLASS_ID::ACS_CTRL; +//! [EXPORT] : [COMMENT] File deletion failed and at least one file is still existent. +static constexpr ReturnValue_t FILE_DELETION_FAILED = + returnvalue::makeCode(acsctrl::IF_ACS_CTRL_ID, 0); +//! [EXPORT] : [COMMENT] Writing the TLE to the file has failed. +static constexpr ReturnValue_t WRITE_FILE_FAILED = + returnvalue::makeCode(acsctrl::IF_ACS_CTRL_ID, 1); +//! [EXPORT] : [COMMENT] Reading the TLE to the file has failed. +static constexpr ReturnValue_t READ_FILE_FAILED = returnvalue::makeCode(acsctrl::IF_ACS_CTRL_ID, 2); +//! [EXPORT] : [COMMENT] A single RW has failed. +static constexpr ReturnValue_t SINGLE_RW_UNAVAILABLE = + returnvalue::makeCode(acsctrl::IF_ACS_CTRL_ID, 3); +//! [EXPORT] : [COMMENT] Multiple RWs have failed. +static constexpr ReturnValue_t MULTIPLE_RW_UNAVAILABLE = + returnvalue::makeCode(acsctrl::IF_ACS_CTRL_ID, 4); enum SetIds : uint32_t { MGM_SENSOR_DATA, From 64d105cf876ee93c839bba7c692bfa8373d58b17 Mon Sep 17 00:00:00 2001 From: meggert Date: Mon, 29 Jan 2024 11:11:47 +0100 Subject: [PATCH 51/64] fix --- mission/controller/acs/Guidance.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mission/controller/acs/Guidance.cpp b/mission/controller/acs/Guidance.cpp index 3b5d325c..12957ab2 100644 --- a/mission/controller/acs/Guidance.cpp +++ b/mission/controller/acs/Guidance.cpp @@ -424,7 +424,7 @@ void Guidance::comparePtg(double currentQuat[4], double currentSatRotRate[3], do // Convert target rotational rate into body RF double errorQuatInv[4] = {0, 0, 0, 0}, targetSatRotRateB[3] = {0, 0, 0}; QuaternionOperations::inverse(errorQuat, errorQuatInv); - QuaternionOperations::multiplyVector(errorQuat, targetSatRotRate, targetSatRotRateB); + QuaternionOperations::multiplyVector(errorQuatInv, targetSatRotRate, targetSatRotRateB); // Combine the target and reference satellite rotational rates double combinedRefSatRotRate[3] = {0, 0, 0}; VectorOperations::add(targetSatRotRate, refSatRotRate, combinedRefSatRotRate, 3); From 96b74574b0acf6eecaa6b05ff97b18bb26941adf Mon Sep 17 00:00:00 2001 From: meggert Date: Mon, 29 Jan 2024 11:12:40 +0100 Subject: [PATCH 52/64] forgot that one --- mission/controller/AcsController.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mission/controller/AcsController.cpp b/mission/controller/AcsController.cpp index 22eb7a41..41a16919 100644 --- a/mission/controller/AcsController.cpp +++ b/mission/controller/AcsController.cpp @@ -49,7 +49,7 @@ ReturnValue_t AcsController::executeAction(ActionId_t actionId, MessageQueueId_t case SOLAR_ARRAY_DEPLOYMENT_SUCCESSFUL: { ReturnValue_t result = guidance.solarArrayDeploymentComplete(); if (result == returnvalue::FAILED) { - return FILE_DELETION_FAILED; + return acsctrl::FILE_DELETION_FAILED; } return HasActionsIF::EXECUTION_FINISHED; } From 8390a0269033ba98ff0dba2e89c722d04db48b46 Mon Sep 17 00:00:00 2001 From: meggert Date: Mon, 29 Jan 2024 14:15:16 +0100 Subject: [PATCH 53/64] changelog --- CHANGELOG.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 8293fdf6..321e5a58 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,9 @@ will consitute of a breaking change warranting a new major release: # [unreleased] +- Bumped `eive-tmtc` to +- Bumped `eive-fsfw` + ## Added - Added new parameter for MPSoC which allows to skip SUPV commanding. @@ -29,6 +32,13 @@ will consitute of a breaking change warranting a new major release: - If the PCDU handler fails reading data from the IPC store, it will not try to do a deserialization anymore. - All action commands sent by the PLOC SUPV to itself will have no sender now. +- The `AcsController` will reset its stored guidance values on mode change and lost + orientation. +- The nullspace controller will only be used if all RWs are available. +- Calculation of required rotation rate in pointing modes has been fixed to actual + calculation of rotation rate from two quaternions. +- Fixed alignment matrix and pseudo inverses of RWs, to match the wrong definition of + positive rotation. # [v7.5.5] 2024-01-22 From e3ad08d987d35dc901a0a05c7acdbe0455af8c1f Mon Sep 17 00:00:00 2001 From: meggert Date: Mon, 29 Jan 2024 14:21:43 +0100 Subject: [PATCH 54/64] bumped fsfw --- fsfw | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fsfw b/fsfw index 5879eb7f..b5e7179a 160000 --- a/fsfw +++ b/fsfw @@ -1 +1 @@ -Subproject commit 5879eb7f7b83205c64980580c16d3aa78d6ea073 +Subproject commit b5e7179af1da085b9be598b4897f2664012781af From e301b19aba5de836d8026f19434d39cc9dd8d78d Mon Sep 17 00:00:00 2001 From: meggert Date: Mon, 29 Jan 2024 17:08:12 +0100 Subject: [PATCH 55/64] changelog --- CHANGELOG.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index e178ee01..ec91b607 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,8 @@ will consitute of a breaking change warranting a new major release: # [unreleased] +# [v7.6.0] 2024-01-29 + - Bumped `eive-tmtc` to - Bumped `eive-fsfw` From 8b91c91a7a0707bc796d075293c47449780cae0f Mon Sep 17 00:00:00 2001 From: meggert Date: Mon, 29 Jan 2024 17:08:51 +0100 Subject: [PATCH 56/64] bump version --- CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 5b8eb93e..8957c6bf 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -10,8 +10,8 @@ cmake_minimum_required(VERSION 3.13) set(OBSW_VERSION_MAJOR 7) -set(OBSW_VERSION_MINOR 5) -set(OBSW_VERSION_REVISION 5) +set(OBSW_VERSION_MINOR 6) +set(OBSW_VERSION_REVISION 0) # set(CMAKE_VERBOSE TRUE) From da5890f99a19e7af43002644750b66aaf662e431 Mon Sep 17 00:00:00 2001 From: meggert Date: Mon, 29 Jan 2024 17:13:46 +0100 Subject: [PATCH 57/64] gens --- .../fsfwconfig/events/translateEvents.cpp | 11 +++++++---- .../fsfwconfig/objects/translateObjects.cpp | 2 +- generators/bsp_hosted_events.csv | 3 ++- generators/bsp_hosted_returnvalues.csv | 17 ++++++++--------- generators/bsp_q7s_events.csv | 3 ++- generators/bsp_q7s_returnvalues.csv | 17 ++++++++--------- generators/events/translateEvents.cpp | 11 +++++++---- generators/objects/translateObjects.cpp | 2 +- linux/fsfwconfig/events/translateEvents.cpp | 11 +++++++---- linux/fsfwconfig/objects/translateObjects.cpp | 2 +- 10 files changed, 44 insertions(+), 35 deletions(-) diff --git a/bsp_hosted/fsfwconfig/events/translateEvents.cpp b/bsp_hosted/fsfwconfig/events/translateEvents.cpp index d5b3de46..7ccb09b0 100644 --- a/bsp_hosted/fsfwconfig/events/translateEvents.cpp +++ b/bsp_hosted/fsfwconfig/events/translateEvents.cpp @@ -1,7 +1,7 @@ /** - * @brief Auto-generated event translation file. Contains 318 translations. + * @brief Auto-generated event translation file. Contains 319 translations. * @details - * Generated on: 2023-12-13 11:29:45 + * Generated on: 2024-01-29 17:12:14 */ #include "translateEvents.h" @@ -94,7 +94,7 @@ const char *FILESTORE_ERROR_STRING = "FILESTORE_ERROR"; const char *FILENAME_TOO_LARGE_ERROR_STRING = "FILENAME_TOO_LARGE_ERROR"; const char *HANDLING_CFDP_REQUEST_FAILED_STRING = "HANDLING_CFDP_REQUEST_FAILED"; const char *SAFE_RATE_VIOLATION_STRING = "SAFE_RATE_VIOLATION"; -const char *SAFE_RATE_RECOVERY_STRING = "SAFE_RATE_RECOVERY"; +const char *RATE_RECOVERY_STRING = "RATE_RECOVERY"; const char *MULTIPLE_RW_INVALID_STRING = "MULTIPLE_RW_INVALID"; const char *MEKF_INVALID_INFO_STRING = "MEKF_INVALID_INFO"; const char *MEKF_RECOVERY_STRING = "MEKF_RECOVERY"; @@ -103,6 +103,7 @@ const char *PTG_CTRL_NO_ATTITUDE_INFORMATION_STRING = "PTG_CTRL_NO_ATTITUDE_INFO const char *SAFE_MODE_CONTROLLER_FAILURE_STRING = "SAFE_MODE_CONTROLLER_FAILURE"; const char *TLE_TOO_OLD_STRING = "TLE_TOO_OLD"; const char *TLE_FILE_READ_FAILED_STRING = "TLE_FILE_READ_FAILED"; +const char *PTG_RATE_VIOLATION_STRING = "PTG_RATE_VIOLATION"; const char *SWITCH_CMD_SENT_STRING = "SWITCH_CMD_SENT"; const char *SWITCH_HAS_CHANGED_STRING = "SWITCH_HAS_CHANGED"; const char *SWITCHING_Q7S_DENIED_STRING = "SWITCHING_Q7S_DENIED"; @@ -505,7 +506,7 @@ const char *translateEvents(Event event) { case (11200): return SAFE_RATE_VIOLATION_STRING; case (11201): - return SAFE_RATE_RECOVERY_STRING; + return RATE_RECOVERY_STRING; case (11202): return MULTIPLE_RW_INVALID_STRING; case (11203): @@ -522,6 +523,8 @@ const char *translateEvents(Event event) { return TLE_TOO_OLD_STRING; case (11209): return TLE_FILE_READ_FAILED_STRING; + case (11210): + return PTG_RATE_VIOLATION_STRING; case (11300): return SWITCH_CMD_SENT_STRING; case (11301): diff --git a/bsp_hosted/fsfwconfig/objects/translateObjects.cpp b/bsp_hosted/fsfwconfig/objects/translateObjects.cpp index ac61a526..f0e7bbcc 100644 --- a/bsp_hosted/fsfwconfig/objects/translateObjects.cpp +++ b/bsp_hosted/fsfwconfig/objects/translateObjects.cpp @@ -2,7 +2,7 @@ * @brief Auto-generated object translation file. * @details * Contains 175 translations. - * Generated on: 2023-12-13 11:29:45 + * Generated on: 2024-01-29 17:12:14 */ #include "translateObjects.h" diff --git a/generators/bsp_hosted_events.csv b/generators/bsp_hosted_events.csv index 97eeaf37..e02f0638 100644 --- a/generators/bsp_hosted_events.csv +++ b/generators/bsp_hosted_events.csv @@ -88,7 +88,7 @@ Event ID (dec); Event ID (hex); Name; Severity; Description; File Path 10804;0x2a34;FILENAME_TOO_LARGE_ERROR;LOW;P1: Transaction step ID, P2: 0 for source file name, 1 for dest file name;fsfw/src/fsfw/cfdp/handler/defs.h 10805;0x2a35;HANDLING_CFDP_REQUEST_FAILED;LOW;CFDP request handling failed. P2: Returncode.;fsfw/src/fsfw/cfdp/handler/defs.h 11200;0x2bc0;SAFE_RATE_VIOLATION;MEDIUM;The limits for the rotation in safe mode were violated.;mission/acs/defs.h -11201;0x2bc1;SAFE_RATE_RECOVERY;MEDIUM;The system has recovered from a safe rate rotation violation.;mission/acs/defs.h +11201;0x2bc1;RATE_RECOVERY;MEDIUM;The system has recovered from a rate rotation violation.;mission/acs/defs.h 11202;0x2bc2;MULTIPLE_RW_INVALID;HIGH;Multiple RWs are invalid, uncommandable and therefore higher ACS modes cannot be maintained.;mission/acs/defs.h 11203;0x2bc3;MEKF_INVALID_INFO;INFO;MEKF was not able to compute a solution. P1: MEKF state on exit;mission/acs/defs.h 11204;0x2bc4;MEKF_RECOVERY;INFO;MEKF is able to compute a solution again.;mission/acs/defs.h @@ -97,6 +97,7 @@ Event ID (dec); Event ID (hex); Name; Severity; Description; File Path 11207;0x2bc7;SAFE_MODE_CONTROLLER_FAILURE;HIGH;The ACS safe mode controller was not able to compute a solution and has failed. P1: Missing information about magnetic field, P2: Missing information about rotational rate;mission/acs/defs.h 11208;0x2bc8;TLE_TOO_OLD;INFO;The TLE for the SGP4 Propagator has become too old.;mission/acs/defs.h 11209;0x2bc9;TLE_FILE_READ_FAILED;LOW;The TLE could not be read from the filesystem.;mission/acs/defs.h +11210;0x2bca;PTG_RATE_VIOLATION;MEDIUM;The limits for the rotation in pointing mode were violated.;mission/acs/defs.h 11300;0x2c24;SWITCH_CMD_SENT;INFO;Indicates that a FSFW object requested setting a switch P1: 1 if on was requested, 0 for off | P2: Switch Index;mission/power/defs.h 11301;0x2c25;SWITCH_HAS_CHANGED;INFO;Indicated that a switch state has changed P1: New switch state, 1 for on, 0 for off | P2: Switch Index;mission/power/defs.h 11302;0x2c26;SWITCHING_Q7S_DENIED;MEDIUM;No description;mission/power/defs.h diff --git a/generators/bsp_hosted_returnvalues.csv b/generators/bsp_hosted_returnvalues.csv index 8ef110db..7838f868 100644 --- a/generators/bsp_hosted_returnvalues.csv +++ b/generators/bsp_hosted_returnvalues.csv @@ -454,6 +454,12 @@ Full ID (hex); Name; Description; Unique ID; Subsytem Name; File Path 0x5208;IMTQ_CmdErrUnknown;No description;8;IMTQ_HANDLER;mission/acs/imtqHelpers.h 0x5209;IMTQ_StartupCfgError;No description;9;IMTQ_HANDLER;mission/acs/imtqHelpers.h 0x520a;IMTQ_UnexpectedSelfTestReply;The status reply to a self test command was received but no self test command has been sent. This should normally never happen.;10;IMTQ_HANDLER;mission/acs/imtqHelpers.h +0x53a0;RWHA_InvalidSpeed;Action Message with invalid speed was received. Valid speeds must be in the range of [-65000, 1000] or [1000, 65000];160;RW_HANDLER;mission/acs/RwHandler.h +0x53a1;RWHA_InvalidRampTime;Action Message with invalid ramp time was received.;161;RW_HANDLER;mission/acs/RwHandler.h +0x53a2;RWHA_SetSpeedCommandInvalidLength;Received set speed command has invalid length. Should be 6.;162;RW_HANDLER;mission/acs/RwHandler.h +0x53a3;RWHA_ExecutionFailed;Command execution failed;163;RW_HANDLER;mission/acs/RwHandler.h +0x53a4;RWHA_CrcError;Reaction wheel reply has invalid crc;164;RW_HANDLER;mission/acs/RwHandler.h +0x53a5;RWHA_ValueNotRead;No description;165;RW_HANDLER;mission/acs/RwHandler.h 0x53b0;RWHA_SpiWriteFailure;No description;176;RW_HANDLER;mission/acs/rwHelpers.h 0x53b1;RWHA_SpiReadFailure;Used by the spi send function to tell a failing read call;177;RW_HANDLER;mission/acs/rwHelpers.h 0x53b2;RWHA_MissingStartSign;Can be used by the HDLC decoding mechanism to inform about a missing start sign 0x7E;178;RW_HANDLER;mission/acs/rwHelpers.h @@ -487,12 +493,8 @@ Full ID (hex); Name; Description; Unique ID; Subsytem Name; File Path 0x54b6;STRH_StartrackerAlreadyBooted;Star tracker is already in firmware mode;182;STR_HANDLER;mission/acs/str/StarTrackerHandler.h 0x54b7;STRH_StartrackerNotRunningFirmware;Star tracker must be in firmware mode to run this command;183;STR_HANDLER;mission/acs/str/StarTrackerHandler.h 0x54b8;STRH_StartrackerNotRunningBootloader;Star tracker must be in bootloader mode to run this command;184;STR_HANDLER;mission/acs/str/StarTrackerHandler.h -0x59a0;SUSS_InvalidSpeed;Action Message with invalid speed was received. Valid speeds must be in the range of [-65000, 1000] or [1000, 65000];160;SUS_HANDLER;mission/acs/RwHandler.h -0x59a1;SUSS_InvalidRampTime;Action Message with invalid ramp time was received.;161;SUS_HANDLER;mission/acs/RwHandler.h -0x59a2;SUSS_SetSpeedCommandInvalidLength;Received set speed command has invalid length. Should be 6.;162;SUS_HANDLER;mission/acs/RwHandler.h -0x59a3;SUSS_ExecutionFailed;Command execution failed;163;SUS_HANDLER;mission/acs/RwHandler.h -0x59a4;SUSS_CrcError;Reaction wheel reply has invalid crc;164;SUS_HANDLER;mission/acs/RwHandler.h -0x59a5;SUSS_ValueNotRead;No description;165;SUS_HANDLER;mission/acs/RwHandler.h +0x59a0;SUSS_ErrorUnlockMutex;No description;160;SUS_HANDLER;mission/acs/archive/LegacySusHandler.h +0x59a1;SUSS_ErrorLockMutex;No description;161;SUS_HANDLER;mission/acs/archive/LegacySusHandler.h 0x5e00;GOMS_PacketTooLong;No description;0;GOM_SPACE_HANDLER;mission/power/GomspaceDeviceHandler.h 0x5e01;GOMS_InvalidTableId;No description;1;GOM_SPACE_HANDLER;mission/power/GomspaceDeviceHandler.h 0x5e02;GOMS_InvalidAddress;No description;2;GOM_SPACE_HANDLER;mission/power/GomspaceDeviceHandler.h @@ -509,9 +511,6 @@ Full ID (hex); Name; Description; Unique ID; Subsytem Name; File Path 0x67a2;SADPL_MainSwitchTimeoutFailure;No description;162;SA_DEPL_HANDLER;mission/SolarArrayDeploymentHandler.h 0x67a3;SADPL_SwitchingDeplSa1Failed;No description;163;SA_DEPL_HANDLER;mission/SolarArrayDeploymentHandler.h 0x67a4;SADPL_SwitchingDeplSa2Failed;No description;164;SA_DEPL_HANDLER;mission/SolarArrayDeploymentHandler.h -0x6a00;ACSCTRL_FileDeletionFailed;File deletion failed and at least one file is still existent.;0;ACS_CTRL;mission/controller/AcsController.h -0x6a01;ACSCTRL_WriteFileFailed;Writing the TLE to the file has failed.;1;ACS_CTRL;mission/controller/AcsController.h -0x6a02;ACSCTRL_ReadFileFailed;Reading the TLE to the file has failed.;2;ACS_CTRL;mission/controller/AcsController.h 0x6b02;ACSMEKF_MekfUninitialized;No description;2;ACS_MEKF;mission/controller/acs/MultiplicativeKalmanFilter.h 0x6b03;ACSMEKF_MekfNoGyrData;No description;3;ACS_MEKF;mission/controller/acs/MultiplicativeKalmanFilter.h 0x6b04;ACSMEKF_MekfNoModelVectors;No description;4;ACS_MEKF;mission/controller/acs/MultiplicativeKalmanFilter.h diff --git a/generators/bsp_q7s_events.csv b/generators/bsp_q7s_events.csv index 97eeaf37..e02f0638 100644 --- a/generators/bsp_q7s_events.csv +++ b/generators/bsp_q7s_events.csv @@ -88,7 +88,7 @@ Event ID (dec); Event ID (hex); Name; Severity; Description; File Path 10804;0x2a34;FILENAME_TOO_LARGE_ERROR;LOW;P1: Transaction step ID, P2: 0 for source file name, 1 for dest file name;fsfw/src/fsfw/cfdp/handler/defs.h 10805;0x2a35;HANDLING_CFDP_REQUEST_FAILED;LOW;CFDP request handling failed. P2: Returncode.;fsfw/src/fsfw/cfdp/handler/defs.h 11200;0x2bc0;SAFE_RATE_VIOLATION;MEDIUM;The limits for the rotation in safe mode were violated.;mission/acs/defs.h -11201;0x2bc1;SAFE_RATE_RECOVERY;MEDIUM;The system has recovered from a safe rate rotation violation.;mission/acs/defs.h +11201;0x2bc1;RATE_RECOVERY;MEDIUM;The system has recovered from a rate rotation violation.;mission/acs/defs.h 11202;0x2bc2;MULTIPLE_RW_INVALID;HIGH;Multiple RWs are invalid, uncommandable and therefore higher ACS modes cannot be maintained.;mission/acs/defs.h 11203;0x2bc3;MEKF_INVALID_INFO;INFO;MEKF was not able to compute a solution. P1: MEKF state on exit;mission/acs/defs.h 11204;0x2bc4;MEKF_RECOVERY;INFO;MEKF is able to compute a solution again.;mission/acs/defs.h @@ -97,6 +97,7 @@ Event ID (dec); Event ID (hex); Name; Severity; Description; File Path 11207;0x2bc7;SAFE_MODE_CONTROLLER_FAILURE;HIGH;The ACS safe mode controller was not able to compute a solution and has failed. P1: Missing information about magnetic field, P2: Missing information about rotational rate;mission/acs/defs.h 11208;0x2bc8;TLE_TOO_OLD;INFO;The TLE for the SGP4 Propagator has become too old.;mission/acs/defs.h 11209;0x2bc9;TLE_FILE_READ_FAILED;LOW;The TLE could not be read from the filesystem.;mission/acs/defs.h +11210;0x2bca;PTG_RATE_VIOLATION;MEDIUM;The limits for the rotation in pointing mode were violated.;mission/acs/defs.h 11300;0x2c24;SWITCH_CMD_SENT;INFO;Indicates that a FSFW object requested setting a switch P1: 1 if on was requested, 0 for off | P2: Switch Index;mission/power/defs.h 11301;0x2c25;SWITCH_HAS_CHANGED;INFO;Indicated that a switch state has changed P1: New switch state, 1 for on, 0 for off | P2: Switch Index;mission/power/defs.h 11302;0x2c26;SWITCHING_Q7S_DENIED;MEDIUM;No description;mission/power/defs.h diff --git a/generators/bsp_q7s_returnvalues.csv b/generators/bsp_q7s_returnvalues.csv index 76184dce..f14ea256 100644 --- a/generators/bsp_q7s_returnvalues.csv +++ b/generators/bsp_q7s_returnvalues.csv @@ -454,6 +454,12 @@ Full ID (hex); Name; Description; Unique ID; Subsytem Name; File Path 0x5208;IMTQ_CmdErrUnknown;No description;8;IMTQ_HANDLER;mission/acs/imtqHelpers.h 0x5209;IMTQ_StartupCfgError;No description;9;IMTQ_HANDLER;mission/acs/imtqHelpers.h 0x520a;IMTQ_UnexpectedSelfTestReply;The status reply to a self test command was received but no self test command has been sent. This should normally never happen.;10;IMTQ_HANDLER;mission/acs/imtqHelpers.h +0x53a0;RWHA_InvalidSpeed;Action Message with invalid speed was received. Valid speeds must be in the range of [-65000, 1000] or [1000, 65000];160;RW_HANDLER;mission/acs/RwHandler.h +0x53a1;RWHA_InvalidRampTime;Action Message with invalid ramp time was received.;161;RW_HANDLER;mission/acs/RwHandler.h +0x53a2;RWHA_SetSpeedCommandInvalidLength;Received set speed command has invalid length. Should be 6.;162;RW_HANDLER;mission/acs/RwHandler.h +0x53a3;RWHA_ExecutionFailed;Command execution failed;163;RW_HANDLER;mission/acs/RwHandler.h +0x53a4;RWHA_CrcError;Reaction wheel reply has invalid crc;164;RW_HANDLER;mission/acs/RwHandler.h +0x53a5;RWHA_ValueNotRead;No description;165;RW_HANDLER;mission/acs/RwHandler.h 0x53b0;RWHA_SpiWriteFailure;No description;176;RW_HANDLER;mission/acs/rwHelpers.h 0x53b1;RWHA_SpiReadFailure;Used by the spi send function to tell a failing read call;177;RW_HANDLER;mission/acs/rwHelpers.h 0x53b2;RWHA_MissingStartSign;Can be used by the HDLC decoding mechanism to inform about a missing start sign 0x7E;178;RW_HANDLER;mission/acs/rwHelpers.h @@ -499,12 +505,8 @@ Full ID (hex); Name; Description; Unique ID; Subsytem Name; File Path 0x58a1;PLSPVhLP_ProcessTerminated;Process has been terminated by command;161;PLOC_SUPV_HELPER;linux/payload/PlocSupvUartMan.h 0x58a2;PLSPVhLP_PathNotExists;Received command with invalid pathname;162;PLOC_SUPV_HELPER;linux/payload/PlocSupvUartMan.h 0x58a3;PLSPVhLP_EventBufferReplyInvalidApid;Expected event buffer TM but received space packet with other APID;163;PLOC_SUPV_HELPER;linux/payload/PlocSupvUartMan.h -0x59a0;SUSS_InvalidSpeed;Action Message with invalid speed was received. Valid speeds must be in the range of [-65000, 1000] or [1000, 65000];160;SUS_HANDLER;mission/acs/RwHandler.h -0x59a1;SUSS_InvalidRampTime;Action Message with invalid ramp time was received.;161;SUS_HANDLER;mission/acs/RwHandler.h -0x59a2;SUSS_SetSpeedCommandInvalidLength;Received set speed command has invalid length. Should be 6.;162;SUS_HANDLER;mission/acs/RwHandler.h -0x59a3;SUSS_ExecutionFailed;Command execution failed;163;SUS_HANDLER;mission/acs/RwHandler.h -0x59a4;SUSS_CrcError;Reaction wheel reply has invalid crc;164;SUS_HANDLER;mission/acs/RwHandler.h -0x59a5;SUSS_ValueNotRead;No description;165;SUS_HANDLER;mission/acs/RwHandler.h +0x59a0;SUSS_ErrorUnlockMutex;No description;160;SUS_HANDLER;mission/acs/archive/LegacySusHandler.h +0x59a1;SUSS_ErrorLockMutex;No description;161;SUS_HANDLER;mission/acs/archive/LegacySusHandler.h 0x5aa0;IPCI_PapbBusy;No description;160;CCSDS_IP_CORE_BRIDGE;linux/ipcore/PapbVcInterface.h 0x5ba0;PTME_UnknownVcId;No description;160;PTME;linux/ipcore/Ptme.h 0x5d01;STRHLP_SdNotMounted;SD card specified in path string not mounted;1;STR_HELPER;linux/acs/StrComHandler.h @@ -593,9 +595,6 @@ Full ID (hex); Name; Description; Unique ID; Subsytem Name; File Path 0x69b5;SPVRTVIF_SupvHelperExecuting;Supervisor helper task ist currently executing a command (wait until helper tas has finished or interrupt by sending the terminate command);181;SUPV_RETURN_VALUES_IF;linux/payload/plocSupvDefs.h 0x69c0;SPVRTVIF_BufTooSmall;No description;192;SUPV_RETURN_VALUES_IF;linux/payload/plocSupvDefs.h 0x69c1;SPVRTVIF_NoReplyTimeout;No description;193;SUPV_RETURN_VALUES_IF;linux/payload/plocSupvDefs.h -0x6a00;ACSCTRL_FileDeletionFailed;File deletion failed and at least one file is still existent.;0;ACS_CTRL;mission/controller/AcsController.h -0x6a01;ACSCTRL_WriteFileFailed;Writing the TLE to the file has failed.;1;ACS_CTRL;mission/controller/AcsController.h -0x6a02;ACSCTRL_ReadFileFailed;Reading the TLE to the file has failed.;2;ACS_CTRL;mission/controller/AcsController.h 0x6b02;ACSMEKF_MekfUninitialized;No description;2;ACS_MEKF;mission/controller/acs/MultiplicativeKalmanFilter.h 0x6b03;ACSMEKF_MekfNoGyrData;No description;3;ACS_MEKF;mission/controller/acs/MultiplicativeKalmanFilter.h 0x6b04;ACSMEKF_MekfNoModelVectors;No description;4;ACS_MEKF;mission/controller/acs/MultiplicativeKalmanFilter.h diff --git a/generators/events/translateEvents.cpp b/generators/events/translateEvents.cpp index d5b3de46..7ccb09b0 100644 --- a/generators/events/translateEvents.cpp +++ b/generators/events/translateEvents.cpp @@ -1,7 +1,7 @@ /** - * @brief Auto-generated event translation file. Contains 318 translations. + * @brief Auto-generated event translation file. Contains 319 translations. * @details - * Generated on: 2023-12-13 11:29:45 + * Generated on: 2024-01-29 17:12:14 */ #include "translateEvents.h" @@ -94,7 +94,7 @@ const char *FILESTORE_ERROR_STRING = "FILESTORE_ERROR"; const char *FILENAME_TOO_LARGE_ERROR_STRING = "FILENAME_TOO_LARGE_ERROR"; const char *HANDLING_CFDP_REQUEST_FAILED_STRING = "HANDLING_CFDP_REQUEST_FAILED"; const char *SAFE_RATE_VIOLATION_STRING = "SAFE_RATE_VIOLATION"; -const char *SAFE_RATE_RECOVERY_STRING = "SAFE_RATE_RECOVERY"; +const char *RATE_RECOVERY_STRING = "RATE_RECOVERY"; const char *MULTIPLE_RW_INVALID_STRING = "MULTIPLE_RW_INVALID"; const char *MEKF_INVALID_INFO_STRING = "MEKF_INVALID_INFO"; const char *MEKF_RECOVERY_STRING = "MEKF_RECOVERY"; @@ -103,6 +103,7 @@ const char *PTG_CTRL_NO_ATTITUDE_INFORMATION_STRING = "PTG_CTRL_NO_ATTITUDE_INFO const char *SAFE_MODE_CONTROLLER_FAILURE_STRING = "SAFE_MODE_CONTROLLER_FAILURE"; const char *TLE_TOO_OLD_STRING = "TLE_TOO_OLD"; const char *TLE_FILE_READ_FAILED_STRING = "TLE_FILE_READ_FAILED"; +const char *PTG_RATE_VIOLATION_STRING = "PTG_RATE_VIOLATION"; const char *SWITCH_CMD_SENT_STRING = "SWITCH_CMD_SENT"; const char *SWITCH_HAS_CHANGED_STRING = "SWITCH_HAS_CHANGED"; const char *SWITCHING_Q7S_DENIED_STRING = "SWITCHING_Q7S_DENIED"; @@ -505,7 +506,7 @@ const char *translateEvents(Event event) { case (11200): return SAFE_RATE_VIOLATION_STRING; case (11201): - return SAFE_RATE_RECOVERY_STRING; + return RATE_RECOVERY_STRING; case (11202): return MULTIPLE_RW_INVALID_STRING; case (11203): @@ -522,6 +523,8 @@ const char *translateEvents(Event event) { return TLE_TOO_OLD_STRING; case (11209): return TLE_FILE_READ_FAILED_STRING; + case (11210): + return PTG_RATE_VIOLATION_STRING; case (11300): return SWITCH_CMD_SENT_STRING; case (11301): diff --git a/generators/objects/translateObjects.cpp b/generators/objects/translateObjects.cpp index 30696975..9ba7f448 100644 --- a/generators/objects/translateObjects.cpp +++ b/generators/objects/translateObjects.cpp @@ -2,7 +2,7 @@ * @brief Auto-generated object translation file. * @details * Contains 179 translations. - * Generated on: 2023-12-13 11:29:45 + * Generated on: 2024-01-29 17:12:14 */ #include "translateObjects.h" diff --git a/linux/fsfwconfig/events/translateEvents.cpp b/linux/fsfwconfig/events/translateEvents.cpp index d5b3de46..7ccb09b0 100644 --- a/linux/fsfwconfig/events/translateEvents.cpp +++ b/linux/fsfwconfig/events/translateEvents.cpp @@ -1,7 +1,7 @@ /** - * @brief Auto-generated event translation file. Contains 318 translations. + * @brief Auto-generated event translation file. Contains 319 translations. * @details - * Generated on: 2023-12-13 11:29:45 + * Generated on: 2024-01-29 17:12:14 */ #include "translateEvents.h" @@ -94,7 +94,7 @@ const char *FILESTORE_ERROR_STRING = "FILESTORE_ERROR"; const char *FILENAME_TOO_LARGE_ERROR_STRING = "FILENAME_TOO_LARGE_ERROR"; const char *HANDLING_CFDP_REQUEST_FAILED_STRING = "HANDLING_CFDP_REQUEST_FAILED"; const char *SAFE_RATE_VIOLATION_STRING = "SAFE_RATE_VIOLATION"; -const char *SAFE_RATE_RECOVERY_STRING = "SAFE_RATE_RECOVERY"; +const char *RATE_RECOVERY_STRING = "RATE_RECOVERY"; const char *MULTIPLE_RW_INVALID_STRING = "MULTIPLE_RW_INVALID"; const char *MEKF_INVALID_INFO_STRING = "MEKF_INVALID_INFO"; const char *MEKF_RECOVERY_STRING = "MEKF_RECOVERY"; @@ -103,6 +103,7 @@ const char *PTG_CTRL_NO_ATTITUDE_INFORMATION_STRING = "PTG_CTRL_NO_ATTITUDE_INFO const char *SAFE_MODE_CONTROLLER_FAILURE_STRING = "SAFE_MODE_CONTROLLER_FAILURE"; const char *TLE_TOO_OLD_STRING = "TLE_TOO_OLD"; const char *TLE_FILE_READ_FAILED_STRING = "TLE_FILE_READ_FAILED"; +const char *PTG_RATE_VIOLATION_STRING = "PTG_RATE_VIOLATION"; const char *SWITCH_CMD_SENT_STRING = "SWITCH_CMD_SENT"; const char *SWITCH_HAS_CHANGED_STRING = "SWITCH_HAS_CHANGED"; const char *SWITCHING_Q7S_DENIED_STRING = "SWITCHING_Q7S_DENIED"; @@ -505,7 +506,7 @@ const char *translateEvents(Event event) { case (11200): return SAFE_RATE_VIOLATION_STRING; case (11201): - return SAFE_RATE_RECOVERY_STRING; + return RATE_RECOVERY_STRING; case (11202): return MULTIPLE_RW_INVALID_STRING; case (11203): @@ -522,6 +523,8 @@ const char *translateEvents(Event event) { return TLE_TOO_OLD_STRING; case (11209): return TLE_FILE_READ_FAILED_STRING; + case (11210): + return PTG_RATE_VIOLATION_STRING; case (11300): return SWITCH_CMD_SENT_STRING; case (11301): diff --git a/linux/fsfwconfig/objects/translateObjects.cpp b/linux/fsfwconfig/objects/translateObjects.cpp index 30696975..9ba7f448 100644 --- a/linux/fsfwconfig/objects/translateObjects.cpp +++ b/linux/fsfwconfig/objects/translateObjects.cpp @@ -2,7 +2,7 @@ * @brief Auto-generated object translation file. * @details * Contains 179 translations. - * Generated on: 2023-12-13 11:29:45 + * Generated on: 2024-01-29 17:12:14 */ #include "translateObjects.h" From 07e4a6bc5a0583302d52d60fd004c04af11a6b94 Mon Sep 17 00:00:00 2001 From: meggert Date: Tue, 30 Jan 2024 09:07:04 +0100 Subject: [PATCH 58/64] make rtvals readable for generators (not sure why the other way did not work) --- .../controllerdefinitions/AcsCtrlDefinitions.h | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) diff --git a/mission/controller/controllerdefinitions/AcsCtrlDefinitions.h b/mission/controller/controllerdefinitions/AcsCtrlDefinitions.h index a9e527f4..0f21548e 100644 --- a/mission/controller/controllerdefinitions/AcsCtrlDefinitions.h +++ b/mission/controller/controllerdefinitions/AcsCtrlDefinitions.h @@ -9,21 +9,17 @@ namespace acsctrl { -static const uint8_t IF_ACS_CTRL_ID = CLASS_ID::ACS_CTRL; +static const uint8_t INTERFACE_ID = CLASS_ID::ACS_CTRL; //! [EXPORT] : [COMMENT] File deletion failed and at least one file is still existent. -static constexpr ReturnValue_t FILE_DELETION_FAILED = - returnvalue::makeCode(acsctrl::IF_ACS_CTRL_ID, 0); +static constexpr ReturnValue_t FILE_DELETION_FAILED = MAKE_RETURN_CODE(0xA0); //! [EXPORT] : [COMMENT] Writing the TLE to the file has failed. -static constexpr ReturnValue_t WRITE_FILE_FAILED = - returnvalue::makeCode(acsctrl::IF_ACS_CTRL_ID, 1); +static constexpr ReturnValue_t WRITE_FILE_FAILED = MAKE_RETURN_CODE(0xA1); //! [EXPORT] : [COMMENT] Reading the TLE to the file has failed. -static constexpr ReturnValue_t READ_FILE_FAILED = returnvalue::makeCode(acsctrl::IF_ACS_CTRL_ID, 2); +static constexpr ReturnValue_t MAKE_RETURN_CODE = MAKE_RETURN_CODE(0xA2); //! [EXPORT] : [COMMENT] A single RW has failed. -static constexpr ReturnValue_t SINGLE_RW_UNAVAILABLE = - returnvalue::makeCode(acsctrl::IF_ACS_CTRL_ID, 3); +static constexpr ReturnValue_t SINGLE_RW_UNAVAILABLE = MAKE_RETURN_CODE(0xA3); //! [EXPORT] : [COMMENT] Multiple RWs have failed. -static constexpr ReturnValue_t MULTIPLE_RW_UNAVAILABLE = - returnvalue::makeCode(acsctrl::IF_ACS_CTRL_ID, 4); +static constexpr ReturnValue_t MULTIPLE_RW_UNAVAILABLE = MAKE_RETURN_CODE(0xA4); enum SetIds : uint32_t { MGM_SENSOR_DATA, From ef4d3066e97f9e102454bf59ec6bc0d9aa418414 Mon Sep 17 00:00:00 2001 From: meggert Date: Tue, 30 Jan 2024 09:07:27 +0100 Subject: [PATCH 59/64] gens --- bsp_hosted/fsfwconfig/events/translateEvents.cpp | 2 +- bsp_hosted/fsfwconfig/objects/translateObjects.cpp | 2 +- generators/bsp_hosted_returnvalues.csv | 5 +++++ generators/bsp_q7s_returnvalues.csv | 5 +++++ generators/events/translateEvents.cpp | 2 +- generators/objects/translateObjects.cpp | 2 +- linux/fsfwconfig/events/translateEvents.cpp | 2 +- linux/fsfwconfig/objects/translateObjects.cpp | 2 +- 8 files changed, 16 insertions(+), 6 deletions(-) diff --git a/bsp_hosted/fsfwconfig/events/translateEvents.cpp b/bsp_hosted/fsfwconfig/events/translateEvents.cpp index 7ccb09b0..e47fff0f 100644 --- a/bsp_hosted/fsfwconfig/events/translateEvents.cpp +++ b/bsp_hosted/fsfwconfig/events/translateEvents.cpp @@ -1,7 +1,7 @@ /** * @brief Auto-generated event translation file. Contains 319 translations. * @details - * Generated on: 2024-01-29 17:12:14 + * Generated on: 2024-01-30 09:05:49 */ #include "translateEvents.h" diff --git a/bsp_hosted/fsfwconfig/objects/translateObjects.cpp b/bsp_hosted/fsfwconfig/objects/translateObjects.cpp index f0e7bbcc..766ee3fa 100644 --- a/bsp_hosted/fsfwconfig/objects/translateObjects.cpp +++ b/bsp_hosted/fsfwconfig/objects/translateObjects.cpp @@ -2,7 +2,7 @@ * @brief Auto-generated object translation file. * @details * Contains 175 translations. - * Generated on: 2024-01-29 17:12:14 + * Generated on: 2024-01-30 09:05:49 */ #include "translateObjects.h" diff --git a/generators/bsp_hosted_returnvalues.csv b/generators/bsp_hosted_returnvalues.csv index 7838f868..c7c20d0b 100644 --- a/generators/bsp_hosted_returnvalues.csv +++ b/generators/bsp_hosted_returnvalues.csv @@ -511,6 +511,11 @@ Full ID (hex); Name; Description; Unique ID; Subsytem Name; File Path 0x67a2;SADPL_MainSwitchTimeoutFailure;No description;162;SA_DEPL_HANDLER;mission/SolarArrayDeploymentHandler.h 0x67a3;SADPL_SwitchingDeplSa1Failed;No description;163;SA_DEPL_HANDLER;mission/SolarArrayDeploymentHandler.h 0x67a4;SADPL_SwitchingDeplSa2Failed;No description;164;SA_DEPL_HANDLER;mission/SolarArrayDeploymentHandler.h +0x6aa0;ACSCTRL_FileDeletionFailed;File deletion failed and at least one file is still existent.;160;ACS_CTRL;mission/controller/controllerdefinitions/AcsCtrlDefinitions.h +0x6aa1;ACSCTRL_WriteFileFailed;Writing the TLE to the file has failed.;161;ACS_CTRL;mission/controller/controllerdefinitions/AcsCtrlDefinitions.h +0x6aa2;ACSCTRL_MakeReturnCode;Reading the TLE to the file has failed.;162;ACS_CTRL;mission/controller/controllerdefinitions/AcsCtrlDefinitions.h +0x6aa3;ACSCTRL_SingleRwUnavailable;A single RW has failed.;163;ACS_CTRL;mission/controller/controllerdefinitions/AcsCtrlDefinitions.h +0x6aa4;ACSCTRL_MultipleRwUnavailable;Multiple RWs have failed.;164;ACS_CTRL;mission/controller/controllerdefinitions/AcsCtrlDefinitions.h 0x6b02;ACSMEKF_MekfUninitialized;No description;2;ACS_MEKF;mission/controller/acs/MultiplicativeKalmanFilter.h 0x6b03;ACSMEKF_MekfNoGyrData;No description;3;ACS_MEKF;mission/controller/acs/MultiplicativeKalmanFilter.h 0x6b04;ACSMEKF_MekfNoModelVectors;No description;4;ACS_MEKF;mission/controller/acs/MultiplicativeKalmanFilter.h diff --git a/generators/bsp_q7s_returnvalues.csv b/generators/bsp_q7s_returnvalues.csv index f14ea256..666dd130 100644 --- a/generators/bsp_q7s_returnvalues.csv +++ b/generators/bsp_q7s_returnvalues.csv @@ -595,6 +595,11 @@ Full ID (hex); Name; Description; Unique ID; Subsytem Name; File Path 0x69b5;SPVRTVIF_SupvHelperExecuting;Supervisor helper task ist currently executing a command (wait until helper tas has finished or interrupt by sending the terminate command);181;SUPV_RETURN_VALUES_IF;linux/payload/plocSupvDefs.h 0x69c0;SPVRTVIF_BufTooSmall;No description;192;SUPV_RETURN_VALUES_IF;linux/payload/plocSupvDefs.h 0x69c1;SPVRTVIF_NoReplyTimeout;No description;193;SUPV_RETURN_VALUES_IF;linux/payload/plocSupvDefs.h +0x6aa0;ACSCTRL_FileDeletionFailed;File deletion failed and at least one file is still existent.;160;ACS_CTRL;mission/controller/controllerdefinitions/AcsCtrlDefinitions.h +0x6aa1;ACSCTRL_WriteFileFailed;Writing the TLE to the file has failed.;161;ACS_CTRL;mission/controller/controllerdefinitions/AcsCtrlDefinitions.h +0x6aa2;ACSCTRL_MakeReturnCode;Reading the TLE to the file has failed.;162;ACS_CTRL;mission/controller/controllerdefinitions/AcsCtrlDefinitions.h +0x6aa3;ACSCTRL_SingleRwUnavailable;A single RW has failed.;163;ACS_CTRL;mission/controller/controllerdefinitions/AcsCtrlDefinitions.h +0x6aa4;ACSCTRL_MultipleRwUnavailable;Multiple RWs have failed.;164;ACS_CTRL;mission/controller/controllerdefinitions/AcsCtrlDefinitions.h 0x6b02;ACSMEKF_MekfUninitialized;No description;2;ACS_MEKF;mission/controller/acs/MultiplicativeKalmanFilter.h 0x6b03;ACSMEKF_MekfNoGyrData;No description;3;ACS_MEKF;mission/controller/acs/MultiplicativeKalmanFilter.h 0x6b04;ACSMEKF_MekfNoModelVectors;No description;4;ACS_MEKF;mission/controller/acs/MultiplicativeKalmanFilter.h diff --git a/generators/events/translateEvents.cpp b/generators/events/translateEvents.cpp index 7ccb09b0..e47fff0f 100644 --- a/generators/events/translateEvents.cpp +++ b/generators/events/translateEvents.cpp @@ -1,7 +1,7 @@ /** * @brief Auto-generated event translation file. Contains 319 translations. * @details - * Generated on: 2024-01-29 17:12:14 + * Generated on: 2024-01-30 09:05:49 */ #include "translateEvents.h" diff --git a/generators/objects/translateObjects.cpp b/generators/objects/translateObjects.cpp index 9ba7f448..08ad0eaa 100644 --- a/generators/objects/translateObjects.cpp +++ b/generators/objects/translateObjects.cpp @@ -2,7 +2,7 @@ * @brief Auto-generated object translation file. * @details * Contains 179 translations. - * Generated on: 2024-01-29 17:12:14 + * Generated on: 2024-01-30 09:05:49 */ #include "translateObjects.h" diff --git a/linux/fsfwconfig/events/translateEvents.cpp b/linux/fsfwconfig/events/translateEvents.cpp index 7ccb09b0..e47fff0f 100644 --- a/linux/fsfwconfig/events/translateEvents.cpp +++ b/linux/fsfwconfig/events/translateEvents.cpp @@ -1,7 +1,7 @@ /** * @brief Auto-generated event translation file. Contains 319 translations. * @details - * Generated on: 2024-01-29 17:12:14 + * Generated on: 2024-01-30 09:05:49 */ #include "translateEvents.h" diff --git a/linux/fsfwconfig/objects/translateObjects.cpp b/linux/fsfwconfig/objects/translateObjects.cpp index 9ba7f448..08ad0eaa 100644 --- a/linux/fsfwconfig/objects/translateObjects.cpp +++ b/linux/fsfwconfig/objects/translateObjects.cpp @@ -2,7 +2,7 @@ * @brief Auto-generated object translation file. * @details * Contains 179 translations. - * Generated on: 2024-01-29 17:12:14 + * Generated on: 2024-01-30 09:05:49 */ #include "translateObjects.h" From e3f7cda69a9ef6b1491b6505055dd6a2adb53ae1 Mon Sep 17 00:00:00 2001 From: meggert Date: Tue, 30 Jan 2024 09:09:35 +0100 Subject: [PATCH 60/64] whoops --- mission/controller/controllerdefinitions/AcsCtrlDefinitions.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mission/controller/controllerdefinitions/AcsCtrlDefinitions.h b/mission/controller/controllerdefinitions/AcsCtrlDefinitions.h index 0f21548e..c830ffac 100644 --- a/mission/controller/controllerdefinitions/AcsCtrlDefinitions.h +++ b/mission/controller/controllerdefinitions/AcsCtrlDefinitions.h @@ -15,7 +15,7 @@ static constexpr ReturnValue_t FILE_DELETION_FAILED = MAKE_RETURN_CODE(0xA0); //! [EXPORT] : [COMMENT] Writing the TLE to the file has failed. static constexpr ReturnValue_t WRITE_FILE_FAILED = MAKE_RETURN_CODE(0xA1); //! [EXPORT] : [COMMENT] Reading the TLE to the file has failed. -static constexpr ReturnValue_t MAKE_RETURN_CODE = MAKE_RETURN_CODE(0xA2); +static constexpr ReturnValue_t READ_FILE_FAILED = MAKE_RETURN_CODE(0xA2); //! [EXPORT] : [COMMENT] A single RW has failed. static constexpr ReturnValue_t SINGLE_RW_UNAVAILABLE = MAKE_RETURN_CODE(0xA3); //! [EXPORT] : [COMMENT] Multiple RWs have failed. From 7dc69d3473150688ea69e83b62fce1ea6617a593 Mon Sep 17 00:00:00 2001 From: meggert Date: Tue, 30 Jan 2024 09:10:30 +0100 Subject: [PATCH 61/64] gens --- bsp_hosted/fsfwconfig/events/translateEvents.cpp | 2 +- bsp_hosted/fsfwconfig/objects/translateObjects.cpp | 2 +- generators/bsp_hosted_returnvalues.csv | 2 +- generators/bsp_q7s_returnvalues.csv | 2 +- generators/events/translateEvents.cpp | 2 +- generators/objects/translateObjects.cpp | 2 +- linux/fsfwconfig/events/translateEvents.cpp | 2 +- linux/fsfwconfig/objects/translateObjects.cpp | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/bsp_hosted/fsfwconfig/events/translateEvents.cpp b/bsp_hosted/fsfwconfig/events/translateEvents.cpp index e47fff0f..c1174d8a 100644 --- a/bsp_hosted/fsfwconfig/events/translateEvents.cpp +++ b/bsp_hosted/fsfwconfig/events/translateEvents.cpp @@ -1,7 +1,7 @@ /** * @brief Auto-generated event translation file. Contains 319 translations. * @details - * Generated on: 2024-01-30 09:05:49 + * Generated on: 2024-01-30 09:10:05 */ #include "translateEvents.h" diff --git a/bsp_hosted/fsfwconfig/objects/translateObjects.cpp b/bsp_hosted/fsfwconfig/objects/translateObjects.cpp index 766ee3fa..9de30a3c 100644 --- a/bsp_hosted/fsfwconfig/objects/translateObjects.cpp +++ b/bsp_hosted/fsfwconfig/objects/translateObjects.cpp @@ -2,7 +2,7 @@ * @brief Auto-generated object translation file. * @details * Contains 175 translations. - * Generated on: 2024-01-30 09:05:49 + * Generated on: 2024-01-30 09:10:05 */ #include "translateObjects.h" diff --git a/generators/bsp_hosted_returnvalues.csv b/generators/bsp_hosted_returnvalues.csv index c7c20d0b..52acf3dd 100644 --- a/generators/bsp_hosted_returnvalues.csv +++ b/generators/bsp_hosted_returnvalues.csv @@ -513,7 +513,7 @@ Full ID (hex); Name; Description; Unique ID; Subsytem Name; File Path 0x67a4;SADPL_SwitchingDeplSa2Failed;No description;164;SA_DEPL_HANDLER;mission/SolarArrayDeploymentHandler.h 0x6aa0;ACSCTRL_FileDeletionFailed;File deletion failed and at least one file is still existent.;160;ACS_CTRL;mission/controller/controllerdefinitions/AcsCtrlDefinitions.h 0x6aa1;ACSCTRL_WriteFileFailed;Writing the TLE to the file has failed.;161;ACS_CTRL;mission/controller/controllerdefinitions/AcsCtrlDefinitions.h -0x6aa2;ACSCTRL_MakeReturnCode;Reading the TLE to the file has failed.;162;ACS_CTRL;mission/controller/controllerdefinitions/AcsCtrlDefinitions.h +0x6aa2;ACSCTRL_ReadFileFailed;Reading the TLE to the file has failed.;162;ACS_CTRL;mission/controller/controllerdefinitions/AcsCtrlDefinitions.h 0x6aa3;ACSCTRL_SingleRwUnavailable;A single RW has failed.;163;ACS_CTRL;mission/controller/controllerdefinitions/AcsCtrlDefinitions.h 0x6aa4;ACSCTRL_MultipleRwUnavailable;Multiple RWs have failed.;164;ACS_CTRL;mission/controller/controllerdefinitions/AcsCtrlDefinitions.h 0x6b02;ACSMEKF_MekfUninitialized;No description;2;ACS_MEKF;mission/controller/acs/MultiplicativeKalmanFilter.h diff --git a/generators/bsp_q7s_returnvalues.csv b/generators/bsp_q7s_returnvalues.csv index 666dd130..72d47797 100644 --- a/generators/bsp_q7s_returnvalues.csv +++ b/generators/bsp_q7s_returnvalues.csv @@ -597,7 +597,7 @@ Full ID (hex); Name; Description; Unique ID; Subsytem Name; File Path 0x69c1;SPVRTVIF_NoReplyTimeout;No description;193;SUPV_RETURN_VALUES_IF;linux/payload/plocSupvDefs.h 0x6aa0;ACSCTRL_FileDeletionFailed;File deletion failed and at least one file is still existent.;160;ACS_CTRL;mission/controller/controllerdefinitions/AcsCtrlDefinitions.h 0x6aa1;ACSCTRL_WriteFileFailed;Writing the TLE to the file has failed.;161;ACS_CTRL;mission/controller/controllerdefinitions/AcsCtrlDefinitions.h -0x6aa2;ACSCTRL_MakeReturnCode;Reading the TLE to the file has failed.;162;ACS_CTRL;mission/controller/controllerdefinitions/AcsCtrlDefinitions.h +0x6aa2;ACSCTRL_ReadFileFailed;Reading the TLE to the file has failed.;162;ACS_CTRL;mission/controller/controllerdefinitions/AcsCtrlDefinitions.h 0x6aa3;ACSCTRL_SingleRwUnavailable;A single RW has failed.;163;ACS_CTRL;mission/controller/controllerdefinitions/AcsCtrlDefinitions.h 0x6aa4;ACSCTRL_MultipleRwUnavailable;Multiple RWs have failed.;164;ACS_CTRL;mission/controller/controllerdefinitions/AcsCtrlDefinitions.h 0x6b02;ACSMEKF_MekfUninitialized;No description;2;ACS_MEKF;mission/controller/acs/MultiplicativeKalmanFilter.h diff --git a/generators/events/translateEvents.cpp b/generators/events/translateEvents.cpp index e47fff0f..c1174d8a 100644 --- a/generators/events/translateEvents.cpp +++ b/generators/events/translateEvents.cpp @@ -1,7 +1,7 @@ /** * @brief Auto-generated event translation file. Contains 319 translations. * @details - * Generated on: 2024-01-30 09:05:49 + * Generated on: 2024-01-30 09:10:05 */ #include "translateEvents.h" diff --git a/generators/objects/translateObjects.cpp b/generators/objects/translateObjects.cpp index 08ad0eaa..7ab40047 100644 --- a/generators/objects/translateObjects.cpp +++ b/generators/objects/translateObjects.cpp @@ -2,7 +2,7 @@ * @brief Auto-generated object translation file. * @details * Contains 179 translations. - * Generated on: 2024-01-30 09:05:49 + * Generated on: 2024-01-30 09:10:05 */ #include "translateObjects.h" diff --git a/linux/fsfwconfig/events/translateEvents.cpp b/linux/fsfwconfig/events/translateEvents.cpp index e47fff0f..c1174d8a 100644 --- a/linux/fsfwconfig/events/translateEvents.cpp +++ b/linux/fsfwconfig/events/translateEvents.cpp @@ -1,7 +1,7 @@ /** * @brief Auto-generated event translation file. Contains 319 translations. * @details - * Generated on: 2024-01-30 09:05:49 + * Generated on: 2024-01-30 09:10:05 */ #include "translateEvents.h" diff --git a/linux/fsfwconfig/objects/translateObjects.cpp b/linux/fsfwconfig/objects/translateObjects.cpp index 08ad0eaa..7ab40047 100644 --- a/linux/fsfwconfig/objects/translateObjects.cpp +++ b/linux/fsfwconfig/objects/translateObjects.cpp @@ -2,7 +2,7 @@ * @brief Auto-generated object translation file. * @details * Contains 179 translations. - * Generated on: 2024-01-30 09:05:49 + * Generated on: 2024-01-30 09:10:05 */ #include "translateObjects.h" From 3cfde3071c4de6b8747f005caef81efd6d0ce42c Mon Sep 17 00:00:00 2001 From: meggert Date: Tue, 30 Jan 2024 09:27:44 +0100 Subject: [PATCH 62/64] bump tmtc --- tmtc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tmtc b/tmtc index bcdd12ca..d33013ed 160000 --- a/tmtc +++ b/tmtc @@ -1 +1 @@ -Subproject commit bcdd12caf05b6a874b0d3ac2b9436c4061545312 +Subproject commit d33013ed58131a69d09145af4f3c7a71766cebd3 From 0d80e2a8ecb095c91a0639da9cc8d2b1c14abbd5 Mon Sep 17 00:00:00 2001 From: meggert Date: Tue, 30 Jan 2024 09:27:53 +0100 Subject: [PATCH 63/64] changelog --- CHANGELOG.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ec91b607..21792d0e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,9 +16,9 @@ will consitute of a breaking change warranting a new major release: # [unreleased] -# [v7.6.0] 2024-01-29 +# [v7.6.0] 2024-01-30 -- Bumped `eive-tmtc` to +- Bumped `eive-tmtc` to v5.13.0 - Bumped `eive-fsfw` ## Added From 467ab39ad9c522145b93d9b28dbac61663b8dba5 Mon Sep 17 00:00:00 2001 From: meggert Date: Tue, 30 Jan 2024 09:28:46 +0100 Subject: [PATCH 64/64] frmt --- linux/payload/FreshSupvHandler.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/linux/payload/FreshSupvHandler.cpp b/linux/payload/FreshSupvHandler.cpp index 88a68635..a51934d6 100644 --- a/linux/payload/FreshSupvHandler.cpp +++ b/linux/payload/FreshSupvHandler.cpp @@ -1115,7 +1115,8 @@ void FreshSupvHandler::handleEvent(EventMessage* eventMessage) { if (not isCommandAlreadyActive(supv::SHUTDOWN_MPSOC)) { CommandMessage actionMsg; ActionMessage::setCommand(&actionMsg, supv::SHUTDOWN_MPSOC, store_address_t::invalid()); - result = messageQueue->sendMessageFrom(getCommandQueue(), &actionMsg, MessageQueueIF::NO_QUEUE); + result = messageQueue->sendMessageFrom(getCommandQueue(), &actionMsg, + MessageQueueIF::NO_QUEUE); if (result != returnvalue::OK) { triggerEvent(supv::SUPV_MPSOC_SHUTDOWN_BUILD_FAILED); sif::warning << "PlocSupervisorHandler::handleEvent: Failed to build MPSoC shutdown "