prevent event spam and add action command to restore automatic recovery
All checks were successful
EIVE/eive-obsw/pipeline/pr-develop This commit looks good

This commit is contained in:
2023-03-14 17:19:50 +01:00
parent 66b38fa294
commit f2210010de
2 changed files with 15 additions and 0 deletions

View File

@ -55,6 +55,10 @@ ReturnValue_t AcsController::executeAction(ActionId_t actionId, MessageQueueId_t
navigation.resetMekf(&mekfData);
return HasActionsIF::EXECUTION_FINISHED;
}
case RESTORE_MEKF_NONFINITE_RECOVERY: {
mekfLost = false;
return HasActionsIF::EXECUTION_FINISHED;
}
default: {
return HasActionsIF::INVALID_ACTION_ID;
}
@ -149,6 +153,10 @@ void AcsController::performSafe() {
triggerEvent(acs::MEKF_INVALID_INFO);
mekfInvalidFlag = true;
}
if (result == MultiplicativeKalmanFilter::MEKF_NOT_FINITE && !mekfLost) {
navigation.resetMekf(&mekfData);
mekfLost = true;
}
} else {
mekfInvalidFlag = false;
}
@ -220,6 +228,9 @@ void AcsController::performDetumble() {
triggerEvent(acs::MEKF_INVALID_INFO);
mekfInvalidFlag = true;
}
if (result == MultiplicativeKalmanFilter::MEKF_NOT_FINITE) {
navigation.resetMekf(&mekfData);
}
} else {
mekfInvalidFlag = false;
}