eive-obsw/mission/controller/acs/FusedRotationEstimation.h

43 lines
1.9 KiB
C
Raw Normal View History

2023-07-19 16:25:03 +02:00
#ifndef MISSION_CONTROLLER_ACS_FUSEDROTATIONESTIMATION_H_
#define MISSION_CONTROLLER_ACS_FUSEDROTATIONESTIMATION_H_
2023-07-20 11:09:34 +02:00
#include <fsfw/datapool/PoolReadGuard.h>
2023-11-14 13:22:35 +01:00
#include <fsfw/globalfunctions/math/QuaternionOperations.h>
2023-07-19 16:25:03 +02:00
#include <fsfw/globalfunctions/math/VectorOperations.h>
#include <mission/controller/acs/AcsParameters.h>
2023-11-14 13:22:35 +01:00
#include <mission/controller/acs/SensorValues.h>
2023-07-20 11:09:34 +02:00
#include <mission/controller/controllerdefinitions/AcsCtrlDefinitions.h>
2023-07-19 16:25:03 +02:00
class FusedRotationEstimation {
public:
FusedRotationEstimation(AcsParameters *acsParameters_);
2023-11-14 13:22:35 +01:00
void estimateFusedRotationRate(acsctrl::SusDataProcessed *susDataProcessed,
acsctrl::MgmDataProcessed *mgmDataProcessed,
acsctrl::GyrDataProcessed *gyrDataProcessed,
2023-11-14 16:07:14 +01:00
ACS::SensorValues *sensorValues, const double timeDelta,
2023-11-14 13:22:35 +01:00
acsctrl::FusedRotRateData *fusedRotRateData);
2023-07-20 11:09:34 +02:00
void estimateFusedRotationRateSafe(acsctrl::SusDataProcessed *susDataProcessed,
acsctrl::MgmDataProcessed *mgmDataProcessed,
acsctrl::GyrDataProcessed *gyrDataProcessed,
acsctrl::FusedRotRateData *fusedRotRateData);
2023-07-19 16:25:03 +02:00
2023-11-14 16:07:14 +01:00
void estimateFusedRotationRateStr(double *quatNew, const double timeDelta,
acsctrl::FusedRotRateData *fusedRotRateData);
2023-11-14 13:22:35 +01:00
2023-07-19 16:25:03 +02:00
protected:
private:
2023-11-14 13:22:35 +01:00
static constexpr double ZERO_VEC3[3] = {0, 0, 0};
static constexpr double ZERO_VEC4[4] = {0, 0, 0, 0};
2023-07-20 11:09:34 +02:00
2023-07-19 16:25:03 +02:00
AcsParameters *acsParameters;
2023-11-14 13:22:35 +01:00
double quatOld[3] = {0, 0, 0, 0};
2023-07-19 16:25:03 +02:00
double rotRateOldB[3] = {0, 0, 0};
2023-07-20 11:09:34 +02:00
void estimateFusedRotationRateEclipse(acsctrl::GyrDataProcessed *gyrDataProcessed,
acsctrl::FusedRotRateData *fusedRotRateData);
2023-07-19 16:25:03 +02:00
};
#endif /* MISSION_CONTROLLER_ACS_FUSEDROTATIONESTIMATION_H_ */