better detumble exit
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
All checks were successful
EIVE/eive-obsw/pipeline/pr-main This commit looks good
This commit is contained in:
parent
07e002ccd2
commit
753b9f8a0e
@ -318,17 +318,26 @@ void AcsController::performDetumble() {
|
|||||||
actuatorCmd.cmdDipoleMtq(*acsParameters.magnetorquerParameter.inverseAlignment,
|
actuatorCmd.cmdDipoleMtq(*acsParameters.magnetorquerParameter.inverseAlignment,
|
||||||
acsParameters.magnetorquerParameter.dipoleMax, magMomMtq, cmdDipoleMtqs);
|
acsParameters.magnetorquerParameter.dipoleMax, magMomMtq, cmdDipoleMtqs);
|
||||||
|
|
||||||
if (mekfData.satRotRateMekf.isValid() &&
|
if (acsParameters.safeModeControllerParameters.useMekf) {
|
||||||
VectorOperations<double>::norm(mekfData.satRotRateMekf.value, 3) <
|
if (mekfData.satRotRateMekf.isValid() and
|
||||||
acsParameters.detumbleParameter.omegaDetumbleEnd) {
|
VectorOperations<double>::norm(mekfData.satRotRateMekf.value, 3) <
|
||||||
detumbleCounter++;
|
acsParameters.detumbleParameter.omegaDetumbleStart) {
|
||||||
} else if (gyrDataProcessed.gyrVecTot.isValid() &&
|
detumbleCounter++;
|
||||||
VectorOperations<double>::norm(gyrDataProcessed.gyrVecTot.value, 3) <
|
}
|
||||||
acsParameters.detumbleParameter.omegaDetumbleEnd) {
|
} else if (acsParameters.safeModeControllerParameters.useGyr) {
|
||||||
|
if (gyrDataProcessed.gyrVecTot.isValid() and
|
||||||
|
VectorOperations<double>::norm(gyrDataProcessed.gyrVecTot.value, 3) <
|
||||||
|
acsParameters.detumbleParameter.omegaDetumbleStart) {
|
||||||
|
detumbleCounter++;
|
||||||
|
}
|
||||||
|
} else if (fusedRotRateData.rotRateTotal.isValid() and
|
||||||
|
VectorOperations<double>::norm(fusedRotRateData.rotRateTotal.value, 3) <
|
||||||
|
acsParameters.detumbleParameter.omegaDetumbleStart) {
|
||||||
detumbleCounter++;
|
detumbleCounter++;
|
||||||
} else if (detumbleCounter > 0) {
|
} else if (detumbleCounter > 0) {
|
||||||
detumbleCounter -= 1;
|
detumbleCounter -= 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (detumbleCounter > acsParameters.detumbleParameter.detumblecounter) {
|
if (detumbleCounter > acsParameters.detumbleParameter.detumblecounter) {
|
||||||
detumbleCounter = 0;
|
detumbleCounter = 0;
|
||||||
// Triggers safe mode transition in subsystem
|
// Triggers safe mode transition in subsystem
|
||||||
|
Loading…
Reference in New Issue
Block a user