summaryrefslogtreecommitdiff
path: root/libgps_core.c
diff options
context:
space:
mode:
authorEric S. Raymond <esr@thyrsus.com>2014-09-22 14:50:03 -0400
committerEric S. Raymond <esr@thyrsus.com>2014-09-22 14:50:03 -0400
commit282691da60ec526772f713a63fa0b8f43aea7acb (patch)
tree622f4d55c882f63475b84691d41108dd17326cca /libgps_core.c
parentf63bdafc18991624b872e9efa858c024834a540e (diff)
downloadgpsd-282691da60ec526772f713a63fa0b8f43aea7acb.tar.gz
Refactor representation of satellite data into an array of structs...
...from a set of parallel arrays. This change flushed out a longstanding bug in the computation of DOPs for estimated error bars. Some test-load rebuilds were required: geostar-geos1m-binary.log.chk: With this change error estimates are computed and reported. trimble-lassen_iq-3dfix.log, trimble-lassen_iq-3dfix.log: the change revealed a bug in the computation of satellite-seen bits. Error estimates did not change. navcom.log: Error estimates changed. With these rebuilds, all regression tests pass.
Diffstat (limited to 'libgps_core.c')
-rw-r--r--libgps_core.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/libgps_core.c b/libgps_core.c
index d481e699..9baeefd4 100644
--- a/libgps_core.c
+++ b/libgps_core.c
@@ -346,20 +346,17 @@ void libgps_dump_state(struct gps_data_t *collect)
collect->policy.split24 ? "true" : "false",
collect->policy.devpath);
if (collect->set & SATELLITE_SET) {
- int i;
+ struct satellite_t *sp;
(void)fprintf(debugfp, "SKY: satellites in view: %d\n",
collect->satellites_visible);
- for (i = 0; i < collect->satellites_visible; i++) {
- bool used_in_solution = false;
- int j;
- for (j = 0; j < MAXCHANNELS; j++)
- if (collect->used[j] == i)
- used_in_solution = true;
+ for (sp = collect->skyview;
+ sp < collect->skyview + collect->satellites_visible;
+ sp++) {
(void)fprintf(debugfp, " %2.2d: %2.2d %3.3d %3.0f %c\n",
- collect->PRN[i], collect->elevation[i],
- collect->azimuth[i], collect->ss[i],
- used_in_solution ? 'Y' : 'N');
+ sp->PRN, sp->elevation,
+ sp->azimuth, sp->ss,
+ sp->used ? 'Y' : 'N');
}
}
if (collect->set & DEVICE_SET)