From 07572ab3a029780493145f793df474cc19127465 Mon Sep 17 00:00:00 2001 From: meggert Date: Mon, 17 Apr 2023 09:20:09 +0200 Subject: [PATCH 1/3] fixed shadowing --- mission/controller/acs/control/SafeCtrl.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/mission/controller/acs/control/SafeCtrl.cpp b/mission/controller/acs/control/SafeCtrl.cpp index ce50f276..f0ebd5a0 100644 --- a/mission/controller/acs/control/SafeCtrl.cpp +++ b/mission/controller/acs/control/SafeCtrl.cpp @@ -95,7 +95,6 @@ void SafeCtrl::safeRateDamping(const double *magFieldB, const double *satRotRate acsParameters->safeModeControllerParameters.k_orthoNonMekf); // sum of all torques - double cmdTorque[3] = {0, 0, 0}; VectorOperations::add(cmdParallel, cmdOrtho, cmdTorque, 3); // calculate magnetic moment to command From e05d9d4b2a14d5c132eddddcbc243b6a9b528c1f Mon Sep 17 00:00:00 2001 From: meggert Date: Mon, 17 Apr 2023 09:29:50 +0200 Subject: [PATCH 2/3] prevent low pass filter if no sensor data is available --- mission/controller/acs/SensorProcessing.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/mission/controller/acs/SensorProcessing.cpp b/mission/controller/acs/SensorProcessing.cpp index c1030c7b..4cc15a16 100644 --- a/mission/controller/acs/SensorProcessing.cpp +++ b/mission/controller/acs/SensorProcessing.cpp @@ -150,7 +150,8 @@ void SensorProcessing::processMgm(const float *mgm0Value, bool mgm0valid, const } timeOfSavedMagFieldEst = timeOfMgmMeasurement; - if (mgmDataProcessed->mgmVecTotDerivative.isValid()) { + if (VectorOperations::norm(mgmVecTotDerivative, 3) != 0 and + mgmDataProcessed->mgmVecTotDerivative.isValid()) { lowPassFilter(mgmVecTotDerivative, mgmDataProcessed->mgmVecTotDerivative.value, mgmParameters->mgmDerivativeFilterWeight); } @@ -533,7 +534,7 @@ void SensorProcessing::processGyr( } } - if (gyrDataProcessed->gyrVecTot.isValid()) { + if (VectorOperations::norm(gyrVecTot, 3) != 0 and gyrDataProcessed->gyrVecTot.isValid()) { lowPassFilter(gyrVecTot, gyrDataProcessed->gyrVecTot.value, gyrParameters->gyrFilterWeight); } From 9097a3f3c7be6f338e1facf19da5173fe9efa752 Mon Sep 17 00:00:00 2001 From: meggert Date: Mon, 17 Apr 2023 09:35:23 +0200 Subject: [PATCH 3/3] changelog --- CHANGELOG.md | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 69acb077..9d318d21 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,15 @@ will consitute of a breaking change warranting a new major release: # [unreleased] +## Fixed + +- Fixed shadowing within the `SafeCtrl`, which prevented actuator commands to be calculated during + eclipse phase. + +## Changed + +- Low-pass filters can no longer be executed if no actual data is available. + # [v2.0.2] 2023-04-16 - Bump patch version to 2.