From ae729337a2623464d61737482bd224d04a466787 Mon Sep 17 00:00:00 2001 From: meggert Date: Thu, 13 Apr 2023 14:39:40 +0200 Subject: [PATCH] removed deprecated code --- mission/controller/acs/control/SafeCtrl.cpp | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) diff --git a/mission/controller/acs/control/SafeCtrl.cpp b/mission/controller/acs/control/SafeCtrl.cpp index de800a42..940be1c3 100644 --- a/mission/controller/acs/control/SafeCtrl.cpp +++ b/mission/controller/acs/control/SafeCtrl.cpp @@ -119,22 +119,10 @@ void SafeCtrl::calculateRotationalRateTorque(const double satRotRateRef, const d const double *sunDirRefB, double &errorAngle, const double gainParallel, const double gainOrtho) { // calculate torque for parallel rotational rate - if ((isfinite(errorAngle)) and - (errorAngle < (double)acsParameters->safeModeControllerParameters.angleStartSpin)) { - double satRotRateNorm = VectorOperations::norm(satRotRateParallelB, 3); - double satRotRateUnitVec[3] = {0, 0, 0}; - VectorOperations::normalize(satRotRateParallelB, satRotRateUnitVec, 3); - VectorOperations::mulScalar(satRotRateUnitVec, satRotRateRef - satRotRateNorm, - cmdParallel, 3); - } else { - VectorOperations::mulScalar(cmdParallel, -gainParallel, cmdParallel, 3); - } + VectorOperations::mulScalar(cmdParallel, -gainParallel, cmdParallel, 3); // calculate torque for orthogonal rotational rate VectorOperations::mulScalar(satRotRateOrthogonalB, -gainOrtho, cmdOrtho, 3); - if (cos(VectorOperations::dot(sunDirB, sunDirRefB)) < 0) { - VectorOperations::mulScalar(cmdOrtho, -1, cmdOrtho, 3); - } } void SafeCtrl::calculateAngleErrorTorque(const double *sunDirB, const double *sunDirRefB,