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

60 lines
2.1 KiB
C
Raw Normal View History

2022-09-19 15:17:39 +02:00
/*
* Guidance.h
*
* Created on: 6 Jun 2022
* Author: Robin Marquardt
*/
#ifndef GUIDANCE_H_
#define GUIDANCE_H_
2022-09-27 11:06:11 +02:00
#include "AcsParameters.h"
#include "SensorValues.h"
#include "OutputValues.h"
2022-09-26 13:23:20 +02:00
#include <time.h>
2022-09-19 15:17:39 +02:00
class Guidance {
public:
Guidance(AcsParameters *acsParameters_);
virtual ~Guidance();
void getTargetParamsSafe(double sunTargetSafe[3], double satRateRef[3]);
// Function to get the target quaternion and refence rotation rate from gps position and position of the ground station
void targetQuatPtg(ACS::SensorValues* sensorValues, ACS::OutputValues *outputValues, timeval now,
double targetQuat[4], double refSatRate[3]);
// Function to get the target quaternion and refence rotation rate for sun pointing after ground station
void sunQuatPtg(ACS::SensorValues* sensorValues, ACS::OutputValues *outputValues,
double targetQuat[4], double refSatRate[3]);
// Function to get the target quaternion and refence rotation rate from gps position for Nadir pointing
2022-11-14 17:16:47 +01:00
void quatNadirPtg(ACS::SensorValues* sensorValues, ACS::OutputValues *outputValues, timeval now,
double targetQuat[4], double refSatRate[3]);
2022-11-22 21:10:05 +01:00
void quatNadirPtgFLPVersion(ACS::SensorValues* sensorValues, ACS::OutputValues *outputValues, timeval now,
double targetQuat[4], double refSatRate[3]);
2022-11-14 17:16:47 +01:00
// Function to get the target quaternion and refence rotation rate from parameters for inertial pointing
void inertialQuatPtg(double targetQuat[4], double refSatRate[3]);
2022-09-19 15:17:39 +02:00
// @note: compares target Quaternion and reference quaternion, also actual satellite rate and desired
void comparePtg( double targetQuat[4], ACS::OutputValues *outputValues, double refSatRate[3], double quatError[3], double deltaRate[3] );
// @note: will give back the pseudoinverse matrix for the reaction wheel depending on the valid reation wheel
// maybe can be done in "commanding.h"
void getDistributionMatrixRw(ACS::SensorValues* sensorValues, double *rwPseudoInv);
private:
AcsParameters acsParameters;
bool strBlindAvoidFlag = false;
2022-11-22 21:10:05 +01:00
timeval timeSavedQuaternionNadir;
double savedQuaternionNadir[4] = {0, 0, 0, 0};
double omegaRefSavedNadir[3] = {0, 0, 0};
2022-09-19 15:17:39 +02:00
};
#endif /* ACS_GUIDANCE_H_ */