Loading...
Searching...
No Matches
state.h
1
4
5// ALLOW FORMATTING
6#ifndef STATE_H
7#define STATE_H
8
9#include "membuff.h"
10#include "quaternion.h"
11#include "slidingwindow.h"
12
19
31
36typedef struct {
37 enum State flightState;
38 uint32_t flightTimeMs;
39 float attitude[3];
40 float launchAngle[3];
41 float tilt;
42 float cosine;
43 float altitude;
44 float velocity;
45 Quaternion rotation;
46 SlidingWindow avgVel;
47 SlidingWindow avgPress;
48 MemBuff mem;
49} State;
50
51void State_init();
53
54#endif
void State_init()
Definition state.c:45
State * State_getState()
Definition state.c:69
@ APOGEE
At least 2: velocity negative, pressure increasing, tilt > 90 degrees.
Definition state.h:28
@ PRELAUNCH
Initial boot condition.
Definition state.h:25
@ LAUNCH
Body reference Z-axis acceleration above threshold.
Definition state.h:26
@ COAST
Global reference Z-axis velocity decreasing.
Definition state.h:27
@ DESCENT
Altitude below main threshold.
Definition state.h:29
State variable struct.
Definition state.h:36