X-Git-Url: https://git.gag.com/?p=fw%2Faltos;a=blobdiff_plain;f=aoview%2Faoview_monitor.c;h=7a04c82f88a653e31d32f189ab9104bda94c0a33;hp=3b3245e268866a77c1941bd26e242eecf75b68ed;hb=91b07410122d0eaaf292cdb31c200925d45eaf2c;hpb=2c780d67b8a22d75a2da4b2af21fd35f0c6f5236 diff --git a/aoview/aoview_monitor.c b/aoview/aoview_monitor.c index 3b3245e2..7a04c82f 100644 --- a/aoview/aoview_monitor.c +++ b/aoview/aoview_monitor.c @@ -82,7 +82,7 @@ aoview_monitor_parse(char *line) if (words[nword] == NULL) break; } - if (nword < 26) + if (nword < 36) return; if (strcmp(words[0], "CALL") != 0) return; @@ -100,13 +100,18 @@ aoview_monitor_parse(char *line) aoview_parse_int(&state.batt, words[18]); aoview_parse_int(&state.drogue, words[20]); aoview_parse_int(&state.main, words[22]); - aoview_parse_int(&state.nsat, words[24]); - if (strcmp (words[26], "unlocked") != 0 && nword >= 29) { + aoview_parse_int(&state.flight_accel, words[24]); + aoview_parse_int(&state.ground_accel, words[26]); + aoview_parse_int(&state.flight_vel, words[28]); + 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) { state.locked = 1; - sscanf(words[26], "%d:%d:%d", &state.gps_time.hour, &state.gps_time.minute, &state.gps_time.second); - aoview_parse_pos(&state.lat, words[27]); - aoview_parse_pos(&state.lon, words[28]); - sscanf(words[29], "%dm", &state.alt); + 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); } else { state.locked = 0; state.gps_time.hour = state.gps_time.minute = state.gps_time.second = 0;