|
Avionics
Core avionics package for CURE flight computers
|
The data examples shown below are relative to the MARTHA 1.3 hardware.
Not all sensor data needs to be stored at 100Hz. High-frequency data such as acceleration and gyroscope readings are critical for accurate calculations, while other values like temperature and magnetometer readings change more slowly and can be logged less frequently.
| Data Stream | Bytes per Save | Saves per Second (Hz) | Total Bytes per Second |
|---|---|---|---|
| Altitude | 4 | 100 | 400 |
| Acceleration (x, y, z) | 12 | 100 | 1200 |
| Gyroscope (x, y, z) | 12 | 100 | 1200 |
| Temperature | 4 | 1 | 4 |
| Magnetometer (x, y, z) | 12 | 1 | 12 |
| Flight Status | 4 | 10 | 40 |
| Timestamp | 4 | 100 | 400 |
| Super Loop Rate | 4 | 1 | 4 |
| Flight ID | 4 | 1 | 4 |
| Total | - | - | 3264 bytes/sec |
The W25Q128 flash chip provides 128 megabits (16 megabytes) of storage. At 3,264 bytes per second, this allows for 4,901 seconds (~81 minutes) of storage, assuming perfect efficiency (which is unrealistic due to metadata overhead).
The flash chip consists of 4,096 sectors, with each sector spanning 4,096 addresses (16³). We reserve Sector 1 for metadata, as data can only be erased one sector at a time.
| Address Range | Function |
|---|---|
| 0x000000 (1 byte) | 0x01: Post-launch mode active, 0x00: Normal mode |
| 0x000001 – 0x000005 (4 bytes) | Stores the address of "sacred" data (protected launch data) |
Excluding metadata, 15.9959MB remains available, reducing storage by only **~1 second**.
Each sensor data handler writes to a global data saver that manages flash storage. Each handler can configure its save rate based on the table in Fig. 1.
The Byte5 format ensures flexible and efficient storage:
To optimize performance, data is buffered in RAM and written one full 256-byte page at a time, reducing write cycles.
| Data | Labels | Padding | Bytes per Page |
|---|---|---|---|
| 204 | 51 | 1 | 256 |
This results in 20.3% storage waste, balancing efficiency and flexibility.
| Data Stream | Bytes per Save | Saves per Second (Hz) | Total Bytes per Second |
|---|---|---|---|
| Altitude | 5 | 100 | 500 |
| Acceleration (x, y, z) | 15 | 100 | 1500 |
| Gyroscope (x, y, z) | 15 | 100 | 1500 |
| Temperature | 5 | 1 | 5 |
| Magnetometer (x, y, z) | 15 | 1 | 15 |
| Flight Status | 5 | 10 | 50 |
| Timestamp | 5 | 100 | 500 |
| Super Loop Rate | 5 | 1 | 5 |
| Flight ID | 5 | 1 | 5 |
| Total | - | - | 4080 bytes/sec |
At 4,080 bytes/sec, storage lasts 3,921 seconds (~65 minutes)**—sufficient for a **5-minute launch.
A 64-byte chunk method was considered to eliminate padding and labels by storing fixed-size blocks. This would perfectly align with 256-byte flash pages.
| Data Type | Bytes |
|---|---|
| Acceleration (x, y, z) | 12 |
| Gyroscope (x, y, z) | 12 |
| Magnetometer (x, y, z) | 12 |
| Altitude | 4 |
| Pressure | 8 |
| Temperature (LSM6DSOX) | 4 |
| Temperature (BMP390) | 4 |
| Timestamp | 4 |
| Flag | 4 |
| Total | 64 |
To avoid losing launch data due to circular buffering, we implement a post-launch mode: