Re: [chrony-users] PPS and NMEA same source not combined

[ Thread Index | Date Index | More chrony.tuxfamily.org/chrony-users Archives ]


Bill thanks for explanation of the 300ns, all very clear and no I don’t need it, it’s an interesting exercise however. :)

My pps and NMEA both come from a gps hat (u-blox M8Q). 

When I found the mega drift I did restart chrony which in effect did nothing to the drift.  So on the surface it seems to me that NMEA is looking at the second and pps looking at sub second, which did surprise me a little as I would have expected the NMEA to cover the broadest time and date first before narrowing down on the second, hence my original question.  
In order to get it all back in sync I had to set the date and then restart chronyd, which shortly after resulted in a corrected time.  At no point did chronyc sources show me any errors, all very odd.

Thanks for you time and explanations Bill you have help me understand this a lot more that I did a few days ago.  

Mike
 

Kind regards, Michael A Smith.


📩 mike@xxxxxxxxxxxxxxxxxxxxx
My apologies for any incorrect information or typographical errors. Any opinions expressed are my own, and are not intended to offend. Anyone offended by anything stated, will likely have offended me, by being inconsiderate of my beliefs.
 

On 19 Mar 2023, at 17:26, Bill Unruh <unruh@xxxxxxxxxxxxxx> wrote:

Whetehr it is actually accurate to 300ns is open to debate. It has no way of
knowing what the time lag is between the GPS receiver receiving the second
mark, and the computer actually registring it. Length of the cable from the
receiver to the computer, time of the computer actually registring the arrival
of the leading edge of the pulse. Time required to actually read the system
clock. Those are all places of systematic delays. All chrony can do is to
measure the random delays and errors, and average them out. That gives the
300ns. Without another more accurate timing source you cannot test the
actually accuracy. But I suspect you do not care for that kind of accuracy
anyway.

Secondly, are you sure that your nmea actaully works and is delivering the
time to the computer?If you stop and restart chrony is the time delivered
approximately right? If you look in the chrony logs, do you see the nmea time
being delivered to the machine even if it is not selected?

So what does it say
chronyd
sources

How are you getting the nmea timing?


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 ______|_    theory.physics.ubc.ca/

On Sun, 19 Mar 2023, Mike Smith wrote:

[CAUTION: Non-UBC Email] Well in theory no one has access apart from me, but yesterday after I was messing about with it, trying to
get it all working.  Then I looked in more detail PPS working within 300ns wow! but then I looked at the time and date and it was in
July 2022.  So it was accurate to the second but way out in time and date, rather surprised me.  Was all very odd.
 
[t_7edvEm.jpg?v=45]
Kind regards, Michael A Smith.
📲 07973 221971
🏠 24, Fifth Avenue, Portsmouth PO6 3PE UK
📩 mike@xxxxxxxxxxxxxxxxxxxxx
My apologies for any incorrect information or typographical errors. Any opinions expressed are my own, and are not intended to
offend. Anyone offended by anything stated, will likely have offended me, by being inconsiderate of my beliefs.
 

     On 19 Mar 2023, at 16:22, Bill Unruh <unruh@xxxxxxxxxxxxxx> wrote:

     On Sun, 19 Mar 2023, Mike Smith wrote:

           [CAUTION: Non-UBC Email] Ok Bill thanks very much for the comprehensive reply, so in effect I am using

           both effectively by locking my pps against an NMEA, and once it has that pps takes over and NMEA

           ceases to be needed.  So in effect what I am seeing is the correct behaviour and I shouldn’t expect

           anything different.  That’s all great to know, thank you. What mitigation can I add for say someone

     Someone? who else has root on your machine? If it is on the net you can also
     have other network servers as backups. And nmea is still working I suppose.
     And if "someone" can change the date, they can also change your chrony.conf
     and remove the PPS, and do alll sorts of damage.

           changing the date of the machine, as my current method keeps seconds accurately but doesn’t seem to

           test beyond that, so into mins hours and days?  Hope you understand my question.

           Many thanks, Mike.

            

           [t_7edvEm.jpg?v=45]

           Kind regards, Michael A Smith.

           📲 07973 221971

           🏠 24, Fifth Avenue, Portsmouth PO6 3PE UK

           📩 mike@xxxxxxxxxxxxxxxxxxxxx

           My apologies for any incorrect information or typographical errors. Any opinions expressed are my own,

           and are not intended to offend. Anyone offended by anything stated, will likely have offended me, by

           being inconsiderate of my beliefs.

            

                On 19 Mar 2023, at 00:41, Bill Unruh <unruh@xxxxxxxxxxxxxx> wrote:

                NMEA is in general a terrible clock, unless what you want to know is "What second is the

                time at". Delivering an NMEA string takes about 1/10 of a second. 9600Bd, with 10 bits per

                character, and about 100 characters per string.

                Compare that to PPS which delivers the "top of the second" to about 1

                microsecond, 100000 times better. Ie, nmea and pps are completely

                incomparable. The NMEA is of course critical in telling which second it was

                that tht PPPS pulse was telling you to the microsecond when it occured. YOu

                can tell PPS to use NMEA to find out what second it is (it could also use

                almost any other source on the net as well, but once it has done so, it no

                longer needs it unless something disasterous happens so that chrony no longer

                know what second the signal came in on (eg the computer shut down for an hour

                or more).

                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 ______|_    theory.physics.ubc.ca/

                On Sat, 18 Mar 2023, Mike Smith wrote:

                      [CAUTION: Non-UBC Email] Hi, I have a GPS hat working fine with a steady nice

                      long stream of sats.

                      My chrony conf file has the following refclocks 

                      refclock PPS /dev/pps0 lock nmea refid PPS

                      refclock SHM 0 refid NMEA

                      Chrony eventually chooses my PPS as the current best clock as I would have

                      expected.  Unfortunately the NMEA clock always comes up

                      with the ? Maybe in error when queried from chronyc sources

                      I can’t see why NMEA should be in error when it’s essentially the same source.

                       Is there something I can do to keep pps as current

                      best clock and NMEA to be combined?

                      Sorry if it’s a stupid question

                      Thanks, Mike.

                       

                      Kind regards, Michael A Smith.

                      📩 mike@xxxxxxxxxxxxxxxxxxxxx

                      My apologies for any incorrect information or typographical errors. Any

                      opinions expressed are my own, and are not intended to

                      offend. Anyone offended by anything stated, will likely have offended me, by

                      being inconsiderate of my beliefs.

                       


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/