v7.5.0 #828
@ -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);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -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_ */
|
||||||
|
Loading…
Reference in New Issue
Block a user