2023-02-02 16:27:50 +01:00
|
|
|
#ifndef MISSION_ACSDEFS_H_
|
|
|
|
#define MISSION_ACSDEFS_H_
|
|
|
|
|
2023-02-02 17:12:22 +01:00
|
|
|
#include <eive/eventSubsystemIds.h>
|
2023-02-02 16:27:50 +01:00
|
|
|
#include <fsfw/modes/HasModesIF.h>
|
|
|
|
|
|
|
|
namespace acs {
|
|
|
|
|
2023-04-02 20:12:24 +02:00
|
|
|
enum class SimpleSensorMode { NORMAL = 0, OFF = 1 };
|
|
|
|
|
2023-03-24 14:52:26 +01:00
|
|
|
// These modes are the modes of the ACS controller and of the ACS subsystem.
|
2023-02-13 01:26:30 +01:00
|
|
|
enum AcsMode : Mode_t {
|
2023-02-02 16:27:50 +01:00
|
|
|
OFF = HasModesIF::MODE_OFF,
|
2023-02-06 20:15:45 +01:00
|
|
|
SAFE = 10,
|
2023-03-10 12:11:10 +01:00
|
|
|
PTG_IDLE = 11,
|
|
|
|
PTG_NADIR = 12,
|
|
|
|
PTG_TARGET = 13,
|
|
|
|
PTG_TARGET_GS = 14,
|
|
|
|
PTG_INERTIAL = 15,
|
2023-02-02 16:27:50 +01:00
|
|
|
};
|
|
|
|
|
2023-03-10 13:17:46 +01:00
|
|
|
enum SafeSubmode : Submode_t { DEFAULT = 0, DETUMBLE = 1 };
|
|
|
|
|
2023-04-06 10:37:25 +02:00
|
|
|
enum SafeModeStrategy : uint8_t {
|
|
|
|
SAFECTRL_OFF = 0,
|
|
|
|
SAFECTRL_NO_MAG_FIELD_FOR_CONTROL = 1,
|
|
|
|
SAFECTRL_NO_SENSORS_FOR_CONTROL = 2,
|
|
|
|
SAFECTRL_ACTIVE_MEKF = 10,
|
|
|
|
SAFECTRL_WITHOUT_MEKF = 11,
|
|
|
|
SAFECTRL_ECLIPSE_DAMPING = 12,
|
2023-04-06 13:36:46 +02:00
|
|
|
SAFECTRL_ECLIPSE_IDELING = 13,
|
2023-04-06 10:37:25 +02:00
|
|
|
SAFECTRL_DETUMBLE_FULL = 20,
|
|
|
|
SAFECTRL_DETUMBLE_DETERIORATED = 21,
|
|
|
|
};
|
|
|
|
|
2023-02-02 16:27:50 +01:00
|
|
|
static const uint8_t SUBSYSTEM_ID = SUBSYSTEM_ID::ACS_SUBSYSTEM;
|
2023-03-24 14:52:26 +01:00
|
|
|
//! [EXPORT] : [COMMENT] The limits for the rotation in safe mode were violated.
|
2023-03-24 15:18:52 +01:00
|
|
|
static constexpr Event SAFE_RATE_VIOLATION = MAKE_EVENT(0, severity::MEDIUM);
|
2023-03-24 14:52:26 +01:00
|
|
|
//! [EXPORT] : [COMMENT] The system has recovered from a safe rate rotation violation.
|
2023-02-03 10:52:39 +01:00
|
|
|
static constexpr Event SAFE_RATE_RECOVERY = MAKE_EVENT(1, severity::MEDIUM);
|
2023-03-24 14:52:26 +01:00
|
|
|
//! [EXPORT] : [COMMENT] Multiple RWs are invalid, uncommandable and therefore higher ACS modes
|
|
|
|
//! cannot be maintained.
|
2023-02-16 15:40:16 +01:00
|
|
|
static constexpr Event MULTIPLE_RW_INVALID = MAKE_EVENT(2, severity::HIGH);
|
2023-03-24 14:52:26 +01:00
|
|
|
//! [EXPORT] : [COMMENT] MEKF was not able to compute a solution.
|
|
|
|
//! P1: MEKF state on exit
|
2023-02-22 14:50:38 +01:00
|
|
|
static constexpr Event MEKF_INVALID_INFO = MAKE_EVENT(3, severity::INFO);
|
2023-03-24 15:18:52 +01:00
|
|
|
//! [EXPORT] : [COMMENT] MEKF is able to compute a solution again.
|
2023-03-23 10:27:32 +01:00
|
|
|
static constexpr Event MEKF_RECOVERY = MAKE_EVENT(4, severity::INFO);
|
2023-03-24 15:18:52 +01:00
|
|
|
//! [EXPORT] : [COMMENT] MEKF performed an automatic reset after detection of nonfinite values.
|
|
|
|
static constexpr Event MEKF_AUTOMATIC_RESET = MAKE_EVENT(5, severity::INFO);
|
2023-03-24 14:52:26 +01:00
|
|
|
//! [EXPORT] : [COMMENT] MEKF was not able to compute a solution during any pointing ACS mode for a
|
|
|
|
//! prolonged time.
|
2023-03-24 15:18:52 +01:00
|
|
|
static constexpr Event MEKF_INVALID_MODE_VIOLATION = MAKE_EVENT(6, severity::HIGH);
|
2023-03-24 14:52:26 +01:00
|
|
|
//! [EXPORT] : [COMMENT] The ACS safe mode controller was not able to compute a solution and has
|
|
|
|
//! failed.
|
2023-03-24 14:58:49 +01:00
|
|
|
//! P1: Missing information about magnetic field, P2: Missing information about rotational rate
|
2023-03-24 15:18:52 +01:00
|
|
|
static constexpr Event SAFE_MODE_CONTROLLER_FAILURE = MAKE_EVENT(7, severity::HIGH);
|
2023-02-02 16:27:50 +01:00
|
|
|
|
2023-02-13 01:26:30 +01:00
|
|
|
extern const char* getModeStr(AcsMode mode);
|
|
|
|
|
2023-02-02 16:27:50 +01:00
|
|
|
} // namespace acs
|
|
|
|
|
|
|
|
#endif /* MISSION_ACSDEFS_H_ */
|