Title and Scope
Software Functional Specification
This document gives a functional description of Flight Computer software to be created for the June 2003 launch.
Phrases in bold italic are gaps to be filled in and solicitation of better description.
Hardware Architecture
Figure 1 gives a brief overview of the hardware connections to/from the Flight Computer. This figure is a simple block diagram intended only to show basic connections of the Flight Computer. For more details of the hardware, consult the hardware specifications at FlightComputer and BlockDiagram.
The Flight Computer has an attachment to the CAN bus, over which it exchanges CAN messages with the Pyro/2m, GPS, IMU, ATV and APS (Avionics Power System) nodes.
The Flight Computer has a connection to an IEEE 802.11 WiFi transceiver, over which it exchanges message with the Ground Station.
The Flight Computer has 128MB (32MB x 32) of non-volatile flash memory used as a "flash" hard disk (for program and data storage).
Software Architecture
Amendment: SMART distributes its own IMU messages instead of sending to the CAN reader
The Flight Computer software will be implemented as a set of cooperating processes which exchange message by reading and writing named pipes. Figure 2 shows the process boundaries and message flows.
Manager Process
The Manager Process supervises all the other processes. It is responsible for:
- starting all processes initially
- watching for error conditions
- restarting process after their death
- perform orderly shutdown when commanded
missing: how does Manager communicate with Ground Station?
Message Formats
There are three message formats:
CANbus message format Messages on the CAN bus
typedef struct { uint32t cmtime; /* 25us timestamp counter */ unsigned cmid : 11; /* message id / unsigned cm_rtr : 1; / RTR bit / unsigned cm_len : 4; / Length of body / u_int8_t cm_body[8]; / message bytes */ } CAN_MSG;
Airlink message format FIFO_MSG with the NET_MSG union filled in is used on the WiFi link. Fields are in network byte order.
typedef struct { uint32t nmtime; /* 25us timestamp counter */ uint16t nmid; /* (id << 5) | (rtr << 4) | len / u_int8_t nm_body[8]; / message bytes (network byte order if numeric) */ } NET_MSG;
Fifo message format Used within the Flight Computer.
typedef struct { FMTAG fmtag; /* enum of all message types */ union { CANMSG fmcan; NETMSG fmnet; STRINGMSG fmstring; } fmu; } FIFOMSG;
CAN Reader Process
Reads from the CAN bus. Converts messages from CANbus message format to Fifo message format.
- reads messages from CAN bus
produces 5 output streams in Fifo message format.
all CAN messages are written to Logger Process input pipe
- a subset need filter description of messages are written to the input pipe of ?FC2Net Process
- all CAN messages are written to the input pipe of the Sequencer Process
- GPS messages are written to the input pipe of the SMART Process
- IMU messages are written to the input pipe of the SMART Process
CAN Writer Process
Converts messages from Fifo message format to CANbus message format. Writes to the CAN bus.
- opens a named pipe for input
expects 3 inputs in Fifo message format:
messages from ?Net2FC Process
- messages from Sequencer Process guess: state transitions
messages from SMART Process: fact check: GPS messages to be sent to ATV node
output: for each message received:
convert to CANbus message format
- write to CAN bus
?FC2Net Process
Implements WiFi downlink to Ground Station.
- opens a named pipe for input
expects 3 inputs in Fifo message format:
filtered messages from CAN Reader Process
- filtered messages from Sequencer Process
filtered messages from SMART Process
output
opens a UDP socket over the WiFi device to RocketView in Ground Station, creating a downlink
- all messages received are written to the socket.
- all messages are written in airlink message format
?Net2FC Process
Implements WiFi uplink from Ground Station.
input
opens a fact check UDP socket over the WiFi device from name of cooperating process in Ground Station, creating an uplink
- reads all messages received on the socket.
incoming messages are in airlink message format
produces 2 output streams in Fifo message format:
all messages received are written to the input pipe of the Sequencer Process
- all messages received are written to the input pipe of the CAN Writer Process
Logger Process
Implements a non-volatile log of all CAN messages. Expects and writes messages in Fifo message format.
- opens a named pipe for input
- input: reads all messages received on the pipe
output
all messages received are written to non-volatile flash memory
- when flash memory becomes full, oldest data is overwritten first
SMART Process
Smart Module Assembling Realtime Tasks
Process imu, gps, etc. data to determine position in space. Detect launch, apogee etc. Dispatch virtual CAN message to Logger, ?FC2Net, and Sequencer (position updates).
Transform GPS serial data into position messages Jamey, need better description here
Transform IMU messages from Jamey, need better description here
- opens a named pipe for input
expects 2 inputs:
GPS messages from the CAN Reader Process
IMU messages from the CAN Reader Process
produces 4 output streams:
transformed GPS messages are written to the input pipe of CAN Writer Process
- transformed IMU messages are written to:
- the input pipe of the Logger Process
- the input pipe of ?FC2Net Process (filtered)
- the input pipe of the Sequencer Process
Sequencer Process
Implements the flight state machine.
Larry, Nate: this would be a good place to embed your state machine design, or a link to it if you have a separate document.
Implements recovery backup timer. better description needed
- initiates recovery backup timer
- opens a named pipe for input
expects 3 inputs:
messages from the CAN Reader Process
- messages from the ?Net2FC Process
position updates from the SMART Process
produces 2 output streams:
a subset need filter description: commands? of messages are written to the input pipe of CAN Writer Process
a subset need filter description: status updates? of messages are written to the input pipe of ?FC2Net Process
figure source.ppt: drawing source