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

[ Thread Index | Date Index | More Archives ]

On 15 March 2011 18:26, Bill Unruh <unruh@xxxxxxxxxxxxxx> wrote:
Yes, if both are synchronized to gps, then both are synchronized. However if
one looses the connection to the gps, then it has no way of getting the time.

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

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.

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 sub-second
-- it delivers no information about this second that pulse is assocated with.
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 scatter
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.
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.
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.

Mail converted by MHonArc 2.6.19+