gpsd-dev
[Top][All Lists]
Advanced

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

Re: [gpsd-dev] RFC 2783


From: Eric S. Raymond
Subject: Re: [gpsd-dev] RFC 2783
Date: Tue, 10 Mar 2015 16:48:48 -0400
User-agent: Mutt/1.5.23 (2014-03-12)

Gary E. Miller <address@hidden>:
> I have been looking at the ntpd RFC 2783 enabled drivers hoping to learn
> something from them.  I found the opposite.  gpsd does a much better
> job with RFC 2783 than ntpd.

I'm not surprised to hear this; the GPSD code will have been tested
over a much wider range of devices, pulse shapes, and deployment
cases. For that reason, I said recently, in mail you may not have
seen, that I'd bet on your PPS implementation to be the best in the
world.  I meant it.

>                                Except for one thing ntpd does better.
> 
> Gpsd auomatically configures the GPS serial port for PPS, then
> automatically detects the resulting /dev/ppsX device. gpsd then passes PPS
> data to ntpd for all offsets from system clock to PPS clock.
> 
> ntpd does none of that.  In the configuration file you tell ntpd which of
> /dev/pps[0-3] to use.  Before ntpd will use the PPS input the ntpd time and
> system time must be within +/- 400 mSec.  That may be hard to do for 
> a GPS and gpsd does not require that.
> 
> We are getting a lot of pull from the embedded community to support
> manually configuring the /dev/ppsX.  For example, there are many GPS for
> RasPi that put PPS on GPIO pin 4.  Adafruit claims to have sold 10,000
> plus GPS for RasPi configure this way.  There is no way for the kernel
> or for gpsd to know the association between GPIO 4 and the serial GPS.
> 
> For those Adafruit, and other, users we need a way to specify a
> /dev/ppsX manually.  This also solves the problem on other OS that
> do not allow Linux like determination of serial device to PPS device
> mapping.
> 
> How about something like this:
> 
>       gpsd -n /dev/ttyUSB0 -p /dev/pps0
> 
> Ideas?

Is there always, and necessarily, only *one* pps device?  Wherever that
assumption is violated, seems like this syntax will fail to be fully general.

It would be more in harmony with the GPSD way of autoconfiguration to
jigger it so we can say this:

gpsd -n /dev/ttyUSB0 /dev/pps0

and have GPSD figure out for itself that /dev/pps0 should be treated as 
a PPS device.

Have a look at serial.c:gpsd_classify() - that's probably where the
magic should happen, based on either a path match to pps or a kernel
device major number.
-- 
                <a href="http://www.catb.org/~esr/";>Eric S. Raymond</a>



reply via email to

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