diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2005-06-20 18:06:20 +0000 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2005-06-20 18:06:20 +0000 |
commit | 4fe755688be0979f57ca067ea8eda2f2271a3b8a (patch) | |
tree | 941d2b8d3f9984f7c69c6cfd3cd30b0e0da3adf7 /libgpsd_core.c | |
parent | 1c1f2d6f8a12881a7bf17ef8a38fc73e4d036b68 (diff) | |
download | gpsd-4fe755688be0979f57ca067ea8eda2f2271a3b8a.tar.gz |
First steps towards solving Rob Janssen's DOP problem.
Diffstat (limited to 'libgpsd_core.c')
-rw-r--r-- | libgpsd_core.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/libgpsd_core.c b/libgpsd_core.c index 4b9dc5b8..99a6cc56 100644 --- a/libgpsd_core.c +++ b/libgpsd_core.c @@ -403,12 +403,25 @@ static gps_mask_t handle_packet(struct gps_device_t *session) session->gpsdata.sentence_length = session->outbuflen; session->gpsdata.d_recv_time = timestamp(); + /* Get data from current packet into the newdata structure */ received = session->device_type->parse_packet(session); + /* Clear fix data at start of cycle */ if ((received & CYCLE_START_SET)!=0) { gps_clear_fix(&session->gpsdata.fix); session->gpsdata.set &=~ FIX_SET; } +#ifdef __UNUSED__ + /* + * Compute fix-quality data from the satellite positions. + * This may be overridden by DOPs reported from the packet we just got. + */ + if ((session->gpsdata.set & SATELLITE_SET)!=0) { + if (session->gpsdata.satellites > 0) + dop_compute(session->gpsdata.satellites_used,&session->gpsdata); + } +#endif /* __UNUSED__ */ + /* Merge in the data from the current packet. */ gps_merge_fix(&session->gpsdata.fix, received, &session->gpsdata.newdata); session->gpsdata.set = ONLINE_SET | received; |