eive-obsw/mission/acs/defs.h

45 lines
1.7 KiB
C
Raw Normal View History

#ifndef MISSION_ACSDEFS_H_
#define MISSION_ACSDEFS_H_
2023-02-02 17:12:22 +01:00
#include <eive/eventSubsystemIds.h>
#include <fsfw/modes/HasModesIF.h>
namespace acs {
2023-02-07 17:28:59 +01:00
// These modes are the submodes of the ACS controller and the modes of the ACS subsystem.
2023-02-13 01:26:30 +01:00
enum AcsMode : Mode_t {
OFF = HasModesIF::MODE_OFF,
2023-02-06 20:15:45 +01:00
SAFE = 10,
PTG_IDLE = 11,
PTG_NADIR = 12,
PTG_TARGET = 13,
PTG_TARGET_GS = 14,
PTG_INERTIAL = 15,
};
2023-03-10 13:17:46 +01:00
enum SafeSubmode : Submode_t { DEFAULT = 0, DETUMBLE = 1 };
2023-03-08 18:09:50 +01:00
// static constexpr uint8_t ACS_SYSTEM_DETUMBLE_SUBMODE = 1;
static const uint8_t SUBSYSTEM_ID = SUBSYSTEM_ID::ACS_SUBSYSTEM;
2023-02-03 10:51:56 +01:00
//!< The limits for the rotation in safe mode were violated.
2023-02-03 10:52:39 +01:00
static const Event SAFE_RATE_VIOLATION = MAKE_EVENT(0, severity::MEDIUM);
//!< The system has recovered from a safe rate rotation violation.
static constexpr Event SAFE_RATE_RECOVERY = MAKE_EVENT(1, severity::MEDIUM);
//!< Multiple RWs are invalid, not commandable and therefore higher ACS modes cannot be maintained.
static constexpr Event MULTIPLE_RW_INVALID = MAKE_EVENT(2, severity::HIGH);
2023-02-22 14:50:38 +01:00
//!< MEKF was not able to compute a solution.
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);
2023-02-22 14:50:38 +01:00
//!< 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(5, severity::HIGH);
//!< The ACS safe mode controller was not able to compute a solution and has failed.
static constexpr Event SAFE_MODE_CONTROLLER_FAILURE = MAKE_EVENT(6, severity::HIGH);
2023-02-13 01:26:30 +01:00
extern const char* getModeStr(AcsMode mode);
} // namespace acs
#endif /* MISSION_ACSDEFS_H_ */