summaryrefslogtreecommitdiff
path: root/StateMachineApr2003.mdwn
blob: 5aa9afad9d8d4585196df5a30f2677175af19567 (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
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
# <a name="LV2 Avionics Flight State Model"></a> LV2 Avionics Flight State Model

(_ed._ This page is the result of gathering state machine documentation from the [[SoftwareSketch]] and [[FlightSequencing]] pages.)

The initial state is Disarm.

All state transitions shown here can be forced by a message from the TC or LC, but in the normal case, labeled transitions should occur when the listed event occurs.

[[state-diagram.png]]

## <a name="Disarm"></a> <a name="disarm">Disarm</a>

On entry to Disarm state, all devices except the FC are put in sleep mode.

The FC can transition to Arm state if sent an appropriate message.

## <a name="Arm"></a> <a name="arm">Arm</a>

On entry to Arm state, the payload, all CAN nodes, and the ATV transmitter are awakened from sleep mode.

The FC can transition to: Disarm or Ready state if sent an appropriate message; or Disarm state if an error occurs.

## <a name="Ready"></a> <a name="ready">Ready</a>

On entry to Ready state, the FC verifies that:

- The GPS is locked.
- IMU packets are being received and are within launchpad normal limits.
- Shore power off.
- No serious errors or failures.

If all of these are true, the FC triggers a "rocket ready" message, and starts the [[TelemetryLog]].

The FC can transition to: Disarm or Boost state if sent an appropriate message; Boost state if the conditions for launch detect (TBD) are satisfied; or Disarm state if an error occurs.

> A simplistic launch detect condition which has been proposed is to wait until the FC thinks the LC has sent the ignite signal, relying on knowledge of the launch schedule to time it right. A similar approach which may be easier to implement is to have the LC send the FC a message forcing it to transition states at the same time as the LC sends the ignite signal, which keeps knowledge of the launch schedule at the LC.
>
> However, neither approach guarentees that the rocket will have actually launched when the flight computer thinks it has, and in the worst case this could lead to ejection of the parachutes while the rocket is on the tower. My vote would be for doing the right thing and examining sensor data to detect launch.
>
> -- [[JameySharp]] - 16 Dec 2001

## <a name="Boost"></a> <a name="boost">Boost</a>

On entry to Boost state, the FC takes no action.

The FC can transition to: Coast or Descent state if sent an appropriate message; Coast state if the conditions for coast detect (TBD) are satisfied; or Descent state if the failsafe timer expires.

> At this time we are not implementing a way to check for Engine Cut Off (ECO). ECO is assumed to happen at a fixed time, and that's when this program switches to Coast mode.
>
> -- [[LarryLeach]] - 23 Aug 2001

## <a name="Coast"></a> <a name="coast">Coast</a>

On entry to Coast state, the FC takes no action.

The FC can transition to: Descent state if sent an appropriate message; or Descent state if the conditions for apogee detect (TBD) are satisfied.

> At this time we are not implementing an Apogee detect. We assume apogee happens at a fixed time, and that's when this program switches to Descent mode.
>
> -- [[LarryLeach]] - 23 Aug 2001

## <a name="Descent"></a> <a name="descent">Descent</a>

On entry to Descent state, the FC opens the parachutes and turns down the IMU sample rate.

The FC can transition to: Recovery state if sent an appropriate message; or Recovery state if the conditions for touchdown detect (TBD) are satisfied.

> Touchdown is triggered when the Z axis of the IMU reads 0g and the x/y axes read +- 1g for 5 seconds, triggering Recovery mode.
>
> -- [[LarryLeach]] - 23 Aug 2001

## <a name="Recovery"></a> <a name="recovery">Recovery</a>

On entry to Recovery state, the FC:

- Puts everything to sleep but the GPS and ATV transmitter.
- Modulates ATV transmitter power as time goes on (TBD how).

The FC can transition to Disarm state if sent an appropriate message.

> After 10 minutes, the transmitters (ATV and ethernet) switch to an intermittent mode of 20 minutes off 10 minutes on to save batteries.
>
> -- [[LarryLeach]] - 23 Aug 2001

## <a name="Operational Scenarios"></a> Operational Scenarios

### <a name="1. ABORT BEFORE LAUNCH"></a> 1. ABORT BEFORE LAUNCH

<dl>
  <dt><i>Preflight</i></dt>
  <dd> the FC is powered up and placed in Disarm mode. In this mode, all sensors and communications systems on LV2 are powered off to conserve power. </dd>
</dl>

_T - 10 minutes_ The FC recieves a signal commanding it to transition to ARM state. At this time the payload, and all CAN nodes are powered up. The FC begins to transmit data packets from the GPS and all systems

_T - 1 Minute_ The Shore power to LV2 is turned off. The LV is now on internal power.

_T - 5 Seconds_ The FC recieves a signal from the Launch Computer to transition to the READY state. The FC verifies GPS lock The FC verifys that Shore Power is off The FC verifys that there are no serious errors or failures. If all these are TRUE, teh FC sends a ?rocket ready? message The FC begins logging all data to disk (flash RAM) The FC begins examining sensor data to detect launch

_T - 2 Seconds_ The FC recieves an ABORT message and transitions back to Disarm state. In this mode, all sensors and communications systems on LV2 are powered off to conserve power.

And Safety personnel will proceed with manually confirming a safe status on all systems.

### <a name="2. Successful Flight of LV2"></a> 2. Successful Flight of LV2

_Preflight_ : the FC is powered up and placed in Disarm mode. In this mode, all sensors and communications systems on LV2 are powered off to conserve power.

_T - 10 minutes_ The FC recieves a signal commanding it to transition to ARM state. At this time the payload, and all CAN nodes are powered up. The FC begins to transmit data packets from the GPS and all systems

_T - 1 Minute_ The Shore power to LV2 is turned off. The LV is now on internal power.

_T - 5 Seconds_ The FC recieves a signal from the Launch Computer to transition to the READY state. The FC verifies GPS lock The FC verifys that Shore Power is off The FC verifys that there are no serious errors or failures. If all these are TRUE, teh FC sends a ?rocket ready? message The FC begins logging all data to disk (flash RAM) The FC begins examining sensor data to detect launch

_LAUNCH_ The FC detects launch and transitions to boost phase

_BOOST_ The FC sends a status message to the TC as it enters the coast phase. The FC continues to send data from all sensors to the TC Via the [[WiFi]] link. When the FC detects Engine Cut Off, the FC transitions to Coast phase

_COAST_ The FC sends a status message to the TC as it enters the coast phase The FC continues to send data from all sensors to the TC Via the [[WiFi]] link. The FC can transition to descent phase in only two cases. First, if the FC recieves an appropriate messge from tne TC. Second, if the FC detects apogee.

_DESCENT_ The FC activates the recovery system (seperating hte nosecone, and deploying parachutes). The FC turns down the IMU sample rate. The FC continues to send data from all sensors to the TC Via the [[WiFi]] link. When the FC detects Touchdown, the FC transitions to Recovery phase.

_RECOVERY_ The FC puts all sensors to sleep except for the GPS and necessary payload (ATV). The FC will follow the following cycle until commanded to enter the Disarm mode 10 minutes TRANSMIT with [[WiFi]] and ATV systems.

1. 1. minutes transmit OFF with [[WiFi]] and ATV systems. Upon recieving a command from the TC the FC will enter the Disarm mode In this mode, all sensors and communications systems on LV2 are powered off to conserve power.

----
Attachments:

- [[state-diagram.dia]]