diff options
author | Keith Packard <keithp@keithp.com> | 2013-12-07 09:39:41 -0800 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2013-12-07 09:39:41 -0800 |
commit | 2a9b0cdff5db03dc11b6ef69cf5436c834c3acc4 (patch) | |
tree | 09168c092b27b1f4e6ba786b6ca3e7121cd413fb /src | |
parent | de2e812b02a99a2f6d85f15a9600265931f6f6b0 (diff) |
altos: Add lots more GPS data to mega log
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>
Diffstat (limited to 'src')
-rw-r--r-- | src/core/ao_gps_report_mega.c | 7 | ||||
-rw-r--r-- | src/core/ao_log.h | 10 |
2 files changed, 15 insertions, 2 deletions
diff --git a/src/core/ao_gps_report_mega.c b/src/core/ao_gps_report_mega.c index a66068ab..d13885dd 100644 --- a/src/core/ao_gps_report_mega.c +++ b/src/core/ao_gps_report_mega.c @@ -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.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) { diff --git a/src/core/ao_log.h b/src/core/ao_log.h index 4b09faeb..09f31188 100644 --- a/src/core/ao_log.h +++ b/src/core/ao_log.h @@ -253,8 +253,14 @@ struct ao_log_mega { 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 */ |