Final Version of the ACS Controller #367
@ -63,3 +63,17 @@ ReturnValue_t Detumble::bangbangLaw(const double *magRate, const bool *magRateVa
|
||||
return returnvalue::OK;
|
||||
|
||||
}
|
||||
|
||||
ReturnValue_t Detumble::bDotLawGyro(const double *satRate, const bool *satRateValid,
|
||||
const double *magField, const bool *magFieldValid,
|
||||
double *magMom) {
|
||||
|
||||
if (!satRateValid || !magFieldValid) {
|
||||
return DETUMBLE_NO_SENSORDATA;
|
||||
}
|
||||
double gain = detumbleCtrlParameters->gainD;
|
||||
double factor = -gain / pow(VectorOperations<double>::norm(magField,3),2);
|
||||
VectorOperations<double>::mulScalar(satRate, factor, magMom, 3);
|
||||
return returnvalue::OK;
|
||||
|
||||
}
|
||||
|
@ -38,6 +38,10 @@ public:
|
||||
|
||||
ReturnValue_t bangbangLaw(const double *magRate, const bool *magRateValid, double *magMom);
|
||||
|
||||
ReturnValue_t bDotLawGyro(const double *satRate, const bool *satRateValid,
|
||||
const double *magField, const bool *magFieldValid,
|
||||
double *magMom);
|
||||
|
||||
private:
|
||||
AcsParameters::DetumbleCtrlParameters* detumbleCtrlParameters;
|
||||
AcsParameters::MagnetorquesParameter* magnetorquesParameter;
|
||||
|
Loading…
Reference in New Issue
Block a user