removed deprecated code
Some checks failed
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit

This commit is contained in:
Marius Eggert 2023-04-13 14:39:40 +02:00
parent a09cc86336
commit ae729337a2

View File

@ -119,22 +119,10 @@ void SafeCtrl::calculateRotationalRateTorque(const double satRotRateRef, const d
const double *sunDirRefB, double &errorAngle, const double *sunDirRefB, double &errorAngle,
const double gainParallel, const double gainOrtho) { const double gainParallel, const double gainOrtho) {
// calculate torque for parallel rotational rate // calculate torque for parallel rotational rate
if ((isfinite(errorAngle)) and
(errorAngle < (double)acsParameters->safeModeControllerParameters.angleStartSpin)) {
double satRotRateNorm = VectorOperations<double>::norm(satRotRateParallelB, 3);
double satRotRateUnitVec[3] = {0, 0, 0};
VectorOperations<double>::normalize(satRotRateParallelB, satRotRateUnitVec, 3);
VectorOperations<double>::mulScalar(satRotRateUnitVec, satRotRateRef - satRotRateNorm,
cmdParallel, 3);
} else {
VectorOperations<double>::mulScalar(cmdParallel, -gainParallel, cmdParallel, 3); VectorOperations<double>::mulScalar(cmdParallel, -gainParallel, cmdParallel, 3);
}
// calculate torque for orthogonal rotational rate // calculate torque for orthogonal rotational rate
VectorOperations<double>::mulScalar(satRotRateOrthogonalB, -gainOrtho, cmdOrtho, 3); VectorOperations<double>::mulScalar(satRotRateOrthogonalB, -gainOrtho, cmdOrtho, 3);
if (cos(VectorOperations<double>::dot(sunDirB, sunDirRefB)) < 0) {
VectorOperations<double>::mulScalar(cmdOrtho, -1, cmdOrtho, 3);
}
} }
void SafeCtrl::calculateAngleErrorTorque(const double *sunDirB, const double *sunDirRefB, void SafeCtrl::calculateAngleErrorTorque(const double *sunDirB, const double *sunDirRefB,