eive-obsw/mission/controller/acs/AcsParameters.h
Marius Eggert d9427c6112
All checks were successful
EIVE/eive-obsw/pipeline/head This commit looks good
added AcsParameters
2022-09-16 14:22:17 +02:00

202 lines
4.8 KiB
C++

/*******************************
* EIVE Flight Software Framework (FSFW)
* (c) 2022 IRS, Uni Stuttgart
*******************************/
#ifndef ACSPARAMETERS_H_
#define ACSPARAMETERS_H_
#include <fsfw/parameters/HasParametersIF.h>
typedef unsigned char uint8_t;
class AcsParameters:public HasParametersIF{
public:
AcsParameters();
virtual ~AcsParameters();
virtual ReturnValue_t getParameter(uint8_t domainId, uint16_t parameterId,
ParameterWrapper *parameterWrapper,
const ParameterWrapper *newValues, uint16_t startAtIndex);
struct OnBoardParams {
double sampleTime; // [s]
} onBoardParams;
struct InertiaEIVE {
double inertiaMatrix[3][3];
double inertiaMatrixInverse[3][3];
} inertiaEIVE;
struct MgmHandlingParameters {
float mgm0orientationMatrix[3][3];
float mgm1orientationMatrix[3][3];
float mgm2orientationMatrix[3][3];
float mgm3orientationMatrix[3][3];
float mgm4orientationMatrix[3][3];
} mgmHandlingParameters;
struct SusHandlingParameters {
float sus0orientationMatrix[3][3];
float sus1orientationMatrix[3][3];
float sus2orientationMatrix[3][3];
float sus3orientationMatrix[3][3];
float sus4orientationMatrix[3][3];
float sus5orientationMatrix[3][3];
float sus6orientationMatrix[3][3];
float sus7orientationMatrix[3][3];
float sus8orientationMatrix[3][3];
float sus9orientationMatrix[3][3];
float sus10orientationMatrix[3][3];
float sus11orientationMatrix[3][3];
float filterAlpha;
float sunThresh;
} susHandlingParameters;
struct RmuHandlingParameters {
double rmu0orientationMatrix[3][3];
double rmu1orientationMatrix[3][3];
double rmu2orientationMatrix[3][3];
} rmuHandlingParameters;
struct RwHandlingParameters {
double rw0orientationMatrix[3][3];
double rw1orientationMatrix[3][3];
double rw2orientationMatrix[3][3];
double rw3orientationMatrix[3][3];
double inertiaWheel;
double maxTrq;
} rwHandlingParameters;
struct SafeModeControllerParameters {
double k_rate_mekf;
double k_align_mekf;
double k_rate_no_mekf;
double k_align_no_mekf;
double sunMagAngleMin;
double sunTargetDir[3]; //Body frame
double satRateRef[3]; //Body frame
} safeModeControllerParameters;
struct DetumbleCtrlParameters {
double gainD;
} detumbleCtrlParameters;
struct PointingModeControllerParameters {
double updtFlag;
double A_rw[3][12];
double refDirection[3];
double refRotRate[3];
double quatRef[4];
bool avoidBlindStr;
double blindAvoidStart;
double blindAvoidStop;
double blindRotRate;
double zeta;
double zetaLow;
double om;
double omLow;
double qiMin;
double omMax;
double gainNullspace;
double desatMomentumRef[3];
double deSatGainFactor;
bool desatOn;
double omegaEarth;
} inertialModeControllerParameters, nadirModeControllerParameters,
targetModeControllerParameters;
struct RWMatrices {
double alignmentMatrix[3][4];
double pseudoInverse[4][3];
double without0[4][3];
double without1[4][3];
double without2[4][3];
double without3[4][3];
double nullspace[4];
} rwMatrices;
struct StrParameters {
double exclusionAngle;
// double strOrientationMatrix[3][3];
double boresightAxis[3]; //in body/geometry frame
} strParameters;
struct GpsParameters {
} gpsParameters;
struct GroundStationParameters {
double latitudeGs; // [rad] Latitude
double longitudeGs; // [rad] Longitude
double altitudeGs; // [m] Altitude
double earthRadiusEquat; // [m]
double earthRadiusPolar; // [m]
} groundStationParameters;
struct SunModelParameters {
enum UseSunModel {
NO = 0, YES = 3
};
uint8_t useSunModel;
float domega;
float omega_0; //Rektaszension des Aufsteigenden Knotens plus Argument des Perigäums
float m_0; //coefficients for mean anomaly
float dm; //coefficients for mean anomaly
float e; //angle of earth's rotation axis
float e1;
float p1; //some parameter
float p2; //some parameter
} sunModelParameters;
struct KalmanFilterParameters {
uint8_t activateKalmanFilter;
uint8_t requestResetFlag;
double maxToleratedTimeBetweenKalmanFilterExecutionSteps;
double processNoiseOmega[3];
double processNoiseQuaternion[4];
double sensorNoiseSTR;
double sensorNoiseSS;
double sensorNoiseMAG;
double sensorNoiseRMU[3];
double sensorNoiseArwRmu; //Angular Random Walk
double sensorNoiseBsRMU; // Bias Stability
} kalmanFilterParameters;
struct MagnetorquesParameter {
double mtq0orientationMatrix[3][3];
double mtq1orientationMatrix[3][3];
double mtq2orientationMatrix[3][3];
double alignmentMatrixMtq[3][3];
double inverseAlignment[3][3];
double DipolMax; // [Am^2]
} magnetorquesParameter;
struct DetumbleParameter {
uint8_t detumblecounter;
double omegaDetumbleStart;
double omegaDetumbleEnd;
} detumbleParameter;
};
#endif /* ACSPARAMETERS_H_ */