From: Keith Packard Date: Sun, 24 May 2009 04:20:12 +0000 (-0700) Subject: Fix aoview telemetry GPS parsing code to use correct columns X-Git-Tag: 0.5~67 X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=commitdiff_plain;h=5a7a63c34b778e40a61ddabd16ec1af9a2be50c3;hp=26988c3e7acb2fa832810475e43e08fd2867459c 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 --- 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;