From 7e1e02c2bc746ccd818895dc376499b82792ff6e Mon Sep 17 00:00:00 2001 From: meggert Date: Fri, 21 Jul 2023 14:24:52 +0200 Subject: [PATCH] ???? --- mission/controller/acs/control/SafeCtrl.cpp | 18 ++++++------------ mission/controller/acs/control/SafeCtrl.h | 3 +-- 2 files changed, 7 insertions(+), 14 deletions(-) diff --git a/mission/controller/acs/control/SafeCtrl.cpp b/mission/controller/acs/control/SafeCtrl.cpp index 4f98543c..3929d842 100644 --- a/mission/controller/acs/control/SafeCtrl.cpp +++ b/mission/controller/acs/control/SafeCtrl.cpp @@ -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::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::mulScalar(satRotRateParallelB, -gainParallel, cmdParallel, 3); diff --git a/mission/controller/acs/control/SafeCtrl.h b/mission/controller/acs/control/SafeCtrl.h index fbe401ef..55bcbf08 100644 --- a/mission/controller/acs/control/SafeCtrl.h +++ b/mission/controller/acs/control/SafeCtrl.h @@ -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);