diff options
author | Keith Packard <keithp@keithp.com> | 2009-11-15 16:20:18 -0800 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2009-11-15 16:20:18 -0800 |
commit | b0d7e3f9c9322542e9b649bb6ad7f7e5bb99dffa (patch) | |
tree | 0f0fcefd67f4bef178ebd282f3151ba93564f55b /ao-tools/lib | |
parent | 524665fc221b0d483453c67b7211e282cebc8980 (diff) |
Stop using SiRF state info.
With the switch to the skytraq GPS unit, we don't have the same level
of detail in the GPS stream, so stop reporting that in the telemetry
stream, in the UI and writing it to eeprom.
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'ao-tools/lib')
-rw-r--r-- | ao-tools/lib/cc-logfile.c | 1 | ||||
-rw-r--r-- | ao-tools/lib/cc-telem.c | 17 | ||||
-rw-r--r-- | ao-tools/lib/cc.h | 1 |
3 files changed, 12 insertions, 7 deletions
diff --git a/ao-tools/lib/cc-logfile.c b/ao-tools/lib/cc-logfile.c index 3d346bcc..9d086c82 100644 --- a/ao-tools/lib/cc-logfile.c +++ b/ao-tools/lib/cc-logfile.c @@ -212,7 +212,6 @@ read_eeprom(const char *line, struct cc_flightraw *f, double *ground_pres, int * case AO_LOG_GPS_SAT: sat.time = tick; sat.svid = a; - sat.state = (b & 0xff); sat.c_n = (b >> 8) & 0xff; gpssat_add(&f->gps, &sat); break; diff --git a/ao-tools/lib/cc-telem.c b/ao-tools/lib/cc-telem.c index 9a2f6155..ccd40ac2 100644 --- a/ao-tools/lib/cc-telem.c +++ b/ao-tools/lib/cc-telem.c @@ -178,18 +178,25 @@ cc_telem_parse(const char *input_line, struct cc_telem *telem) } if (tracking_pos >= 0 && nword >= tracking_pos + 2 && strcmp(words[tracking_pos], "SAT") == 0) { int c, n, pos; + int per_sat; + int state; + + if (version >= 2) + per_sat = 2; + else + per_sat = 3; cc_parse_int(&n, words[tracking_pos + 1]); pos = tracking_pos + 2; - if (nword >= pos + n * 3) { + if (nword >= pos + n * per_sat) { telem->gps_tracking.channels = n; for (c = 0; c < n; c++) { cc_parse_int(&telem->gps_tracking.sats[c].svid, words[pos + 0]); - cc_parse_hex(&telem->gps_tracking.sats[c].state, - words[pos + 1]); + if (version < 2) + cc_parse_hex(&state, words[pos + 1]); cc_parse_int(&telem->gps_tracking.sats[c].c_n0, - words[pos + 2]); - pos += 3; + words[pos + per_sat - 1]); + pos += per_sat; } } else { telem->gps_tracking.channels = 0; diff --git a/ao-tools/lib/cc.h b/ao-tools/lib/cc.h index ebc0db7d..0e8ced8a 100644 --- a/ao-tools/lib/cc.h +++ b/ao-tools/lib/cc.h @@ -103,7 +103,6 @@ struct cc_gpselt { struct cc_gpssat { double time; uint16_t svid; - uint8_t state; uint8_t c_n; }; |