Avionics
Core avionics package for CURE flight computers
Loading...
Searching...
No Matches
StateMachine.h
Go to the documentation of this file.
1#ifndef FLIGHT_STATE_MACHINE_H
2#define FLIGHT_STATE_MACHINE_H
3
9
12
19 public:
29 StateMachine(IDataSaver* dataSaver, LaunchDetector* launchDetector, ApogeeDetector* apogeeDetector,
30 VerticalVelocityEstimator* verticalVelocityEstimator);
31
38 int update(const AccelerationTriplet& accel, const DataPoint& alt) override;
39
44 uint8_t getState() const override;
45
46 private:
47 uint8_t state;
48 IDataSaver* dataSaver;
49 LaunchDetector* launchDetector;
50 ApogeeDetector* apogeeDetector;
51 VerticalVelocityEstimator* verticalVelocityEstimator;
52};
53
54
55#endif
Detects the apogee (peak altitude) of a rocket flight using estimated altitude and vertical velocity.
Abstract interface for flight state machines driven by IMU/altimeter data.
Timestamped float measurement container.
Definition DataPoint.h:11
Abstract interface for persisting timestamped data points.
Definition DataSaver.h:13
Sliding-window launch detector based on acceleration magnitude.
StateMachine(IDataSaver *dataSaver, LaunchDetector *launchDetector, ApogeeDetector *apogeeDetector, VerticalVelocityEstimator *verticalVelocityEstimator)
Wire dependencies for the state machine.
uint8_t getState() const override
Retrieve the current state value.
int update(const AccelerationTriplet &accel, const DataPoint &alt) override
Process new sensor data and transition states if thresholds are met.
1D Kalman filter fusing altimeter and accelerometer data.