acs-safe-hotfix #608

Merged
muellerr merged 3 commits from acs-safe-hotfix into develop 2023-04-17 10:15:53 +02:00
3 changed files with 12 additions and 3 deletions

View File

@ -16,6 +16,15 @@ will consitute of a breaking change warranting a new major release:
# [unreleased] # [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 # [v2.0.2] 2023-04-16
- Bump patch version to 2. - Bump patch version to 2.

View File

@ -150,7 +150,8 @@ void SensorProcessing::processMgm(const float *mgm0Value, bool mgm0valid, const
} }
timeOfSavedMagFieldEst = timeOfMgmMeasurement; timeOfSavedMagFieldEst = timeOfMgmMeasurement;
if (mgmDataProcessed->mgmVecTotDerivative.isValid()) { if (VectorOperations<double>::norm(mgmVecTotDerivative, 3) != 0 and
mgmDataProcessed->mgmVecTotDerivative.isValid()) {
lowPassFilter(mgmVecTotDerivative, mgmDataProcessed->mgmVecTotDerivative.value, lowPassFilter(mgmVecTotDerivative, mgmDataProcessed->mgmVecTotDerivative.value,
mgmParameters->mgmDerivativeFilterWeight); mgmParameters->mgmDerivativeFilterWeight);
} }
@ -533,7 +534,7 @@ void SensorProcessing::processGyr(
} }
} }
if (gyrDataProcessed->gyrVecTot.isValid()) { if (VectorOperations<double>::norm(gyrVecTot, 3) != 0 and gyrDataProcessed->gyrVecTot.isValid()) {
lowPassFilter(gyrVecTot, gyrDataProcessed->gyrVecTot.value, gyrParameters->gyrFilterWeight); lowPassFilter(gyrVecTot, gyrDataProcessed->gyrVecTot.value, gyrParameters->gyrFilterWeight);
} }

View File

@ -95,7 +95,6 @@ void SafeCtrl::safeRateDamping(const double *magFieldB, const double *satRotRate
acsParameters->safeModeControllerParameters.k_orthoNonMekf); acsParameters->safeModeControllerParameters.k_orthoNonMekf);
// sum of all torques // sum of all torques
double cmdTorque[3] = {0, 0, 0};
VectorOperations<double>::add(cmdParallel, cmdOrtho, cmdTorque, 3); VectorOperations<double>::add(cmdParallel, cmdOrtho, cmdTorque, 3);
// calculate magnetic moment to command // calculate magnetic moment to command