This commit is contained in:
parent
f736489430
commit
7e1e02c2bc
@ -48,8 +48,7 @@ void SafeCtrl::safeMekf(const double *magFieldB, const double *satRotRateB,
|
||||
errorAngle = acos(dotSun);
|
||||
|
||||
splitRotationalRate(satRotRateB, sunDirB);
|
||||
calculateRotationalRateTorque(sunDirB, errorAngle,
|
||||
acsParameters->safeModeControllerParameters.k_parallelMekf,
|
||||
calculateRotationalRateTorque(acsParameters->safeModeControllerParameters.k_parallelMekf,
|
||||
acsParameters->safeModeControllerParameters.k_orthoMekf);
|
||||
calculateAngleErrorTorque(sunDirB, sunDirRefB,
|
||||
acsParameters->safeModeControllerParameters.k_alignMekf);
|
||||
@ -72,8 +71,7 @@ void SafeCtrl::safeGyr(const double *magFieldB, const double *satRotRateB, const
|
||||
errorAngle = acos(dotSun);
|
||||
|
||||
splitRotationalRate(satRotRateB, sunDirB);
|
||||
calculateRotationalRateTorque(sunDirB, errorAngle,
|
||||
acsParameters->safeModeControllerParameters.k_parallelGyr,
|
||||
calculateRotationalRateTorque(acsParameters->safeModeControllerParameters.k_parallelGyr,
|
||||
acsParameters->safeModeControllerParameters.k_orthoGyr);
|
||||
calculateAngleErrorTorque(sunDirB, sunDirRefB,
|
||||
acsParameters->safeModeControllerParameters.k_alignGyr);
|
||||
@ -98,8 +96,7 @@ void SafeCtrl::safeSusMgm(const double *magFieldB, const double *rotRateParallel
|
||||
|
||||
std::memcpy(satRotRateParallelB, rotRateParallelB, sizeof(satRotRateParallelB));
|
||||
std::memcpy(satRotRateOrthogonalB, rotRateOrthogonalB, sizeof(satRotRateOrthogonalB));
|
||||
calculateRotationalRateTorque(sunDirB, errorAngle,
|
||||
acsParameters->safeModeControllerParameters.k_parallelSusMgm,
|
||||
calculateRotationalRateTorque(acsParameters->safeModeControllerParameters.k_parallelSusMgm,
|
||||
acsParameters->safeModeControllerParameters.k_orthoSusMgm);
|
||||
calculateAngleErrorTorque(sunDirB, sunDirRefB,
|
||||
acsParameters->safeModeControllerParameters.k_alignSusMgm);
|
||||
@ -121,8 +118,7 @@ void SafeCtrl::safeRateDampingGyr(const double *magFieldB, const double *satRotR
|
||||
errorAngle = NAN;
|
||||
|
||||
splitRotationalRate(satRotRateB, sunDirRefB);
|
||||
calculateRotationalRateTorque(sunDirRefB, errorAngle,
|
||||
acsParameters->safeModeControllerParameters.k_parallelGyr,
|
||||
calculateRotationalRateTorque(acsParameters->safeModeControllerParameters.k_parallelGyr,
|
||||
acsParameters->safeModeControllerParameters.k_orthoGyr);
|
||||
|
||||
// sum of all torques
|
||||
@ -142,8 +138,7 @@ void SafeCtrl::safeRateDampingSusMgm(const double *magFieldB, const double *satR
|
||||
errorAngle = NAN;
|
||||
|
||||
splitRotationalRate(satRotRateB, sunDirRefB);
|
||||
calculateRotationalRateTorque(sunDirRefB, errorAngle,
|
||||
acsParameters->safeModeControllerParameters.k_parallelSusMgm,
|
||||
calculateRotationalRateTorque(acsParameters->safeModeControllerParameters.k_parallelSusMgm,
|
||||
acsParameters->safeModeControllerParameters.k_orthoSusMgm);
|
||||
|
||||
// sum of all torques
|
||||
@ -161,8 +156,7 @@ void SafeCtrl::splitRotationalRate(const double *satRotRateB, const double *sunD
|
||||
VectorOperations<double>::subtract(satRotRateB, satRotRateParallelB, satRotRateOrthogonalB, 3);
|
||||
}
|
||||
|
||||
void SafeCtrl::calculateRotationalRateTorque(const double *sunDirB, double &errorAngle,
|
||||
const double gainParallel, const double gainOrtho) {
|
||||
void SafeCtrl::calculateRotationalRateTorque(const double gainParallel, const double gainOrtho) {
|
||||
// calculate torque for parallel rotational rate
|
||||
VectorOperations<double>::mulScalar(satRotRateParallelB, -gainParallel, cmdParallel, 3);
|
||||
|
||||
|
@ -41,8 +41,7 @@ class SafeCtrl {
|
||||
const double *sunDirB, const double *sunRateB,
|
||||
double *fusedRotRate);
|
||||
|
||||
void calculateRotationalRateTorque(const double *sunDirB, double &errorAngle,
|
||||
const double gainParallel, const double gainOrtho);
|
||||
void calculateRotationalRateTorque(const double gainParallel, const double gainOrtho);
|
||||
|
||||
void calculateAngleErrorTorque(const double *sunDirB, const double *sunDirRefB,
|
||||
const double gainAlign);
|
||||
|
Loading…
Reference in New Issue
Block a user