ao-tools: Add a few GPS telem/eeprom constants
authorKeith Packard <keithp@keithp.com>
Mon, 14 Jul 2014 03:41:36 +0000 (20:41 -0700)
committerKeith Packard <keithp@keithp.com>
Mon, 14 Jul 2014 03:41:36 +0000 (20:41 -0700)
These make it possible to encode/decode GPS data from telemetry and
eeprom files

Signed-off-by: Keith Packard <keithp@keithp.com>
ao-tools/lib/cc.h

index c434b102264847ecdbe66c6e81364ef1f79f8a55..bff4b2c9992cea601d785cfa08dbac6fc99e44e0 100644 (file)
@@ -517,9 +517,18 @@ struct ao_log_gps {
 #define AO_LOG_GPS_ALT         'H'
 #define AO_LOG_GPS_SAT         'V'
 #define AO_LOG_GPS_DATE                'Y'
+#define AO_LOG_GPS_POS         'P'
 
 #define AO_LOG_CONFIG          'c'
 
+#define AO_GPS_NUM_SAT_MASK    (0xf << 0)
+#define AO_GPS_NUM_SAT_SHIFT   (0)
+
+#define AO_GPS_VALID           (1 << 4)
+#define AO_GPS_RUNNING         (1 << 5)
+#define AO_GPS_DATE_VALID      (1 << 6)
+#define AO_GPS_COURSE_VALID    (1 << 7)
+
 #define AO_LOG_FORMAT_UNKNOWN          0       /* unknown; altosui will have to guess */
 #define AO_LOG_FORMAT_FULL             1       /* 8 byte typed log records */
 #define AO_LOG_FORMAT_TINY             2       /* two byte state/baro records */