The software that runs on the Cygnus-X1 model rocket flight computer seen here: https://github.com/AdamMarciniak/CygnusX1
The computer runs in a state machine where each state is a different state of flight. Transitions between states are governed by sensor data and user inputs.