added saftCtrl to acsController
This commit is contained in:
@ -8,57 +8,46 @@
|
||||
#ifndef SAFECTRL_H_
|
||||
#define SAFECTRL_H_
|
||||
|
||||
#include "../SensorValues.h"
|
||||
#include "../OutputValues.h"
|
||||
#include "../AcsParameters.h"
|
||||
#include "../config/classIds.h"
|
||||
#include <string.h>
|
||||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
#include <time.h>
|
||||
#include <fsfw/returnvalues/HasReturnvaluesIF.h>
|
||||
|
||||
#include "../AcsParameters.h"
|
||||
#include "../OutputValues.h"
|
||||
#include "../SensorValues.h"
|
||||
#include "../config/classIds.h"
|
||||
|
||||
class SafeCtrl{
|
||||
class SafeCtrl {
|
||||
public:
|
||||
SafeCtrl(AcsParameters *acsParameters_);
|
||||
virtual ~SafeCtrl();
|
||||
|
||||
public:
|
||||
static const uint8_t INTERFACE_ID = CLASS_ID::SAFE;
|
||||
static const ReturnValue_t SAFECTRL_MEKF_INPUT_INVALID = MAKE_RETURN_CODE(0x01);
|
||||
|
||||
SafeCtrl(AcsParameters *acsParameters_);
|
||||
virtual ~SafeCtrl();
|
||||
void loadAcsParameters(AcsParameters *acsParameters_);
|
||||
|
||||
static const uint8_t INTERFACE_ID = CLASS_ID::SAFE;
|
||||
static const ReturnValue_t SAFECTRL_MEKF_INPUT_INVALID = MAKE_RETURN_CODE(0x01);
|
||||
ReturnValue_t safeMekf(timeval now, double *quatBJ, bool *quatBJValid, double *magFieldModel,
|
||||
bool *magFieldModelValid, double *sunDirModel, bool *sunDirModelValid,
|
||||
double *satRateMekf, bool *rateMekfValid, double *sunDirRef,
|
||||
double *satRatRef, // From Guidance (!)
|
||||
double *outputMagMomB, bool *outputValid);
|
||||
|
||||
void loadAcsParameters(AcsParameters *acsParameters_);
|
||||
void safeNoMekf(timeval now, double *susDirB, bool *susDirBValid, double *sunRateB,
|
||||
bool *sunRateBValid, double *magFieldB, bool *magFieldBValid, double *magRateB,
|
||||
bool *magRateBValid, double *sunDirRef, double *satRateRef, double *outputMagMomB,
|
||||
bool *outputValid);
|
||||
|
||||
ReturnValue_t safeMekf(timeval now, double *quatBJ, bool *quatBJValid,
|
||||
double *magFieldModel, bool *magFieldModelValid,
|
||||
double *sunDirModel, bool *sunDirModelValid,
|
||||
double *satRateMekf, bool *rateMekfValid,
|
||||
double *sunDirRef, double *satRatRef, // From Guidance (!)
|
||||
double *outputMagMomB, bool *outputValid);
|
||||
void idleSunPointing(); // with reaction wheels
|
||||
|
||||
void safeNoMekf(timeval now, double *susDirB, bool *susDirBValid,
|
||||
double *sunRateB, bool *sunRateBValid,
|
||||
double *magFieldB, bool *magFieldBValid,
|
||||
double *magRateB, bool *magRateBValid,
|
||||
double *sunDirRef, double *satRateRef,
|
||||
double *outputMagMomB, bool *outputValid);
|
||||
|
||||
void idleSunPointing(); // with reaction wheels
|
||||
|
||||
protected:
|
||||
|
||||
private:
|
||||
AcsParameters::SafeModeControllerParameters* safeModeControllerParameters;
|
||||
AcsParameters::InertiaEIVE* inertiaEIVE;
|
||||
double gainMatrixInertia[3][3];
|
||||
|
||||
double magFieldBState[3];
|
||||
timeval magFieldBStateTime;
|
||||
protected:
|
||||
private:
|
||||
AcsParameters::SafeModeControllerParameters *safeModeControllerParameters;
|
||||
AcsParameters::InertiaEIVE *inertiaEIVE;
|
||||
double gainMatrixInertia[3][3];
|
||||
|
||||
double magFieldBState[3];
|
||||
timeval magFieldBStateTime;
|
||||
};
|
||||
|
||||
|
||||
|
||||
#endif /* ACS_CONTROL_SAFECTRL_H_ */
|
||||
|
||||
|
Reference in New Issue
Block a user