[ntp:questions] ntpd + GPS + PPS + Linux (Ubuntu Lucid)

unruh unruh at wormhole.physics.ubc.ca
Thu Jun 9 15:23:26 UTC 2011


On 2011-06-08, Stephan Skrodzki <skrodzki at stevekist.de> wrote:
> Am Dienstag, den 07.06.2011, 20:24 +0000 schrieb Rob:
>> >> 
>> >> gpsd plus ntpd does not require any PPS support in the kernel.
>> >> there is no specfic PPS support via SHM but the gpsd just provides a
>> >> pretty accurate clock to ntpd.  When your system is not overloaded
>> >> (CPU loading always around or over 1.00) there should be no problem
>> >> with sync
>> >
>> > Overload is not the case. After what you wrote, I had a short look at
>> > the gpsd ntpshm code and saw, that the pps shm part also inserts the gps
>> > time from the gps, so: why do I need the gps part of the shm at all?
>> 
>> I think you mean "the pps part..."
>
> No, I meant the gps part... as I looked into the code of gpsd my vague
> understanding is, that it takes gettimeofday, when a pps arrives, but
> then does some magic with the gps serial input (in ntpshm.c). I do not
> really understand, why this is necessary, as I would also like to use
> this as a pps only solution, where I get a pps from an external source
> without any gps (and therefore no time from gps). But I will ask this on
> the gpsd mailing list.
>

the pps can only give you how many microseconds the clock is off, not
how many seconds. To know how many seconds it is off you HAVE to have
some other time source. The nmea output from the receiver is one way,
but using some other ntp source-- from the net for example-- is another
way ( that is shat shmpps uses It has a script which waits till the
clock is withing 1/4 sec of the correct time as determined by ntp sorces
from the net, and then uses the pps to fix the microseconds)




More information about the questions mailing list