this makes more sense

This commit is contained in:
2024-01-29 11:08:47 +01:00
parent 0064cf13cb
commit f7c997980c
5 changed files with 24 additions and 27 deletions

View File

@ -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)); }

View File

@ -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;