X-Git-Url: https://git.gag.com/?a=blobdiff_plain;f=src%2Fcore%2Fao_telemetry.h;h=776015291dddde49a3d49adfb1615eb8f0bf5631;hb=56911f27376b0fe91a464e369bb8aa1531b3c7dc;hp=32a1668ce8628a7a3fdbeb977f9dff74d28bd7f5;hpb=246174b32bb6cf827d240c32d6a51c3513a08c37;p=fw%2Faltos diff --git a/src/core/ao_telemetry.h b/src/core/ao_telemetry.h index 32a1668c..77601529 100644 --- a/src/core/ao_telemetry.h +++ b/src/core/ao_telemetry.h @@ -126,13 +126,15 @@ struct ao_telemetry_satellite_info { uint8_t c_n_1; }; +#define AO_TELEMETRY_SATELLITE_MAX_SAT 12 + struct ao_telemetry_satellite { uint16_t serial; /* 0 */ uint16_t tick; /* 2 */ uint8_t type; /* 4 */ uint8_t channels; /* 5 number of reported sats */ - struct ao_telemetry_satellite_info sats[12]; /* 6 */ + struct ao_telemetry_satellite_info sats[AO_TELEMETRY_SATELLITE_MAX_SAT]; /* 6 */ uint8_t unused[2]; /* 30 */ /* 32 */ }; @@ -205,6 +207,32 @@ struct ao_telemetry_mega_data { }; +#define AO_TELEMETRY_MINI 0x10 + +struct ao_telemetry_mini { + uint16_t serial; /* 0 */ + uint16_t tick; /* 2 */ + uint8_t type; /* 4 */ + + uint8_t state; /* 5 flight state */ + + int16_t v_batt; /* 6 battery voltage */ + int16_t sense_a; /* 8 apogee continuity */ + int16_t sense_m; /* 10 main continuity */ + + int32_t pres; /* 12 Pa * 10 */ + int16_t temp; /* 16 °C * 100 */ + + int16_t acceleration; /* 18 m/s² * 16 */ + int16_t speed; /* 20 m/s * 16 */ + int16_t height; /* 22 m */ + + int32_t ground_pres; /* 24 average pres on pad */ + + int32_t pad28; /* 28 */ + /* 32 */ +}; + /* #define AO_SEND_ALL_BARO */ #define AO_TELEMETRY_BARO 0x80 @@ -238,6 +266,7 @@ union ao_telemetry_all { struct ao_telemetry_companion companion; struct ao_telemetry_mega_sensor mega_sensor; struct ao_telemetry_mega_data mega_data; + struct ao_telemetry_mini mini; struct ao_telemetry_baro baro; };