2022-09-20 13:36:17 +02:00
|
|
|
/*
|
|
|
|
* Detumble.h
|
|
|
|
*
|
|
|
|
* Created on: 17 Aug 2022
|
|
|
|
* Author: Robin Marquardt
|
|
|
|
*/
|
|
|
|
|
|
|
|
#ifndef ACS_CONTROL_DETUMBLE_H_
|
|
|
|
#define ACS_CONTROL_DETUMBLE_H_
|
|
|
|
|
2022-09-27 11:06:11 +02:00
|
|
|
#include "../SensorValues.h"
|
|
|
|
#include "../OutputValues.h"
|
|
|
|
#include "../AcsParameters.h"
|
|
|
|
#include "../config/classIds.h"
|
2022-09-20 13:36:17 +02:00
|
|
|
#include <string.h>
|
|
|
|
#include <stdio.h>
|
2022-09-26 13:23:20 +02:00
|
|
|
#include <time.h>
|
2022-09-27 11:06:11 +02:00
|
|
|
#include <fsfw/returnvalues/returnvalue.h>
|
|
|
|
|
2022-09-20 13:36:17 +02:00
|
|
|
|
2022-09-20 15:06:05 +02:00
|
|
|
class Detumble{
|
2022-09-20 13:36:17 +02:00
|
|
|
|
|
|
|
public:
|
|
|
|
Detumble(AcsParameters *acsParameters_);
|
|
|
|
virtual ~Detumble();
|
|
|
|
|
|
|
|
static const uint8_t INTERFACE_ID = CLASS_ID::DETUMBLE;
|
|
|
|
static const ReturnValue_t DETUMBLE_NO_SENSORDATA = MAKE_RETURN_CODE(0x01);
|
|
|
|
|
|
|
|
/* @brief: Load AcsParameters für this class
|
|
|
|
* @param: acsParameters_ Pointer to object which defines the ACS configuration parameters
|
|
|
|
*/
|
|
|
|
void loadAcsParameters(AcsParameters *acsParameters_);
|
|
|
|
|
|
|
|
ReturnValue_t bDotLaw(const double *magRate, const bool *magRateValid,
|
|
|
|
const double *magField, const bool *magFieldValid,
|
|
|
|
double *magMom);
|
|
|
|
|
|
|
|
ReturnValue_t bangbangLaw(const double *magRate, const bool *magRateValid, double *magMom);
|
|
|
|
|
2022-10-21 16:46:09 +02:00
|
|
|
ReturnValue_t bDotLawGyro(const double *satRate, const bool *satRateValid,
|
|
|
|
const double *magField, const bool *magFieldValid,
|
|
|
|
double *magMom);
|
|
|
|
|
2022-09-20 13:36:17 +02:00
|
|
|
private:
|
2022-10-28 18:18:28 +02:00
|
|
|
AcsParameters::DetumbleParameter* detumbleParameter;
|
2022-09-20 13:36:17 +02:00
|
|
|
AcsParameters::MagnetorquesParameter* magnetorquesParameter;
|
|
|
|
};
|
|
|
|
|
2022-09-27 11:57:15 +02:00
|
|
|
#endif /*ACS_CONTROL_DETUMBLE_H_*/
|
2022-09-20 13:36:17 +02:00
|
|
|
|