reset mekfInvalidCounter after STR FDIR event and also trigger event in case mekf has recovered
This commit is contained in:
parent
b6e08f369a
commit
9c735e36b8
@ -30,10 +30,12 @@ static constexpr Event SAFE_RATE_RECOVERY = MAKE_EVENT(1, severity::MEDIUM);
|
|||||||
static constexpr Event MULTIPLE_RW_INVALID = MAKE_EVENT(2, severity::HIGH);
|
static constexpr Event MULTIPLE_RW_INVALID = MAKE_EVENT(2, severity::HIGH);
|
||||||
//!< MEKF was not able to compute a solution.
|
//!< MEKF was not able to compute a solution.
|
||||||
static constexpr Event MEKF_INVALID_INFO = MAKE_EVENT(3, severity::INFO);
|
static constexpr Event MEKF_INVALID_INFO = MAKE_EVENT(3, severity::INFO);
|
||||||
|
//!< MEKF is able to compute a solution again.
|
||||||
|
static constexpr Event MEKF_RECOVERY = MAKE_EVENT(4, severity::INFO);
|
||||||
//!< MEKF was not able to compute a solution during any pointing ACS mode for a prolonged time.
|
//!< MEKF was not able to compute a solution during any pointing ACS mode for a prolonged time.
|
||||||
static constexpr Event MEKF_INVALID_MODE_VIOLATION = MAKE_EVENT(4, severity::HIGH);
|
static constexpr Event MEKF_INVALID_MODE_VIOLATION = MAKE_EVENT(5, severity::HIGH);
|
||||||
//!< The ACS safe mode controller was not able to compute a solution and has failed.
|
//!< The ACS safe mode controller was not able to compute a solution and has failed.
|
||||||
static constexpr Event SAFE_MODE_CONTROLLER_FAILURE = MAKE_EVENT(5, severity::HIGH);
|
static constexpr Event SAFE_MODE_CONTROLLER_FAILURE = MAKE_EVENT(6, severity::HIGH);
|
||||||
|
|
||||||
extern const char* getModeStr(AcsMode mode);
|
extern const char* getModeStr(AcsMode mode);
|
||||||
|
|
||||||
|
@ -289,6 +289,7 @@ void AcsController::performPointingCtrl() {
|
|||||||
&susDataProcessed, &mekfData, &acsParameters);
|
&susDataProcessed, &mekfData, &acsParameters);
|
||||||
if (result != MultiplicativeKalmanFilter::MEKF_RUNNING &&
|
if (result != MultiplicativeKalmanFilter::MEKF_RUNNING &&
|
||||||
result != MultiplicativeKalmanFilter::MEKF_INITIALIZED) {
|
result != MultiplicativeKalmanFilter::MEKF_INITIALIZED) {
|
||||||
|
mekfInvalidCounter++;
|
||||||
if (not mekfInvalidFlag) {
|
if (not mekfInvalidFlag) {
|
||||||
triggerEvent(acs::MEKF_INVALID_INFO);
|
triggerEvent(acs::MEKF_INVALID_INFO);
|
||||||
mekfInvalidFlag = true;
|
mekfInvalidFlag = true;
|
||||||
@ -299,15 +300,18 @@ void AcsController::performPointingCtrl() {
|
|||||||
if (mekfInvalidCounter > acsParameters.onBoardParams.mekfViolationTimer) {
|
if (mekfInvalidCounter > acsParameters.onBoardParams.mekfViolationTimer) {
|
||||||
// Trigger this so STR FDIR can set the device faulty.
|
// Trigger this so STR FDIR can set the device faulty.
|
||||||
EventManagerIF::triggerEvent(objects::STAR_TRACKER, acs::MEKF_INVALID_MODE_VIOLATION, 0, 0);
|
EventManagerIF::triggerEvent(objects::STAR_TRACKER, acs::MEKF_INVALID_MODE_VIOLATION, 0, 0);
|
||||||
|
mekfInvalidCounter = 0;
|
||||||
}
|
}
|
||||||
mekfInvalidCounter++;
|
|
||||||
// commandActuators(0, 0, 0, acsParameters.magnetorquesParameter.torqueDuration,
|
// commandActuators(0, 0, 0, acsParameters.magnetorquesParameter.torqueDuration,
|
||||||
// cmdSpeedRws[0],
|
// cmdSpeedRws[0],
|
||||||
// cmdSpeedRws[1], cmdSpeedRws[2], cmdSpeedRws[3],
|
// cmdSpeedRws[1], cmdSpeedRws[2], cmdSpeedRws[3],
|
||||||
// acsParameters.rwHandlingParameters.rampTime);
|
// acsParameters.rwHandlingParameters.rampTime);
|
||||||
return;
|
return;
|
||||||
} else {
|
} else {
|
||||||
|
if (mekfInvalidFlag) {
|
||||||
|
triggerEvent(acs::MEKF_RECOVERY);
|
||||||
mekfInvalidFlag = false;
|
mekfInvalidFlag = false;
|
||||||
|
}
|
||||||
mekfInvalidCounter = 0;
|
mekfInvalidCounter = 0;
|
||||||
}
|
}
|
||||||
uint8_t enableAntiStiction = true;
|
uint8_t enableAntiStiction = true;
|
||||||
|
Loading…
Reference in New Issue
Block a user