wiki/ FlightComputerStateFlowSep2003

LV2 Flight Computer State Flow (for "sequencer.c")

Up: Software
Xref: LaunchSequenceLv2,LaunchControl
  1. Turn on: Housecleaning tasks necessary before starting the state machine.

  2. Evaluate Power up: Check for a reboot in flight

  3. Check log (or FC status file) for current rocket state at last powerdown (in debug mode? in flight?)
  4. Goto Initialize UNLESS:
    1. Log/FC status file says we're doing something else, and recovery node and sensors verify that.
    2. Jump to the "current" state, while determining if any nodes need to be reset/initialized.

  5. Initialize: Get all nodes in a known and safe state.

  6. RocketReady deasserted
  7. Recovery node safed
  8. All nodes off or in "off/low power" mode
  9. Goto Idle after all nodes are safed (automatic transition).

  10. Idle: Low power mode for waiting on pad or for debugging

  11. FC, APS and REC nodes only.
  12. Goto Preflight Check on LC_START_PREFLIGHT_CHECK message

  13. Preflight Check: Turn on and test all subsystems.

  14. Turn on all nodes
  15. Test all subsystems
  16. Goto Idle on LC_ABORT_LAUNCH or failed subsystem test.
  17. Goto Ready if all tests pass (automatic transition).

  18. Ready: All systems are go; waiting for count down

  19. Arm the recovery node using the 2m system
  20. Goto Idle on LC_ABORT_LAUNCH or any system failure, error or warning.
  21. Goto Armed on LC_ARM_FC_FOR_COUNTDOWN (at T-110 seconds into countdown).

  22. Armed: _Nodes ready for flight; waiting for launch _

  23. Arm all CAN nodes except Recovery node.
  24. Goto Rocket Ready on LC_T-5_SECONDS message.
  25. Goto Initialize on LC_ABORT_LAUNCH or any system failure, error or warning.

  26. Rocket Ready: Turn on the launch interlock relay and wait for launch detect.

  27. Start and check recovery timers; begin reseting recovery timers every second until launch detect.
  28. Assert the RocketReady line (APS)
  29. Inform launchcontrol that rocketready is asserted and we're go for launch.
  30. Goto Boost on launch detect.
  31. Goto Launch Abort on LC_ABORT_LAUNCH or any system failure, error or warning.

  32. Launch Abort: The launch has been aborted, but it may be too late; wait in case the main motor has ignited.

  33. Start 60 second timer; keep reseting T-0 time on recovery timers.
  34. Goto Preflight check on 60 sec. timeout
  35. Goto Boost if launch detected

  36. Boost: IMU/GPS/Altimeter/Umbilical vote implies motor has started.

  37. Update recovery node timer with actual launch time.
  38. Goto Coast on burnout detect.
  39. Goto Deploy drogue on:
    1. Manual command
    2. Recovery node timeout occurred

  40. Coast: Motor has burnt out and the rocket is coasting

  41. Goto Boost on chuff detect (engine has started up again)

  42. Goto Deploy drogue on:
    1. Apogee detect
    2. Recovery timeout occurred

  43. Deploy Drogue: Apogee has been reached; deploy the drogue parachute.

  44. Tell recovery node to deploy drogue now.
  45. Goto Descend Drogue on drogue deployed detected
  46. Goto Deploy Main on:
    1. No drogue timeout (panic).
    2. Recovery timeout occurred.

  47. Descend Drogue: The drogue is deployed and the rocket is descending (fast).

  48. Update recovery node line cutter timer.
  49. Goto Deploying Main on:
    1. AGL < 500m
    2. Recovery node timeout

  50. Deploy Main: Near ground; fire the line cutters to release the main parachute.

  51. Tell recovery node to fire line cutter.
  52. Goto Descend Main on main deployed detect.
  53. Goto Lawn Dart if main chute timeout (panic)

  54. Descend Main: Main chutes deployed and the rocket is descending (slowly).)

  55. Disarm recovery node.
  56. Goto Recovery Wait on touchdown detect

  57. Recovery Wait: Rocket on ground; waiting for recovery teams to pick it up.

  58. Disarm all nodes.
  59. Goto Recovery Sleep if battery low
  60. Goto Power Down on LC_POWER_DOWN

  61. Recovery Sleep: Low power waiting mode.

  62. Go into a low power mode. Cycle Wifi and ATV amplifiers to conserve power.
  63. At a minimum, send GPS data.
  64. Goto Powering Down on LC_POWER_DOWN

  65. Power down: Power the rocket down.

  66. Entered via a power down condition
    • manual (via message)
    • manual (via hardware jumper)
  67. Shuts down tasks
  68. Issues can message to power node
  69. halts kernel.

OUTDATED, OLDER state flows: