+#define AO_MAX_TELEMETRY 128
+
+struct ao_telemetry_generic {
+ uint16_t serial; /* 0 */
+ uint16_t tick; /* 2 */
+ uint8_t type; /* 4 */
+ uint8_t payload[19]; /* 5 */
+ /* 24 */
+};
+
+#define AO_TELEMETRY_SENSOR_TELEMETRUM 0x01
+#define AO_TELEMETRY_SENSOR_TELEMINI 0x02
+#define AO_TELEMETRY_SENSOR_TELENANO 0x03
+
+struct ao_telemetry_sensor {
+ uint16_t serial; /* 0 */
+ uint16_t tick; /* 2 */
+ uint8_t type; /* 4 */
+
+ uint8_t state; /* 5 flight state */
+ int16_t accel; /* 6 accelerometer (TM only) */
+ int16_t pres; /* 8 pressure sensor */
+ int16_t temp; /* 10 temperature sensor */
+ int16_t v_batt; /* 12 battery voltage */
+ int16_t sense_d; /* 14 drogue continuity sense (TM/Tm) */
+ int16_t sense_m; /* 16 main continuity sense (TM/Tm) */
+
+ int16_t acceleration; /* 18 m/s² * 16 */
+ int16_t speed; /* 20 m/s * 16 */
+ int16_t height; /* 22 m */
+ /* 24 */
+};
+
+#define AO_TELEMETRY_CONSTANT 0x10
+
+struct ao_telemetry_constant {
+ uint16_t serial; /* 0 */
+ uint16_t tick; /* 2 */
+ uint8_t type; /* 4 */
+ uint8_t device; /* 5 device type */
+ uint16_t flight; /* 6 flight number */
+ int16_t ground_accel; /* 8 average ground accelerometer (TM only) */
+ int16_t ground_pres; /* 10 average ground barometer */
+ int16_t accel_plus_g; /* 12 +1g accelerometer calibration value (TM only) */
+ int16_t accel_minus_g; /* 14 -1g accelermeter calibration value (TM only) */
+ char callsign[AO_MAX_CALLSIGN]; /* 16 identity */
+ /* 24 */
+};