VEGA Data Storage
Expected Data Packet:
General
Time (seconds) = 9 bits
2^9 = 512 seconds = 8.53 minutes
Altitude
Altitude (m) = 12 bits = 4096m max
12k feet = 3657 m
Acceleration
X, Y, Z acceleration = 12 bits each
Maximum = ±15.99 (remove the decimal) = ±1599
2^12 = 4196 = ±2048
Heading
Pitch, Roll, Yaw = 9 bits each
Maximum = ±180
2^9 = 512 = ±256
Total Bits = 9 + 12 + 12*3 + 9*3 = 84 bits = 10.5 bytes = 11 bytes
11 bytes at 5 Hz = 55 Bytes / Second
128000 Bytes / 55 bytes per sec = 2327 seconds = 38.78 minutes of data
Ideally, there is a rolling buffer of data, waiting for takeoff. Once takeoff happens, ignore / erase the previous data aside from maybe 5 seconds before