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
,
// 0x00
14
STATE_ARMED
,
// 0x01
15
STATE_SOFT_ASCENT
,
// 0x02
16
STATE_ASCENT
,
// 0x03 Don't use the ascent state if you are already using powered ascent and coast ascent
17
STATE_POWERED_ASCENT
,
// 0x04
18
STATE_COAST_ASCENT
,
// 0x05
19
STATE_DESCENT
,
// 0x06
20
STATE_DROGUE_DEPLOYED
,
// 0x07
21
STATE_MAIN_DEPLOYED
,
// 0x08
22
STATE_LANDED
,
// 0x09
23
};
24
25
#endif
FlightState
FlightState
Definition
States.h:12
STATE_MAIN_DEPLOYED
@ STATE_MAIN_DEPLOYED
Definition
States.h:21
STATE_ARMED
@ STATE_ARMED
Definition
States.h:14
STATE_LANDED
@ STATE_LANDED
Definition
States.h:22
STATE_ASCENT
@ STATE_ASCENT
Definition
States.h:16
STATE_DROGUE_DEPLOYED
@ STATE_DROGUE_DEPLOYED
Definition
States.h:20
STATE_SOFT_ASCENT
@ STATE_SOFT_ASCENT
Definition
States.h:15
STATE_UNARMED
@ STATE_UNARMED
Definition
States.h:13
STATE_COAST_ASCENT
@ STATE_COAST_ASCENT
Definition
States.h:18
STATE_DESCENT
@ STATE_DESCENT
Definition
States.h:19
STATE_POWERED_ASCENT
@ STATE_POWERED_ASCENT
Definition
States.h:17
include
state_estimation
States.h
Generated by
1.16.1