From 9833a4e043ef78a4be48b7b77407de4cf04d2506 Mon Sep 17 00:00:00 2001 From: meggert Date: Wed, 13 Dec 2023 16:52:42 +0100 Subject: [PATCH 1/2] and i wasted a day for this little shit bug --- mission/controller/acs/AttitudeEstimation.cpp | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/mission/controller/acs/AttitudeEstimation.cpp b/mission/controller/acs/AttitudeEstimation.cpp index 95a4046d..3e4a22c4 100644 --- a/mission/controller/acs/AttitudeEstimation.cpp +++ b/mission/controller/acs/AttitudeEstimation.cpp @@ -77,24 +77,22 @@ void AttitudeEstimation::quest(acsctrl::SusDataProcessed *susData, qBI[3] = (gamma + alpha) * (1 + VectorOperations::dot(normHelperB, normHelperI)); // Rotational Vector Part VectorOperations::mulScalar(helperCross, gamma + alpha, qRotVecPt0, 3); - VectorOperations::add(normHelperB, normHelperI, qRotVecPt1, 3); - VectorOperations::mulScalar(qRotVecPt1, beta, qRotVecPt1, 3); + VectorOperations::mulScalar(helperSum, beta, qRotVecPt1, 3); VectorOperations::add(qRotVecPt0, qRotVecPt1, qRotVecTot, 3); std::memcpy(qBI, qRotVecTot, sizeof(qRotVecTot)); - VectorOperations::mulScalar(qBI, constPlus, qBI, 3); + VectorOperations::mulScalar(qBI, constPlus, qBI, 4); QuaternionOperations::normalize(qBI, qBI); } else { // Scalar Part qBI[3] = (beta) * (1 + VectorOperations::dot(normHelperB, normHelperI)); // Rotational Vector Part VectorOperations::mulScalar(helperCross, beta, qRotVecPt0, 3); - VectorOperations::add(normHelperB, normHelperI, qRotVecPt1, 3); - VectorOperations::mulScalar(qRotVecPt1, gamma - alpha, qRotVecPt1, 3); + VectorOperations::mulScalar(helperSum, gamma - alpha, qRotVecPt1, 3); VectorOperations::add(qRotVecPt0, qRotVecPt1, qRotVecTot, 3); std::memcpy(qBI, qRotVecTot, sizeof(qRotVecTot)); - VectorOperations::mulScalar(qBI, constMinus, qBI, 3); + VectorOperations::mulScalar(qBI, constMinus, qBI, 4); QuaternionOperations::normalize(qBI, qBI); } // Low Pass -- 2.43.0 From 470127652320f1fd174c30bf101d9363d6a72a9b Mon Sep 17 00:00:00 2001 From: meggert Date: Wed, 13 Dec 2023 16:53:35 +0100 Subject: [PATCH 2/2] changelog --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 03fd90ee..f58905b1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -16,6 +16,10 @@ will consitute of a breaking change warranting a new major release: # [unreleased] +## Fixed + +- Fixed faulty scaling within the QUEST algorithm. + # [v7.5.1] 2023-12-13 - `eive-tmtc` v5.12.1 -- 2.43.0