diff --git a/CHANGELOG.md b/CHANGELOG.md index 3606d6eb..7f9681d3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -20,6 +20,11 @@ will consitute of a breaking change warranting a new major release: - Added `EXECUTE_SHELL_CMD` action command for `CoreController` to execute arbitrary Linux commands. +## Fixed + +- Pointing control of the `AcsController` was still expecting submodes instead of modes. +- Limitation of RW speeds was done before converting them to the correct unit scale. + # [v1.37.0] 2023-03-11 eive-tmtc: v2.18.1 diff --git a/mission/controller/AcsController.cpp b/mission/controller/AcsController.cpp index 8d1bd369..b4e7c5d3 100644 --- a/mission/controller/AcsController.cpp +++ b/mission/controller/AcsController.cpp @@ -304,7 +304,7 @@ void AcsController::performPointingCtrl() { // Variables required for setting actuators double torquePtgRws[4] = {0, 0, 0, 0}, rwTrqNs[4] = {0, 0, 0, 0}, torqueRws[4] = {0, 0, 0, 0}, mgtDpDes[3] = {0, 0, 0}; - switch (submode) { + switch (mode) { case acs::PTG_IDLE: guidance.targetQuatPtgSun(susDataProcessed.sunIjkModel.value, targetQuat, targetSatRotRate); guidance.comparePtg(mekfData.quatMekf.value, mekfData.satRotRateMekf.value, targetQuat, @@ -416,6 +416,9 @@ void AcsController::performPointingCtrl() { &(sensorValues.rw3Set.currSpeed.value), &(sensorValues.rw4Set.currSpeed.value), mgtDpDes); enableAntiStiction = acsParameters.inertialModeControllerParameters.enableAntiStiction; break; + default: + sif::error << "AcsController: Invalid mode for performPointingCtrl"; + break; } actuatorCmd.cmdSpeedToRws( diff --git a/mission/controller/acs/ActuatorCmd.cpp b/mission/controller/acs/ActuatorCmd.cpp index f32ce241..457cacce 100644 --- a/mission/controller/acs/ActuatorCmd.cpp +++ b/mission/controller/acs/ActuatorCmd.cpp @@ -42,14 +42,14 @@ void ActuatorCmd::cmdSpeedToRws(int32_t speedRw0, int32_t speedRw1, int32_t spee deltaSpeedInt[i] = std::round(deltaSpeed[i]); } VectorOperations::add(speedRws, deltaSpeedInt, rwCmdSpeed, 4); + VectorOperations::mulScalar(rwCmdSpeed, 10, rwCmdSpeed, 4); for (uint8_t i = 0; i < 4; i++) { if (rwCmdSpeed[i] > maxRwSpeed) { rwCmdSpeed[i] = maxRwSpeed; } else if (rwCmdSpeed[i] < -maxRwSpeed) { rwCmdSpeed[i] = -maxRwSpeed; } - } - VectorOperations::mulScalar(rwCmdSpeed, 10, rwCmdSpeed, 4); + } } void ActuatorCmd::cmdDipolMtq(const double *dipolMoment, int16_t *dipolMomentActuator,