dataset output
Some checks failed
EIVE/eive-obsw/pipeline/pr-main There was a failure building this commit

This commit is contained in:
Marius Eggert 2023-11-23 11:50:26 +01:00
parent 0aa09bd516
commit 886dd17e4a
2 changed files with 17 additions and 2 deletions

View File

@ -87,8 +87,20 @@ void AttitudeEstimation::quest(acsctrl::SusDataProcessed *susData,
VectorOperations<double>::mulScalar(qBI, constMinus, qBI, 3); VectorOperations<double>::mulScalar(qBI, constMinus, qBI, 3);
QuaternionOperations::normalize(qBI, qBI); QuaternionOperations::normalize(qBI, qBI);
} }
// ToDo: fill dataset and set to valid {
PoolReadGuard pg{attitudeEstimation};
if (pg.getReadResult() == returnvalue::OK) {
std::memcpy(attitudeEstimation->quatQuest.value, qBI, 4 * sizeof(double));
attitudeEstimation->quatQuest.setValid(true);
}
}
} else { } else {
// ToDo: fill dataset and set to invalid {
PoolReadGuard pg{attitudeEstimation};
if (pg.getReadResult() == returnvalue::OK) {
std::memcpy(attitudeEstimation->quatQuest.value, ZERO_VEC4, 4 * sizeof(double));
attitudeEstimation->quatQuest.setValid(false);
}
}
} }
} }

View File

@ -1,6 +1,7 @@
#ifndef MISSION_CONTROLLER_ACS_ATTITUDEESTIMATION_H_ #ifndef MISSION_CONTROLLER_ACS_ATTITUDEESTIMATION_H_
#define MISSION_CONTROLLER_ACS_ATTITUDEESTIMATION_H_ #define MISSION_CONTROLLER_ACS_ATTITUDEESTIMATION_H_
#include <fsfw/datapool/PoolReadGuard.h>
#include <fsfw/globalfunctions/math/QuaternionOperations.h> #include <fsfw/globalfunctions/math/QuaternionOperations.h>
#include <fsfw/globalfunctions/math/VectorOperations.h> #include <fsfw/globalfunctions/math/VectorOperations.h>
#include <mission/controller/acs/AcsParameters.h> #include <mission/controller/acs/AcsParameters.h>
@ -21,6 +22,8 @@ class AttitudeEstimation {
protected: protected:
private: private:
AcsParameters *acsParameters; AcsParameters *acsParameters;
static constexpr double ZERO_VEC4[4] = {0, 0, 0, 0};
}; };
#endif /* MISSION_CONTROLLER_ACS_ATTITUDEESTIMATION_H_ */ #endif /* MISSION_CONTROLLER_ACS_ATTITUDEESTIMATION_H_ */