gpsd-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [gpsd-dev] STATUS_DGPS_FIX is never reported by libgps


From: Eric S. Raymond
Subject: Re: [gpsd-dev] STATUS_DGPS_FIX is never reported by libgps
Date: Tue, 13 Jan 2015 08:22:38 -0500
User-agent: Mutt/1.5.23 (2014-03-12)

Ahti Heinla <address@hidden>:
> Hi,
> 
>       Although gps.h documents that gps_data_t status field can have a value
> STATUS_DGPS_FIX, in practice libgps reports STATUS_FIX while in fact it knows
> it has a DGPS fix.
> 
>       When libgps accesses gpsd via the socket interface, this results from 
> the fact
> that socket protocol as documented simply does not include information on 
> whether
> the fix is DGPS or non-DGPS.
> 
>       When libgps accesses gpsd via shm interface, this results from 
> libgps_shm.c
> having specific code to ignore gpsdata->status, and instead set it based on
> gpsdata->fix.mode (which does not include DGPS information):
> 
>             if ((gpsdata->set & REPORT_IS)!=0) {
>                 if (gpsdata->fix.mode >= 2)
>                     gpsdata->status = STATUS_FIX;
>                 else
>                     gpsdata->status = STATUS_NO_FIX;
>                 gpsdata->set = STATUS_SET;
>             }
> 
>       Any comments? Should the documentation in gps.h be changed, or steps
> be taken to actually report STATUS_DGPS_FIX when it is due?
> 
> Ahti
> 

The exposure of that value is a historical relic.  I believed when designing the
JSON protocol that users would care about the modeled error bounds than about
what combination of satellite geometry and DGPS/WAAS/EGNOS correction 
determined them.  So it's used internally when computing error estimates
but not (as you noted) exported.

The one place it will still be appropriate to expose this is in gpsmon.

I'll move that #define to gpsd.h where it's not part of the public interface.
-- 
                <a href="http://www.catb.org/~esr/";>Eric S. Raymond</a>



reply via email to

[Prev in Thread] Current Thread [Next in Thread]