summaryrefslogtreecommitdiff
path: root/driver_navcom.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 /driver_navcom.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 'driver_navcom.c')
-rw-r--r--driver_navcom.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/driver_navcom.c b/driver_navcom.c
index c6f29630..9759f8a6 100644
--- a/driver_navcom.c
+++ b/driver_navcom.c
@@ -413,7 +413,7 @@ static gps_mask_t handle_0xb1(struct gps_device_t *session)
session->gpsdata.satellites_used = 0;
for (n = 0; n < 31; n++) {
if ((sats_used & (0x01 << n)) != 0)
- session->gpsdata.used[session->gpsdata.satellites_used++] =
+ session->sats_used[session->gpsdata.satellites_used++] =
(int)(n + 1);
}
@@ -782,11 +782,11 @@ static gps_mask_t handle_0x86(struct gps_device_t *session)
* says should be. So I check for the fact that if all three
* values below are zero, one is not interested on this satellite */
if (!(ele == 0 && azm == 0 && dgps_age == 0)) {
- session->gpsdata.PRN[i] = (int)prn;
- session->gpsdata.elevation[i] = (int)ele;
- session->gpsdata.azimuth[i] = (int)azm;
+ session->gpsdata.skyview[i].PRN = (int)prn;
+ session->gpsdata.skyview[i].elevation = (int)ele;
+ session->gpsdata.skyview[i].azimuth = (int)azm;
/*@ ignore @*//* splint is confused */
- s = session->gpsdata.ss[i++] = (p2_snr ? p2_snr : ca_snr) / 4.0;
+ s = session->gpsdata.skyview[i++].ss = (p2_snr ? p2_snr : ca_snr) / 4.0;
/*@ end @*/
}
gpsd_report(&session->context->errout, LOG_DATA,