State machines
Jump to navigation
Jump to search
XML autopilot modules already support stateful components, especially JK and RS flip-flops. The intention is to add explicit state-machine support, where a state machine component can be defined, with states and transitions between states.
- Each state will have a name, and a condition expression required to enable the state.
- Each transition will have a name, and a condition expression required to transition into a new state. Transitions can also be conditional on the current active state.
- Entering a state (firing a transition) can fire any number of binding expressions, as can leaving a state.
- State machines will have a property indicating the current state. (And possibly an integer state index?)
- A command will be defined to move a state machine to a new state - i.e explicitly fire a transition. This avoids creating signalling properties simply to fire transitions.
- State-machines can also fire bindings on *any* state change. (This enables updating common properties or Nasal without repeating a rule on every state or transition)
Taken together, the above allows good re-use of transitions and states, to describe common auto-pilot and FMS logic.
As a particular specialisation of the above, will be an 'off-arm-active' state machine. This will be a state machine specialisation with three states, and fixed names, intended to model the common arm/engage pattern of many autopilot functions.