Avionics
Core avionics package for CURE flight computers
Loading...
Searching...
No Matches
States.h
Go to the documentation of this file.
1
#ifndef FLIGHT_STATES_H
2
#define FLIGHT_STATES_H
3
4
// Not all states are used by all state machines
5
// Order matters, systems rely on comparisons like `current_state` > STATE_ASCENT to know if the
6
// flight has passed the ascent state and is now falling. So states are ordered from earliest to latest.
7
// The literal value of these states should never be used because a new state can be added
8
// in between existing states, shifting their values.
9
// Keep in mind that there is a difference between states and events. For example,
10
// apogee is an event that causes a transition from STATE_ASCENT to STATE_DESCENT, but it is not a state itself.
11
// The state machines are in charge of detecting these transitions and updating the states.
12
enum
FlightState
{
13
STATE_UNARMED
,
14
STATE_ARMED
,
15
STATE_ASCENT
,
// Don't use the ascent state if you are already using powered ascent and coast ascent
16
STATE_POWERED_ASCENT
,
17
STATE_COAST_ASCENT
,
18
STATE_DESCENT
,
19
STATE_DROGUE_DEPLOYED
,
20
STATE_MAIN_DEPLOYED
,
21
STATE_LANDED
22
};
23
24
#endif
FlightState
FlightState
Definition
States.h:12
STATE_MAIN_DEPLOYED
@ STATE_MAIN_DEPLOYED
Definition
States.h:20
STATE_ARMED
@ STATE_ARMED
Definition
States.h:14
STATE_LANDED
@ STATE_LANDED
Definition
States.h:21
STATE_ASCENT
@ STATE_ASCENT
Definition
States.h:15
STATE_DROGUE_DEPLOYED
@ STATE_DROGUE_DEPLOYED
Definition
States.h:19
STATE_UNARMED
@ STATE_UNARMED
Definition
States.h:13
STATE_COAST_ASCENT
@ STATE_COAST_ASCENT
Definition
States.h:17
STATE_DESCENT
@ STATE_DESCENT
Definition
States.h:18
STATE_POWERED_ASCENT
@ STATE_POWERED_ASCENT
Definition
States.h:16
include
state_estimation
States.h
Generated by
1.16.1