Re: [chrony-users] gpsd, pps and chrony

[ Thread Index | Date Index | More Archives ]

On Wed, 16 Mar 2011, Damien R wrote:

On 15 March 2011 18:26, Bill Unruh <unruh@xxxxxxxxxxxxxx> wrote:

Yes, if both are synchronized to gps, then both are synchronized. However
one looses the connection to the gps, then it has no way of getting the

Yes and when the gps connection is lost, I want to stay on local clock with

?? if gps is lost so is pps. If the receiver keeps putting out pps it is just
freerunning. It has no accuracy to it. The internal clock in the gps receiver
also drifts. You would be just as well to then also shut off PPS and let the
internal clock freerun.

Is it not possible to add some connection between the two machines?

 No, it is impossible.

 Why? Are they connected to the net in any fashion?

Each computer will be placed next to a road, there is no network available
and each road are too far to setup a wireless or wired connection.

? Then how will they loose gps ?

But if it worked for you with
refclock SHM 1 poll 4 offset 0.0 refid GPS1
it looks like that chrony supports pps with gpsd.

Yes. The biggest problem is that all that the PPS gives you is the
-- it delivers no information about this second that pulse is assocated
You can use the nmea output of the gps receiver to recover that, but it is
delayed. Unfortunately, there is apparently a bug with the GPS18x that that
nmea time delivery is sometimes over one second later than the pulse. This
means that the pulse gets associated with the wrong second. Ie, you have to
make sure that the system knows that the nmea is often really late.

Yes I use nmea and I do not use a GPS18x so I think it will be ok.

 Also, it's in the back of my mind, but some older versions of gpsd

 benefited from a patch by Miroslav to smooth PPS? If you are on some
distribution which only has antique gpsd versions then try getting up to
date?  Half remembered advice though...

I did not use a recent version but I will try with a new one.

I have not found this to be a problem. The pps pulse comes in with a
of at most about .00001 sec ( <<10us) with no big excursions.

In fact, there was a problem with gpsd 2.38 and pps. gpsd rejected the pps
of the Z-Max.

Is ZMax a brand of gps receiver?
I have no idea why or even how gpsd would reject the pps.

Moving to gpsd 2.95 solve this problem.

So with the following configuration file for chrony:
refclock SHM 0 poll 4 refid GPS
refclock SHM 1 poll 4 refid PPS

chrony cannot synchronize ("Selceted source GPS, Can't synchronize: no
majority"), but if I comment the 1st or the 2nd line chrony is able to
synchronize with the uncommented source.

The problem is that whatever gpsd is reporting as the seconds for the PPS, it
is not getting them from the nmea, and thus the time reported is out. The
problem with pps is that the computer HAS to be within 1 sec of the right time
for pps to be useful. Or gpsd has to use the nmea time to report the seconds
for pps.
Note that the nmea time should be structered as a higher stratum than the
PPS-- they should not both be stratum 0, even though both are refclocks. You
should make nmea stratum 1 say, and pps stratum 0, and make sure that pps does
not start until the clock on the computer is within .5 sec of the nmea time.

In the documentation of chrony, an example which uses the SHM driver and the
PPS driver is provided. Moreover the tutorial mentioned in my first message
shows the same configuration. So maybe, chrony treats PPS refclock and SHM
refclock differently ?
Anyway, I will recompile the kernel with pps support to test this
configuration, but ideally, I would like to setup a configuration with the
SHM driver only.

Damien R.

William G. Unruh   |  Canadian Institute for|     Tel: +1(604)822-3273
Physics&Astronomy  |     Advanced Research  |     Fax: +1(604)822-5324
UBC, Vancouver,BC  |   Program in Cosmology |     unruh@xxxxxxxxxxxxxx
Canada V6T 1Z1     |      and Gravity       |

To unsubscribe email chrony-users-request@xxxxxxxxxxxxxxxxxxxx with "unsubscribe" in the subject. For help email chrony-users-request@xxxxxxxxxxxxxxxxxxxx with "help" in the subject.
Trouble?  Email listmaster@xxxxxxxxxxxxxxxxxxxx.

Mail converted by MHonArc 2.6.19+