ACS updates
Some checks failed
EIVE/eive-obsw/pipeline/head There was a failure building this commit
EIVE/eive-obsw/pipeline/pr-develop There was a failure building this commit

- Adapt ACS subsystem to handle events from ACS CTRL
- Some fixes and updates for ACS subsystem
This commit is contained in:
2023-02-02 16:27:50 +01:00
parent 07effb628e
commit 2b00d3a565
12 changed files with 187 additions and 151 deletions

View File

@@ -2,6 +2,7 @@
#include <fsfw/datapool/PoolReadGuard.h>
#include "mission/acsDefs.h"
#include "mission/config/torquer.h"
AcsController::AcsController(object_id_t objectId)
@@ -45,15 +46,15 @@ void AcsController::performControlOperation() {
case InternalState::READY: {
if (mode != MODE_OFF) {
switch (submode) {
case SUBMODE_SAFE:
case acs::SAFE:
performSafe();
break;
case SUBMODE_DETUMBLE:
case acs::DETUMBLE:
performDetumble();
break;
case SUBMODE_PTG_TARGET:
case SUBMODE_PTG_NADIR:
case SUBMODE_PTG_INERTIAL:
case acs::PTG_TARGET:
case acs::PTG_NADIR:
case acs::PTG_INERTIAL:
performPointingCtrl();
break;
}
@@ -151,9 +152,10 @@ void AcsController::performSafe() {
detumbleCounter = 0;
}
if (detumbleCounter > acsParameters.detumbleParameter.detumblecounter) {
submode = SUBMODE_DETUMBLE;
// TODO: Trigger mode transition in ACS subsystem?
submode = acs::CtrlSubmode::DETUMBLE;
detumbleCounter = 0;
triggerEvent(SAFE_RATE_VIOLATION);
triggerEvent(acs::SAFE_RATE_VIOLATION);
}
{
@@ -208,7 +210,8 @@ void AcsController::performDetumble() {
detumbleCounter = 0;
}
if (detumbleCounter > acsParameters.detumbleParameter.detumblecounter) {
submode = SUBMODE_SAFE;
// TODO: Trigger mode transition in subsystem instead
submode = acs::CtrlSubmode::DETUMBLE;
detumbleCounter = 0;
}