|
Avionics
Core avionics package for CURE flight computers
|
The telemetry system allows the flight computer to send data over a UART stream to a radio modem which transmits the data OTA in real time to the ground station. From the flight computer software standpoint, we are simply sending data over a serial line.
Once the flight computer is powered on, the Telemetry object is constructed with the desired SensorDataHandler objects and their corresponding send frequencies. Every loop, the tick() method should be called, which checks if it is time to send data, the format of which is discussed below.
All specific signal bytes and lengths are defined in the TelemetryFmt namespace and may change after the time of writing this documentation.
All bytes are in big endian format.
| Sync | Timestamp | Data... | End |
|---|---|---|---|
| 4 bytes | int32 | ... | 4 bytes |
Within the data part of the packet, there are two ways to format data.
If the data simply consists of one number (eg. altitude reading, battery voltage), then it is sent like this:
| Label | Data |
|---|---|
| 1 byte | 4 bytes |
for a total of 5 bytes, where the label is a data label as defined in DataNames.h and the data is simply the big endian byte description of the data.
If the data intuitively comes in groups (eg. accelerometer x, y, and z readings), then it is sent like this:
| Label | Value1 | Value2 | Value3 |
|---|---|---|---|
| 1 byte | 4 bytes | 4 bytes | 4 bytes |