summaryrefslogtreecommitdiff
path: root/FlightComputerStateFlowSep2003.mdwn
blob: c1d4e23f7eb63ba5651363fa3a73dc7df87792bf (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
# <a name="LV2 Flight Computer State Flow ("></a> LV2 Flight Computer State Flow (for "sequencer.c")

<table border=1 cellpadding=0 cellspacing=0>
  <tr>
    <th bgcolor="#99CCCC"><strong> Up: </strong></th>
    <td>[[SoftwareTeamHome]]</td>
  </tr>
  <tr>
    <th bgcolor="#99CCCC"><strong> Xref: </strong></th>
    <td>[[LaunchSequenceLv2]],[[LaunchControl]]</td>
  </tr>
</table>

1. **Turn on:** _Housecleaning tasks necessary before starting the state machine._<br /><br />
2. **Evaluate Power up:** _Check for a reboot in flight_<br /><br />
  - Check log (or FC status file) for current rocket state at last powerdown (in debug mode? in flight?)
  - 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.<br /><br />
3. **Initialize:** _Get all nodes in a known and safe state._<br /><br />
  - RocketReady deasserted
  - Recovery node safed
  - All nodes off or in "off/low power" mode
  - Goto **Idle** after all nodes are safed (automatic transition). <br /><br />
4. **Idle:** _Low power mode for waiting on pad or for debugging_<br /><br />
  - FC, APS and REC nodes only.
  - Goto **Preflight Check** on `LC_START_PREFLIGHT_CHECK` message <br /><br />
5. **Preflight Check:** _Turn on and test all subsystems._<br /><br />
  - Turn on all nodes
  - Test all subsystems
  - Goto **Idle** on `LC_ABORT_LAUNCH` or failed subsystem test.
  - Goto **Ready** if all tests pass (automatic transition). <br /><br />
6. **Ready:** _All systems are go; waiting for count down_<br /><br />
  - Arm the recovery node using the 2m system
  - Goto **Idle** on `LC_ABORT_LAUNCH` or any system failure, error or warning.
  - Goto **Armed** on `LC_ARM_FC_FOR_COUNTDOWN` (at T-110 seconds into countdown). <br /><br />
7. **Armed:** \_Nodes ready for flight; waiting for launch \_ <br /><br />
  - Arm all CAN nodes except Recovery node.
  - Goto **Rocket Ready** on `LC_T-5_SECONDS` message.
  - Goto **Initialize** on `LC_ABORT_LAUNCH` or any system failure, error or warning. <br /><br />
8. **Rocket Ready:** _Turn on the launch interlock relay and wait for launch detect._<br /><br />
  - Start and check recovery timers; begin reseting recovery timers every second until launch detect.
  - Assert the RocketReady line (APS)
  - Inform launchcontrol that rocketready is asserted and we're go for launch.
  - Goto **Boost** on launch detect.
  - Goto **Launch Abort** on `LC_ABORT_LAUNCH` or any system failure, error or warning. <br /><br />
9. **Launch Abort:** _The launch has been aborted, but it may be too late; wait in case the main motor has ignited._<br /><br />
  - Start 60 second timer; keep reseting T-0 time on recovery timers.
  - Goto **Preflight check** on 60 sec. timeout
  - Goto **Boost** if launch detected <br /><br />
10. **Boost:** _IMU/GPS/Altimeter/Umbilical vote implies motor has started._<br /><br />
  - Update recovery node timer with actual launch time.
  - Goto **Coast** on burnout detect.
  - Goto **Deploy drogue** on:
    1. Manual command
    2. Recovery node timeout occurred <br /><br />
11. **Coast:** _Motor has burnt out and the rocket is coasting_<br /><br />
  - Goto **Boost** on chuff detect (engine has started up again) <br /><br />
  - Goto **Deploy drogue** on:
    1. Apogee detect
    2. Recovery timeout occurred
    3. `LC_DEPLOY_DROGUE`. <br /><br />
12. **Deploy Drogue:** _Apogee has been reached; deploy the drogue parachute._<br /><br />
  - Tell recovery node to deploy drogue now.
  - Goto **Descend Drogue** on drogue deployed detected
  - Goto **Deploy Main** on:
    1. No drogue timeout (panic).
    2. Recovery timeout occurred.
    3. `LC_DEPLOY_MAIN`<br /><br />
13. **Descend Drogue:** _The drogue is deployed and the rocket is descending (fast)._<br /><br />
  - Update recovery node line cutter timer.
  - Goto **Deploying Main** on:
    1. AGL &lt; 500m
    2. Recovery node timeout
    3. `LC_DEPLOY_MAIN`<br /><br />
14. **Deploy Main:** _Near ground; fire the line cutters to release the main parachute._<br /><br />
  - Tell recovery node to fire line cutter.
  - Goto **Descend Main** on main deployed detect.
  - Goto **Lawn Dart** if main chute timeout (panic) <br /><br />
15. **Descend Main:** _Main chutes deployed and the rocket is descending (slowly).)_<br /><br />
  - Disarm recovery node.
  - Goto **Recovery Wait** on touchdown detect <br /><br />
16. **Recovery Wait:** _Rocket on ground; waiting for recovery teams to pick it up._<br /><br />
  - Disarm all nodes.
  - Goto **Recovery Sleep** if battery low
  - Goto **Power Down** on `LC_POWER_DOWN`<br /><br />
17. **Recovery Sleep:** _Low power waiting mode._<br /><br />
  - Go into a low power mode. Cycle Wifi and ATV amplifiers to conserve power.
  - At a minimum, send GPS data.
  - Goto **Powering Down** on `LC_POWER_DOWN`<br /><br />
18. **Power down:** _Power the rocket down._<br /><br />
  - Entered via a power down condition
    - manual (via message)
    - manual (via hardware jumper)
  - Shuts down tasks
  - Issues can message to power node
  - halts kernel. <br /><br />

----

OUTDATED, OLDER state flows:

- [[StateMachineApr2003]]
- [[FlightSequencing]]

----
Attachments:

- [[states.dot]]
- [[states.ps]]