altos: Add lots more GPS data to mega log
authorKeith Packard <keithp@keithp.com>
Sat, 7 Dec 2013 17:39:41 +0000 (09:39 -0800)
committerKeith Packard <keithp@keithp.com>
Sat, 7 Dec 2013 17:39:41 +0000 (09:39 -0800)
There's plenty of space in the GPS log packets to hold course, speed,
climb and DOP values, so just stick them in.

Signed-off-by: Keith Packard <keithp@keithp.com>
src/core/ao_gps_report_mega.c
src/core/ao_log.h

index a66068abfd3f6febc6a041212eddd2a4e4af162e..d13885dd8cc5581c01d2a15718a730184289bd29 100644 (file)
@@ -53,6 +53,13 @@ ao_gps_report_mega(void)
                        gps_log.u.gps.year = gps_data.year;
                        gps_log.u.gps.month = gps_data.month;
                        gps_log.u.gps.day = gps_data.day;
                        gps_log.u.gps.year = gps_data.year;
                        gps_log.u.gps.month = gps_data.month;
                        gps_log.u.gps.day = gps_data.day;
+                       gps_log.u.gps.course = gps_data.course;
+                       gps_log.u.gps.ground_speed = gps_data.ground_speed;
+                       gps_log.u.gps.climb_rate = gps_data.climb_rate;
+                       gps_log.u.gps.pdop = gps_data.pdop;
+                       gps_log.u.gps.hdop = gps_data.hdop;
+                       gps_log.u.gps.vdop = gps_data.vdop;
+                       gps_log.u.gps.mode = gps_data.mode;
                        ao_log_mega(&gps_log);
                }
                if ((new & AO_GPS_NEW_TRACKING) && (n = gps_tracking_data.channels) != 0) {
                        ao_log_mega(&gps_log);
                }
                if ((new & AO_GPS_NEW_TRACKING) && (n = gps_tracking_data.channels) != 0) {
index 4b09faebe9ea9020f6c42abcb3492d025e41cb7c..09f3118812ed64f5436b48d3252cad80c856575e 100644 (file)
@@ -253,8 +253,14 @@ struct ao_log_mega {
                        uint8_t         year;           /* 18 */
                        uint8_t         month;          /* 19 */
                        uint8_t         day;            /* 20 */
                        uint8_t         year;           /* 18 */
                        uint8_t         month;          /* 19 */
                        uint8_t         day;            /* 20 */
-                       uint8_t         pad;            /* 21 */
-               } gps;  /* 22 */
+                       uint8_t         course;         /* 21 */
+                       uint16_t        ground_speed;   /* 22 */
+                       int16_t         climb_rate;     /* 24 */
+                       uint8_t         pdop;           /* 26 */
+                       uint8_t         hdop;           /* 27 */
+                       uint8_t         vdop;           /* 28 */
+                       uint8_t         mode;           /* 29 */
+               } gps;  /* 30 */
                /* AO_LOG_GPS_SAT */
                struct {
                        uint16_t        channels;       /* 4 */
                /* AO_LOG_GPS_SAT */
                struct {
                        uint16_t        channels;       /* 4 */