PSAS/ StateMachineApr2003

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

Disarm

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.

Arm

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.

Ready

On entry to Ready state, the FC verifies that:

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

Boost

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

Coast

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

Descent

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

Recovery

On entry to Recovery state, the FC:

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

Operational Scenarios

1. ABORT BEFORE LAUNCH

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

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.

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. 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: