summaryrefslogtreecommitdiff
path: root/ao-tools/lib/cc-logfile.c
diff options
context:
space:
mode:
authorKeith Packard <keithp@keithp.com>2009-11-21 21:10:09 -0800
committerKeith Packard <keithp@keithp.com>2009-11-21 21:10:09 -0800
commit2d77c18b15834046b7b79d49d87211828f2409e9 (patch)
tree6a1c64dc01a92656e2ccb142fd5af9c3880e4a13 /ao-tools/lib/cc-logfile.c
parent1e7fb61700f1f6f2ed5fdbc4380d7187b0cd187b (diff)
Convert telemetry file GPS satellite information in cc_log_read
The satellite info wasn't being correctly converted from telemetry files to the data log structure, so ao-postflight was not seeing it. Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'ao-tools/lib/cc-logfile.c')
-rw-r--r--ao-tools/lib/cc-logfile.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/ao-tools/lib/cc-logfile.c b/ao-tools/lib/cc-logfile.c
index b0fff9f8..842e5c7c 100644
--- a/ao-tools/lib/cc-logfile.c
+++ b/ao-tools/lib/cc-logfile.c
@@ -263,6 +263,9 @@ read_telem(const char *line, struct cc_flightraw *f)
{
struct cc_telem telem;
struct cc_gpselt gps;
+ struct cc_gpssat sat;
+ int s;
+
if (!cc_telem_parse(line, &telem))
return 0;
f->ground_accel = telem.ground_accel;
@@ -288,6 +291,12 @@ read_telem(const char *line, struct cc_flightraw *f)
gps.second = telem.gps.gps_time.second;
gpsdata_add(&f->gps, &gps);
}
+ for (s = 0; s < telem.gps_tracking.channels; s++) {
+ sat.time = telem.tick;
+ sat.svid = telem.gps_tracking.sats[s].svid;
+ sat.c_n = telem.gps_tracking.sats[s].c_n0;
+ gpssat_add(&f->gps, &sat);
+ }
return 1;
}