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
12
19 public:
29 StateMachine(IDataSaver* dataSaver, LaunchDetector* launchDetector, ApogeeDetector* apogeeDetector,
30 VerticalVelocityEstimator* verticalVelocityEstimator, FastLaunchDetector* fastLaunchDetector);
31
38 int update(const AccelerationTriplet& accel, const DataPoint& alt) override;
39
40 private:
41 IDataSaver* dataSaver_;
42 LaunchDetector* launchDetector_;
43 ApogeeDetector* apogeeDetector_;
44 VerticalVelocityEstimator* verticalVelocityEstimator_;
45 FastLaunchDetector* fastLaunchDetector_;
46 uint32_t fldLaunchTime_ms_ = 0;
47};
48
49
50#endif
Detects the apogee (peak altitude) of a rocket flight using estimated altitude and vertical velocity.
BaseStateMachine(FlightState initialState=STATE_UNARMED)
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, FastLaunchDetector *fastLaunchDetector)
Wire dependencies for the state machine.
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.