From 4b8f5992b544a39ef7be96cef24a4e517b532148 Mon Sep 17 00:00:00 2001 From: meggert Date: Thu, 16 Feb 2023 11:48:16 +0100 Subject: [PATCH 1/7] matched naming to actual RWs --- mission/controller/acs/AcsParameters.cpp | 10 +++++----- mission/controller/acs/AcsParameters.h | 8 ++++---- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/mission/controller/acs/AcsParameters.cpp b/mission/controller/acs/AcsParameters.cpp index 44bed15f..a06d6a58 100644 --- a/mission/controller/acs/AcsParameters.cpp +++ b/mission/controller/acs/AcsParameters.cpp @@ -294,17 +294,17 @@ ReturnValue_t AcsParameters::getParameter(uint8_t domainId, uint8_t parameterId, parameterWrapper->set(rwMatrices.pseudoInverse); break; case 0x2: - parameterWrapper->set(rwMatrices.without0); - break; - case 0x3: parameterWrapper->set(rwMatrices.without1); break; - case 0x4: + case 0x3: parameterWrapper->set(rwMatrices.without2); break; - case 0x5: + case 0x4: parameterWrapper->set(rwMatrices.without3); break; + case 0x5: + parameterWrapper->set(rwMatrices.without4); + break; case 0x6: parameterWrapper->set(rwMatrices.nullspace); break; diff --git a/mission/controller/acs/AcsParameters.h b/mission/controller/acs/AcsParameters.h index f68b10cf..a930052b 100644 --- a/mission/controller/acs/AcsParameters.h +++ b/mission/controller/acs/AcsParameters.h @@ -802,13 +802,13 @@ class AcsParameters : public HasParametersIF { {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 without0[4][3] = { - {0, 0, 0}, {0.5432, -0.5432, 1.2797}, {-1.0864, 0, 0}, {0.5432, 0.5432, 1.2797}}; double without1[4][3] = { - {0.5432, -0.5432, 1.2797}, {0, 0, 0}, {-0.5432, -0.5432, 1.2797}, {0, 1.0864, 0}}; + {0, 0, 0}, {0.5432, -0.5432, 1.2797}, {-1.0864, 0, 0}, {0.5432, 0.5432, 1.2797}}; double without2[4][3] = { - {1.0864, 0, 0}, {-0.5432, -0.5432, 1.2797}, {0, 0, 0}, {-0.5432, 0.5432, 1.2797}}; + {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}}; double nullspace[4] = {-0.5000, 0.5000, -0.5000, 0.5000}; } rwMatrices; -- 2.43.0 From 97f7f7c97365a3622645bfa0ccae0a4c95bb6ae4 Mon Sep 17 00:00:00 2001 From: meggert Date: Thu, 16 Feb 2023 15:40:16 +0100 Subject: [PATCH 2/7] RW pseudo inverses now set from RW state. multiple invalids trigger event and disable ptgCtrl --- mission/acsDefs.h | 2 + mission/controller/AcsController.cpp | 6 +- mission/controller/acs/Guidance.cpp | 117 ++++++--------------------- mission/controller/acs/Guidance.h | 2 +- 4 files changed, 31 insertions(+), 96 deletions(-) diff --git a/mission/acsDefs.h b/mission/acsDefs.h index 57ae4730..f68ff24a 100644 --- a/mission/acsDefs.h +++ b/mission/acsDefs.h @@ -23,6 +23,8 @@ static const uint8_t SUBSYSTEM_ID = SUBSYSTEM_ID::ACS_SUBSYSTEM; static const Event SAFE_RATE_VIOLATION = MAKE_EVENT(0, severity::MEDIUM); //!< The system has recovered from a safe rate rotation violation. static constexpr Event SAFE_RATE_RECOVERY = MAKE_EVENT(1, severity::MEDIUM); +//!< Multiple RWs are invalid, not commandable and therefore higher ACS modes cannot be maintained. +static constexpr Event MULTIPLE_RW_INVALID = MAKE_EVENT(2, severity::HIGH); extern const char* getModeStr(AcsMode mode); diff --git a/mission/controller/AcsController.cpp b/mission/controller/AcsController.cpp index 220c477e..352f4167 100644 --- a/mission/controller/AcsController.cpp +++ b/mission/controller/AcsController.cpp @@ -263,7 +263,11 @@ void AcsController::performPointingCtrl() { double quatErrorComplete[4] = {0, 0, 0, 0}, quatError[3] = {0, 0, 0}, deltaRate[3] = {0, 0, 0}; // ToDo: check if pointer needed double rwPseudoInv[4][3] = {{0, 0, 0}, {0, 0, 0}, {0, 0, 0}, {0, 0, 0}}; - guidance.getDistributionMatrixRw(&sensorValues, *rwPseudoInv); + ReturnValue_t result = guidance.getDistributionMatrixRw(&sensorValues, *rwPseudoInv); + if (result == returnvalue::FAILED) { + triggerEvent(acs::MULTIPLE_RW_INVALID); + return; + } double torquePtgRws[4] = {0, 0, 0, 0}, rwTrqNs[4] = {0, 0, 0, 0}; double torqueRws[4] = {0, 0, 0, 0}, torqueRwsScaled[4] = {0, 0, 0, 0}; double mgtDpDes[3] = {0, 0, 0}; diff --git a/mission/controller/acs/Guidance.cpp b/mission/controller/acs/Guidance.cpp index 383a265f..d7db0538 100644 --- a/mission/controller/acs/Guidance.cpp +++ b/mission/controller/acs/Guidance.cpp @@ -610,104 +610,33 @@ void Guidance::comparePtg(double targetQuat[4], acsctrl::MekfData *mekfData, dou // under 150 arcsec ?? } -void Guidance::getDistributionMatrixRw(ACS::SensorValues *sensorValues, double *rwPseudoInv) { - if (sensorValues->rw1Set.isValid() && sensorValues->rw2Set.isValid() && - sensorValues->rw3Set.isValid() && sensorValues->rw4Set.isValid()) { - rwPseudoInv[0] = acsParameters.rwMatrices.pseudoInverse[0][0]; - rwPseudoInv[1] = acsParameters.rwMatrices.pseudoInverse[0][1]; - rwPseudoInv[2] = acsParameters.rwMatrices.pseudoInverse[0][2]; - rwPseudoInv[3] = acsParameters.rwMatrices.pseudoInverse[1][0]; - rwPseudoInv[4] = acsParameters.rwMatrices.pseudoInverse[1][1]; - rwPseudoInv[5] = acsParameters.rwMatrices.pseudoInverse[1][2]; - rwPseudoInv[6] = acsParameters.rwMatrices.pseudoInverse[2][0]; - rwPseudoInv[7] = acsParameters.rwMatrices.pseudoInverse[2][1]; - rwPseudoInv[8] = acsParameters.rwMatrices.pseudoInverse[2][2]; - rwPseudoInv[9] = acsParameters.rwMatrices.pseudoInverse[3][0]; - rwPseudoInv[10] = acsParameters.rwMatrices.pseudoInverse[3][1]; - rwPseudoInv[11] = acsParameters.rwMatrices.pseudoInverse[3][2]; +ReturnValue_t Guidance::getDistributionMatrixRw(ACS::SensorValues *sensorValues, + double *rwPseudoInv) { + bool rw1valid = (sensorValues->rw1Set.state.value && sensorValues->rw1Set.state.isValid()); + bool rw2valid = (sensorValues->rw2Set.state.value && sensorValues->rw2Set.state.isValid()); + bool rw3valid = (sensorValues->rw3Set.state.value && sensorValues->rw3Set.state.isValid()); + bool rw4valid = (sensorValues->rw4Set.state.value && sensorValues->rw4Set.state.isValid()); - } - - else if (!(sensorValues->rw1Set.isValid()) && sensorValues->rw2Set.isValid() && - sensorValues->rw3Set.isValid() && sensorValues->rw4Set.isValid()) { - rwPseudoInv[0] = acsParameters.rwMatrices.without0[0][0]; - rwPseudoInv[1] = acsParameters.rwMatrices.without0[0][1]; - rwPseudoInv[2] = acsParameters.rwMatrices.without0[0][2]; - rwPseudoInv[3] = acsParameters.rwMatrices.without0[1][0]; - rwPseudoInv[4] = acsParameters.rwMatrices.without0[1][1]; - rwPseudoInv[5] = acsParameters.rwMatrices.without0[1][2]; - rwPseudoInv[6] = acsParameters.rwMatrices.without0[2][0]; - rwPseudoInv[7] = acsParameters.rwMatrices.without0[2][1]; - rwPseudoInv[8] = acsParameters.rwMatrices.without0[2][2]; - rwPseudoInv[9] = acsParameters.rwMatrices.without0[3][0]; - rwPseudoInv[10] = acsParameters.rwMatrices.without0[3][1]; - rwPseudoInv[11] = acsParameters.rwMatrices.without0[3][2]; - } - - else if ((sensorValues->rw1Set.isValid()) && !(sensorValues->rw2Set.isValid()) && - sensorValues->rw3Set.isValid() && sensorValues->rw4Set.isValid()) { - rwPseudoInv[0] = acsParameters.rwMatrices.without1[0][0]; - rwPseudoInv[1] = acsParameters.rwMatrices.without1[0][1]; - rwPseudoInv[2] = acsParameters.rwMatrices.without1[0][2]; - rwPseudoInv[3] = acsParameters.rwMatrices.without1[1][0]; - rwPseudoInv[4] = acsParameters.rwMatrices.without1[1][1]; - rwPseudoInv[5] = acsParameters.rwMatrices.without1[1][2]; - rwPseudoInv[6] = acsParameters.rwMatrices.without1[2][0]; - rwPseudoInv[7] = acsParameters.rwMatrices.without1[2][1]; - rwPseudoInv[8] = acsParameters.rwMatrices.without1[2][2]; - rwPseudoInv[9] = acsParameters.rwMatrices.without1[3][0]; - rwPseudoInv[10] = acsParameters.rwMatrices.without1[3][1]; - rwPseudoInv[11] = acsParameters.rwMatrices.without1[3][2]; - } - - else if ((sensorValues->rw1Set.isValid()) && (sensorValues->rw2Set.isValid()) && - !(sensorValues->rw3Set.isValid()) && sensorValues->rw4Set.isValid()) { - rwPseudoInv[0] = acsParameters.rwMatrices.without2[0][0]; - rwPseudoInv[1] = acsParameters.rwMatrices.without2[0][1]; - rwPseudoInv[2] = acsParameters.rwMatrices.without2[0][2]; - rwPseudoInv[3] = acsParameters.rwMatrices.without2[1][0]; - rwPseudoInv[4] = acsParameters.rwMatrices.without2[1][1]; - rwPseudoInv[5] = acsParameters.rwMatrices.without2[1][2]; - rwPseudoInv[6] = acsParameters.rwMatrices.without2[2][0]; - rwPseudoInv[7] = acsParameters.rwMatrices.without2[2][1]; - rwPseudoInv[8] = acsParameters.rwMatrices.without2[2][2]; - rwPseudoInv[9] = acsParameters.rwMatrices.without2[3][0]; - rwPseudoInv[10] = acsParameters.rwMatrices.without2[3][1]; - rwPseudoInv[11] = acsParameters.rwMatrices.without2[3][2]; - } - - else if ((sensorValues->rw1Set.isValid()) && (sensorValues->rw2Set.isValid()) && - (sensorValues->rw3Set.isValid()) && !(sensorValues->rw4Set.isValid())) { - rwPseudoInv[0] = acsParameters.rwMatrices.without3[0][0]; - rwPseudoInv[1] = acsParameters.rwMatrices.without3[0][1]; - rwPseudoInv[2] = acsParameters.rwMatrices.without3[0][2]; - rwPseudoInv[3] = acsParameters.rwMatrices.without3[1][0]; - rwPseudoInv[4] = acsParameters.rwMatrices.without3[1][1]; - rwPseudoInv[5] = acsParameters.rwMatrices.without3[1][2]; - rwPseudoInv[6] = acsParameters.rwMatrices.without3[2][0]; - rwPseudoInv[7] = acsParameters.rwMatrices.without3[2][1]; - rwPseudoInv[8] = acsParameters.rwMatrices.without3[2][2]; - rwPseudoInv[9] = acsParameters.rwMatrices.without3[3][0]; - rwPseudoInv[10] = acsParameters.rwMatrices.without3[3][1]; - rwPseudoInv[11] = acsParameters.rwMatrices.without3[3][2]; - } - - else { + if (rw1valid && rw2valid && rw3valid && rw4valid) { + std::memcpy(rwPseudoInv, acsParameters.rwMatrices.pseudoInverse, 12 * sizeof(double)); + return returnvalue::OK; + } else if (!rw1valid && rw2valid && rw3valid && rw4valid) { + std::memcpy(rwPseudoInv, acsParameters.rwMatrices.without1, 12 * sizeof(double)); + return returnvalue::OK; + } else if (rw1valid && !rw2valid && rw3valid && rw4valid) { + std::memcpy(rwPseudoInv, acsParameters.rwMatrices.without2, 12 * sizeof(double)); + return returnvalue::OK; + } else if (rw1valid && rw2valid && !rw3valid && rw4valid) { + std::memcpy(rwPseudoInv, acsParameters.rwMatrices.without3, 12 * sizeof(double)); + return returnvalue::OK; + } else if (rw1valid && rw2valid && rw3valid && !rw4valid) { + std::memcpy(rwPseudoInv, acsParameters.rwMatrices.without4, 12 * sizeof(double)); + return returnvalue::OK; + } else { // @note: This one takes the normal pseudoInverse of all four raction wheels valid. // Does not make sense, but is implemented that way in MATLAB ?! // Thought: It does not really play a role, because in case there are more then one // reaction wheel invalid the pointing control is destined to fail. - rwPseudoInv[0] = acsParameters.rwMatrices.pseudoInverse[0][0]; - rwPseudoInv[1] = acsParameters.rwMatrices.pseudoInverse[0][1]; - rwPseudoInv[2] = acsParameters.rwMatrices.pseudoInverse[0][2]; - rwPseudoInv[3] = acsParameters.rwMatrices.pseudoInverse[1][0]; - rwPseudoInv[4] = acsParameters.rwMatrices.pseudoInverse[1][1]; - rwPseudoInv[5] = acsParameters.rwMatrices.pseudoInverse[1][2]; - rwPseudoInv[6] = acsParameters.rwMatrices.pseudoInverse[2][0]; - rwPseudoInv[7] = acsParameters.rwMatrices.pseudoInverse[2][1]; - rwPseudoInv[8] = acsParameters.rwMatrices.pseudoInverse[2][2]; - rwPseudoInv[9] = acsParameters.rwMatrices.pseudoInverse[3][0]; - rwPseudoInv[10] = acsParameters.rwMatrices.pseudoInverse[3][1]; - rwPseudoInv[11] = acsParameters.rwMatrices.pseudoInverse[3][2]; + return returnvalue::FAILED; } } diff --git a/mission/controller/acs/Guidance.h b/mission/controller/acs/Guidance.h index 0401d07c..32c013fc 100644 --- a/mission/controller/acs/Guidance.h +++ b/mission/controller/acs/Guidance.h @@ -67,7 +67,7 @@ class Guidance { // @note: will give back the pseudoinverse matrix for the reaction wheel depending on the valid // reation wheel maybe can be done in "commanding.h" - void getDistributionMatrixRw(ACS::SensorValues *sensorValues, double *rwPseudoInv); + ReturnValue_t getDistributionMatrixRw(ACS::SensorValues *sensorValues, double *rwPseudoInv); private: AcsParameters acsParameters; -- 2.43.0 From 8b1d6cf07d69c988d69b0e7d323cbf03a5931fdd Mon Sep 17 00:00:00 2001 From: meggert Date: Thu, 16 Feb 2023 16:27:32 +0100 Subject: [PATCH 3/7] added event handling for failure of more than one RW --- mission/system/objects/AcsSubsystem.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/mission/system/objects/AcsSubsystem.cpp b/mission/system/objects/AcsSubsystem.cpp index b4ee3d52..d24572af 100644 --- a/mission/system/objects/AcsSubsystem.cpp +++ b/mission/system/objects/AcsSubsystem.cpp @@ -42,6 +42,11 @@ ReturnValue_t AcsSubsystem::initialize() { if (result != returnvalue::OK) { sif::error << "AcsSubsystem: Subscribing for acs::SAFE_RATE_RECOVERY failed" << std::endl; } + result = + manager->subscribeToEvent(eventQueue->getId(), event::getEventId(acs::MULTIPLE_RW_INVALID)); + if (result != returnvalue::OK) { + sif::error << "AcsSubsystem: Subscribing for acs::MULTIPLE_RW_INVALID failed" << std::endl; + } return Subsystem::initialize(); } @@ -64,12 +69,13 @@ void AcsSubsystem::handleEventMessages() { sif::error << "AcsSubsystem: sending DETUMBLE mode cmd to self has failed" << std::endl; } } - if (event.getEvent() == acs::SAFE_RATE_RECOVERY) { + if (event.getEvent() == acs::SAFE_RATE_RECOVERY || + event.getEvent() == acs::MULTIPLE_RW_INVALID) { CommandMessage msg; ModeMessage::setCmdModeMessage(msg, acs::AcsMode::SAFE, 0); ReturnValue_t result = commandQueue->sendMessage(commandQueue->getId(), &msg); if (result != returnvalue::OK) { - sif::error << "AcsSubsystem: sending IDLE mode cmd to self has failed" << std::endl; + sif::error << "AcsSubsystem: sending SAFE mode cmd to self has failed" << std::endl; } } break; -- 2.43.0 From 08f36954adfa5348a4e2c6c9bc6409b67ca02885 Mon Sep 17 00:00:00 2001 From: meggert Date: Fri, 17 Feb 2023 09:20:38 +0100 Subject: [PATCH 4/7] fixed rwHandlingParameter types --- mission/controller/acs/AcsParameters.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/mission/controller/acs/AcsParameters.h b/mission/controller/acs/AcsParameters.h index a930052b..365a04bd 100644 --- a/mission/controller/acs/AcsParameters.h +++ b/mission/controller/acs/AcsParameters.h @@ -788,9 +788,9 @@ class AcsParameters : public HasParametersIF { struct RwHandlingParameters { double inertiaWheel = 0.000028198; - double maxTrq = 0.0032; // 3.2 [mNm] - double stictionSpeed = 100; // 80; // RPM - double stictionReleaseSpeed = 120; // RPM + double maxTrq = 0.0032; // 3.2 [mNm] + int32_t stictionSpeed = 100; // RPM + int32_t stictionReleaseSpeed = 120; // RPM double stictionTorque = 0.0006; uint16_t rampTime = 10; -- 2.43.0 From 75ade4d8f8b047fc3142845622aad181a9a3a189 Mon Sep 17 00:00:00 2001 From: meggert Date: Fri, 17 Feb 2023 09:21:30 +0100 Subject: [PATCH 5/7] event for multiple invalid rw now triggert after 5 failures --- mission/controller/AcsController.cpp | 13 ++++++++----- mission/controller/AcsController.h | 1 + 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/mission/controller/AcsController.cpp b/mission/controller/AcsController.cpp index 352f4167..74fce754 100644 --- a/mission/controller/AcsController.cpp +++ b/mission/controller/AcsController.cpp @@ -15,6 +15,7 @@ AcsController::AcsController(object_id_t objectId) detumble(&acsParameters), ptgCtrl(&acsParameters), detumbleCounter{0}, + multipleRwUnavailableCounter{0}, parameterHelper(this), mgmDataRaw(this), mgmDataProcessed(this), @@ -265,8 +266,13 @@ void AcsController::performPointingCtrl() { 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) { - triggerEvent(acs::MULTIPLE_RW_INVALID); + multipleRwUnavailableCounter++; + if (multipleRwUnavailableCounter > 4) { + triggerEvent(acs::MULTIPLE_RW_INVALID); + } return; + } else { + multipleRwUnavailableCounter = 0; } double torquePtgRws[4] = {0, 0, 0, 0}, rwTrqNs[4] = {0, 0, 0, 0}; double torqueRws[4] = {0, 0, 0, 0}, torqueRwsScaled[4] = {0, 0, 0, 0}; @@ -389,10 +395,7 @@ void AcsController::performPointingCtrl() { } if (enableAntiStiction) { - bool rwAvailable[4] = {true, true, true, true}; // WHICH INPUT SENSOR SET? - int32_t rwSpeed[4] = {sensorValues.rw1Set.currSpeed.value, sensorValues.rw2Set.currSpeed.value, - sensorValues.rw3Set.currSpeed.value, sensorValues.rw4Set.currSpeed.value}; - ptgCtrl.rwAntistiction(rwAvailable, rwSpeed, torqueRwsScaled); + ptgCtrl.rwAntistiction(&sensorValues, torqueRwsScaled); } int32_t cmdSpeedRws[4] = {0, 0, 0, 0}; diff --git a/mission/controller/AcsController.h b/mission/controller/AcsController.h index c0e719f2..265fe930 100644 --- a/mission/controller/AcsController.h +++ b/mission/controller/AcsController.h @@ -50,6 +50,7 @@ class AcsController : public ExtendedControllerBase, public ReceivesParameterMes PtgCtrl ptgCtrl; uint8_t detumbleCounter; + uint8_t multipleRwUnavailableCounter; ParameterHelper parameterHelper; -- 2.43.0 From 7ee9bf6edf4f7c611bc49ebaddfede530c7b0572 Mon Sep 17 00:00:00 2001 From: meggert Date: Fri, 17 Feb 2023 09:21:55 +0100 Subject: [PATCH 6/7] rwAntistiction now gets actual RW states --- mission/controller/acs/control/PtgCtrl.cpp | 10 ++++++++-- mission/controller/acs/control/PtgCtrl.h | 5 ++--- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/mission/controller/acs/control/PtgCtrl.cpp b/mission/controller/acs/control/PtgCtrl.cpp index 352c0319..60394421 100644 --- a/mission/controller/acs/control/PtgCtrl.cpp +++ b/mission/controller/acs/control/PtgCtrl.cpp @@ -161,8 +161,14 @@ void PtgCtrl::ptgNullspace(AcsParameters::PointingLawParameters *pointingLawPara VectorOperations::mulScalar(rwTrqNs, -1, rwTrqNs, 4); } -void PtgCtrl::rwAntistiction(const bool *rwAvailable, const int32_t *omegaRw, - double *torqueCommand) { +void PtgCtrl::rwAntistiction(ACS::SensorValues *sensorValues, double *torqueCommand) { + bool rwAvailable[4] = { + (sensorValues->rw1Set.state.value && sensorValues->rw1Set.state.isValid()), + (sensorValues->rw2Set.state.value && sensorValues->rw2Set.state.isValid()), + (sensorValues->rw3Set.state.value && sensorValues->rw3Set.state.isValid()), + (sensorValues->rw4Set.state.value && sensorValues->rw4Set.state.isValid())}; + int32_t omegaRw[4] = {sensorValues->rw1Set.currSpeed.value, sensorValues->rw2Set.currSpeed.value, + sensorValues->rw3Set.currSpeed.value, sensorValues->rw4Set.currSpeed.value}; for (uint8_t i = 0; i < 4; i++) { if (rwAvailable[i]) { if (torqueMemory[i] != 0) { diff --git a/mission/controller/acs/control/PtgCtrl.h b/mission/controller/acs/control/PtgCtrl.h index 5e9a704c..fb27fc6d 100644 --- a/mission/controller/acs/control/PtgCtrl.h +++ b/mission/controller/acs/control/PtgCtrl.h @@ -54,11 +54,10 @@ class PtgCtrl { const int32_t *speedRw3, double *rwTrqNs); /* @brief: Commands the stiction torque in case wheel speed is to low - * @param: rwAvailable Boolean Flag for all reaction wheels - * omegaRw current wheel speed of reaction wheels + * @param: sensorValues class containing all RW related values * torqueCommand modified torque after antistiction */ - void rwAntistiction(const bool *rwAvailable, const int32_t *omegaRw, double *torqueCommand); + void rwAntistiction(ACS::SensorValues *sensorValues, double *torqueCommand); private: AcsParameters::RwHandlingParameters *rwHandlingParameters; -- 2.43.0 From f54945de12a5ad8b4794ad3a666a92c0dec7c8b0 Mon Sep 17 00:00:00 2001 From: meggert Date: Fri, 17 Feb 2023 09:46:20 +0100 Subject: [PATCH 7/7] changelog --- CHANGELOG.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9c1319d3..eea2333c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -17,6 +17,13 @@ change warranting a new major release: # [unreleased] +## Added + +- In case the ACS Controller does recognize more than one RW to be invalid and therefore not + available, it does not perform pointing control but aborts shortly after `sensorProcessing`. If the + problem persits for 5 ACS cycles, the `MULTIPLE_RW_INVALID` event is triggered, which invokes the + transition of the `AcsSubsystem` to safe mode. + ## Changed - Igrf13 model vector now outputs as uT instead of nT @@ -25,6 +32,9 @@ change warranting a new major release: ## Fixed - Fixed values for GYR sensor fusion +- Fixed speed types for `rwHandlingParameter` +- Pseudo inverse used for allocating torque to RWs and RW antistiction now actually consider the + state of the RWs # [v1.27.2] 2023-02-14 -- 2.43.0