Avionics
Core avionics package for CURE flight computers
Loading...
Searching...
No Matches
BaseStateMachine Class Referenceabstract

Abstract interface for flight state machines driven by IMU/altimeter data. More...

#include <BaseStateMachine.h>

Inheritance diagram for BaseStateMachine:
Inheritance graph
Collaboration diagram for BaseStateMachine:
Collaboration graph

Public Member Functions

virtual int update (const AccelerationTriplet &accel, const DataPoint &alt)=0
 Advance the state machine with the latest measurements.
virtual uint8_t getState () const =0
 Current discrete state identifier.

Detailed Description

Abstract interface for flight state machines driven by IMU/altimeter data.

Note
When to use: derive a concrete state machine to map sensor inputs to discrete flight phases without changing call sites.

Definition at line 13 of file BaseStateMachine.h.

Member Function Documentation

◆ getState()

virtual uint8_t BaseStateMachine::getState ( ) const
pure virtual

Current discrete state identifier.

Note
When to use: downstream logic (ejection, logging, UI) queries this to decide actions.

Implemented in BurnoutStateMachine, and StateMachine.

◆ update()

virtual int BaseStateMachine::update ( const AccelerationTriplet & accel,
const DataPoint & alt )
pure virtual

Advance the state machine with the latest measurements.

Parameters
accelAcceleration vector readings.
altAltimeter sample.
Note
When to use: call every sensor update; return codes can signal events or errors.

Implemented in BurnoutStateMachine, and StateMachine.


The documentation for this class was generated from the following file: