ao-tools: Parse TeleGPS state value from gps location packet
[fw/altos] / ao-tools / lib / cc-telemetry.h
index c28aceb895d2385eef28bceb8a0ae1514398a2d3..35cca13b3283742efa5668329cb7465d5a216d94 100644 (file)
@@ -90,6 +90,8 @@ struct ao_telemetry_configuration {
 #define AO_GPS_MODE_MANUAL             'M'
 #define AO_GPS_MODE_SIMULATED          'S'
 
+#define AO_GPS_STATE_VALID             0x80
+
 struct ao_telemetry_location {
        uint16_t        serial;         /*  0 */
        uint16_t        tick;           /*  2 */
@@ -112,7 +114,7 @@ struct ao_telemetry_location {
        uint16_t        ground_speed;   /* 26 cm/s */
        int16_t         climb_rate;     /* 28 cm/s */
        uint8_t         course;         /* 30 degrees / 2 */
-       uint8_t         unused[1];      /* 31 */
+       uint8_t         state;          /* 31 */
        /* 32 */
 };
 
@@ -157,7 +159,7 @@ struct ao_telemetry_mega_sensor {
        uint16_t        tick;           /*  2 */
        uint8_t         type;           /*  4 */
 
-       uint8_t         pad5;           /*  5 */
+       uint8_t         orient;         /*  5 angle from vertical */
        int16_t         accel;          /*  6 Z axis */
 
        int32_t         pres;           /*  8 Pa * 10 */