Prevent STR Blinding #859

Merged
meggert merged 35 commits from prevent-str-blinding into main 2024-02-27 13:48:20 +01:00
Showing only changes of commit ff76f99ad9 - Show all commits

View File

@ -22,7 +22,7 @@ class AcsParameters : public HasParametersIF {
uint8_t fusedRateSafeDuringEclipse = true;
uint8_t fusedRateFromStr = false;
uint8_t fusedRateFromQuest = false;
double questFilterWeight = 0.0;
double questFilterWeight = 0.9;
} onBoardParams;
struct InertiaEIVE {
@ -854,7 +854,7 @@ class AcsParameters : public HasParametersIF {
struct PointingLawParameters {
double zeta = 0.3;
double om = 0.3;
double omMax = 1 * M_PI / 180;
double omMax = 1 * DEG2RAD;
double qiMin = 0.1;
double gainNullspace = 0.01;
@ -876,15 +876,15 @@ class AcsParameters : public HasParametersIF {
uint8_t timeElapsedMax = 10; // rot rate calculations
// Default is Stuttgart GS
double latitudeTgt = 48.7495 * M_PI / 180.; // [rad] Latitude
double longitudeTgt = 9.10384 * M_PI / 180.; // [rad] Longitude
double altitudeTgt = 500; // [m]
double latitudeTgt = 48.7495 * DEG2RAD; // [rad] Latitude
double longitudeTgt = 9.10384 * DEG2RAD; // [rad] Longitude
double altitudeTgt = 500; // [m]
// For one-axis control:
uint8_t avoidBlindStr = true;
double blindAvoidStart = 1.5;
double blindAvoidStop = 2.5;
double blindRotRate = 1 * M_PI / 180;
double blindRotRate = 1 * DEG2RAD;
} targetModeControllerParameters;
struct GsTargetModeControllerParameters : PointingLawParameters {
@ -892,9 +892,9 @@ class AcsParameters : public HasParametersIF {
uint8_t timeElapsedMax = 10; // rot rate calculations
// Default is Stuttgart GS
double latitudeTgt = 48.7495 * M_PI / 180.; // [rad] Latitude
double longitudeTgt = 9.10384 * M_PI / 180.; // [rad] Longitude
double altitudeTgt = 500; // [m]
double latitudeTgt = 48.7495 * DEG2RAD; // [rad] Latitude
double longitudeTgt = 9.10384 * DEG2RAD; // [rad] Longitude
double altitudeTgt = 500; // [m]
} gsTargetModeControllerParameters;
struct NadirModeControllerParameters : PointingLawParameters {
@ -911,7 +911,7 @@ class AcsParameters : public HasParametersIF {
} inertialModeControllerParameters;
struct StrParameters {
double exclusionAngle = 20 * M_PI / 180;
double exclusionAngle = 20 * DEG2RAD;
double boresightAxis[3] = {0.7593, 0.0000, -0.6508}; // geometry frame
} strParameters;
@ -925,25 +925,25 @@ class AcsParameters : public HasParametersIF {
struct SunModelParameters {
float domega = 36000.771;
float omega_0 = 280.46 * M_PI / 180.; // RAAN plus argument of
// perigee
float m_0 = 357.5277; // coefficients for mean anomaly
float dm = 35999.049; // coefficients for mean anomaly
float e = 23.4392911 * M_PI / 180.; // angle of earth's rotation axis
float e1 = 0.74508 * M_PI / 180.;
float omega_0 = 280.46 * DEG2RAD; // RAAN plus argument of
// perigee
float m_0 = 357.5277; // coefficients for mean anomaly
float dm = 35999.049; // coefficients for mean anomaly
float e = 23.4392911 * DEG2RAD; // angle of earth's rotation axis
float e1 = 0.74508 * DEG2RAD;
float p1 = 6892. / 3600. * M_PI / 180.; // some parameter
float p2 = 72. / 3600. * M_PI / 180.; // some parameter
float p1 = 6892. / 3600. * DEG2RAD; // some parameter
float p2 = 72. / 3600. * DEG2RAD; // some parameter
} sunModelParameters;
struct KalmanFilterParameters {
double sensorNoiseSTR = 0.1 * M_PI / 180;
double sensorNoiseSS = 8 * M_PI / 180;
double sensorNoiseMAG = 4 * M_PI / 180;
double sensorNoiseGYR = 0.1 * M_PI / 180;
double sensorNoiseSTR = 0.1 * DEG2RAD;
double sensorNoiseSS = 8 * DEG2RAD;
double sensorNoiseMAG = 4 * DEG2RAD;
double sensorNoiseGYR = 0.1 * DEG2RAD;
double sensorNoiseArwGYR = 3 * 0.0043 * M_PI / sqrt(10) / 180; // Angular Random Walk
double sensorNoiseBsGYR = 3 * M_PI / 180 / 3600; // Bias Stability
double sensorNoiseArwGYR = 3 * 0.0043 / sqrt(10) * DEG2RAD; // Angular Random Walk
double sensorNoiseBsGYR = 3 * DEG2RAD / 3600; // Bias Stability
} kalmanFilterParameters;
struct MagnetorquerParameter {
@ -959,12 +959,14 @@ class AcsParameters : public HasParametersIF {
struct DetumbleParameter {
uint8_t detumblecounter = 75; // 30 s
double omegaDetumbleStart = 2 * M_PI / 180;
double omegaDetumbleEnd = 1 * M_PI / 180;
double omegaDetumbleStart = 2 * DEG2RAD;
double omegaDetumbleEnd = 1 * DEG2RAD;
double gainBdot = pow(10.0, -3.3);
double gainFull = pow(10.0, -2.3);
uint8_t useFullDetumbleLaw = false;
} detumbleParameter;
};
private:
static constexpr double DEG2RAD = M_PI / 180.;
};
#endif /* ACSPARAMETERS_H_ */