Merge pull request 'QUEST Fix II' (#834) from quest-fix2 into main
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good

Reviewed-on: #834
Reviewed-by: Robin Müller <muellerr@irs.uni-stuttgart.de>
This commit is contained in:
Robin Müller 2023-12-13 11:24:21 +01:00
commit 1e58de635c
2 changed files with 9 additions and 8 deletions

View File

@ -19,6 +19,7 @@ will consitute of a breaking change warranting a new major release:
## Fixed
- Faulty mapping of input values for QUEST algorithm.
- Fixed validity check for QUEST algorithm.
# [v7.5.0] 2023-12-06

View File

@ -8,14 +8,14 @@ AttitudeEstimation::~AttitudeEstimation() {}
void AttitudeEstimation::quest(acsctrl::SusDataProcessed *susData,
acsctrl::MgmDataProcessed *mgmData,
acsctrl::AttitudeEstimationData *attitudeEstimation) {
acsctrl::AttitudeEstimationData *attitudeEstimationData) {
if (not(susData->susVecTot.isValid() and susData->sunIjkModel.isValid() and
mgmData->mgmVecTot.value and mgmData->magIgrfModel.isValid())) {
mgmData->mgmVecTot.isValid() and mgmData->magIgrfModel.isValid())) {
{
PoolReadGuard pg{attitudeEstimation};
PoolReadGuard pg{attitudeEstimationData};
if (pg.getReadResult() == returnvalue::OK) {
std::memcpy(attitudeEstimation->quatQuest.value, ZERO_VEC4, 4 * sizeof(double));
attitudeEstimation->quatQuest.setValid(false);
std::memcpy(attitudeEstimationData->quatQuest.value, ZERO_VEC4, 4 * sizeof(double));
attitudeEstimationData->quatQuest.setValid(false);
}
}
return;
@ -102,10 +102,10 @@ void AttitudeEstimation::quest(acsctrl::SusDataProcessed *susData,
QuaternionOperations::slerp(qBI, qOld, acsParameters->onBoardParams.questFilterWeight, qBI);
}
{
PoolReadGuard pg{attitudeEstimation};
PoolReadGuard pg{attitudeEstimationData};
if (pg.getReadResult() == returnvalue::OK) {
std::memcpy(attitudeEstimation->quatQuest.value, qBI, 4 * sizeof(double));
attitudeEstimation->quatQuest.setValid(true);
std::memcpy(attitudeEstimationData->quatQuest.value, qBI, 4 * sizeof(double));
attitudeEstimationData->quatQuest.setValid(true);
}
}
}