diff options
author | Keith Packard <keithp@keithp.com> | 2009-05-23 21:20:12 -0700 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2009-05-23 21:20:12 -0700 |
commit | 5a7a63c34b778e40a61ddabd16ec1af9a2be50c3 (patch) | |
tree | 291a9e7fa101a0b864398f7bb728ec681445268d | |
parent | 26988c3e7acb2fa832810475e43e08fd2867459c (diff) |
Fix aoview telemetry GPS parsing code to use correct columns
This code was trying to pull the GPS data from the wrong columns, causing
aoview to fail to display GPS information.
Signed-off-by: Keith Packard <keithp@keithp.com>
-rw-r--r-- | aoview/aoview_monitor.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/aoview/aoview_monitor.c b/aoview/aoview_monitor.c index 7a04c82f..0fd535f2 100644 --- a/aoview/aoview_monitor.c +++ b/aoview/aoview_monitor.c @@ -106,12 +106,12 @@ aoview_monitor_parse(char *line) aoview_parse_int(&state.flight_pres, words[30]); aoview_parse_int(&state.ground_pres, words[32]); aoview_parse_int(&state.nsat, words[34]); - if (strcmp (words[36], "unlocked") != 0 && nword >= 41) { + if (strcmp (words[36], "unlocked") != 0 && nword >= 40) { state.locked = 1; sscanf(words[36], "%d:%d:%d", &state.gps_time.hour, &state.gps_time.minute, &state.gps_time.second); - aoview_parse_pos(&state.lat, words[39]); - aoview_parse_pos(&state.lon, words[40]); - sscanf(words[41], "%dm", &state.alt); + aoview_parse_pos(&state.lat, words[37]); + aoview_parse_pos(&state.lon, words[38]); + sscanf(words[39], "%dm", &state.alt); } else { state.locked = 0; state.gps_time.hour = state.gps_time.minute = state.gps_time.second = 0; |