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

48 lines
1.6 KiB
C
Raw Normal View History

2022-09-19 15:03:25 +02:00
#ifndef ACTUATORCMD_H_
#define ACTUATORCMD_H_
2022-09-27 11:06:11 +02:00
#include "MultiplicativeKalmanFilter.h"
#include "SensorProcessing.h"
2022-09-27 11:06:11 +02:00
#include "SensorValues.h"
2022-09-19 15:03:25 +02:00
2022-12-13 11:51:03 +01:00
class ActuatorCmd {
public:
2023-02-27 17:36:33 +01:00
ActuatorCmd();
2022-12-13 11:51:03 +01:00
virtual ~ActuatorCmd();
2022-09-19 15:03:25 +02:00
2022-12-13 11:51:03 +01:00
/*
* @brief: scalingTorqueRws() scales the torque via maximum part in case this part is
* higher then the maximum torque
2023-03-10 17:31:12 +01:00
* @param: rwTrq given torque for reaction wheels which will be
* scaled if needed to be
2022-12-13 11:51:03 +01:00
*/
2023-03-10 17:31:12 +01:00
void scalingTorqueRws(double *rwTrq, double maxTorque);
2022-12-13 11:51:03 +01:00
/*
* @brief: cmdSpeedToRws() will set the maximum possible torque for the reaction
* wheels, also will calculate the needed revolutions per minute for the RWs, which will be given
* as Input to the RWs
* @param: rwTrqIn given torque from pointing controller
* rwTrqNS Nullspace torque
* rwCmdSpeed output revolutions per minute for every
* reaction wheel
*/
2023-02-27 17:36:33 +01:00
void cmdSpeedToRws(int32_t speedRw0, int32_t speedRw1, int32_t speedRw2, int32_t speedRw3,
const double *rwTorque, int32_t *rwCmdSpeed, double sampleTime,
int32_t maxRwSpeed, double inertiaWheel);
2022-09-19 15:03:25 +02:00
2022-12-13 11:51:03 +01:00
/*
* @brief: cmdDipolMtq() gives the commanded dipol moment for the magnetorques
*
* @param: dipolMoment given dipol moment in spacecraft frame
* dipolMomentActuator resulting dipol moment in actuator reference frame
2022-12-13 11:51:03 +01:00
*/
void cmdDipolMtq(const double *dipolMoment, int16_t *dipolMomentActuator,
2023-02-27 17:36:33 +01:00
const double *inverseAlignment, double maxDipol);
2022-09-19 15:03:25 +02:00
protected:
private:
2022-09-19 15:03:25 +02:00
};
#endif /* ACTUATORCMD_H_ */