gpsd-users
[Top][All Lists]
Advanced

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

Re: Leap seconds


From: Gary E. Miller
Subject: Re: Leap seconds
Date: Wed, 22 May 2024 12:19:44 -0700

Yo Roger!

On Wed, 22 May 2024 06:22:48 +0000
Roger Oberholtzer <Roger.Oberholtzer@ramboll.se> wrote:

> If I am reading NMEA data from a receiver, and I want to set my clock
> to UTC time, should I:

Note that time from NMEA can be off by up to 1 second.  So not good
if you want better accuracy than a wall clock.

>   1.
> Obtain time from a record or records. Perhaps ZDA/GGA.

Depends.  But if are reading NMEA, NMEA is almost always UTC, except as
previously noted on startup of the receiver.

>   2.
> Determine the current UTC offset from some other record.

I am unaware of any standard NMEA setence that provides the current
leap seconds (UTC Offset).  Or tells you if it even has the current
leap second.

Some proprietary NMEA does, like the Jackson Labs $PJLTS:.  The Garmin
$PGRMF does too:

https://gpsd.gitlab.io/gpsd/NMEA.html

>   3.
> Adjust the time obtained in step 1, and set the clock to this
> adjusted time.

Certainly not.  NMEA is almost always UTC, and CPU clocks are almost
alway UTC.

> Is this what gpsd/chrony do?

No.

> So the clock will be UTC time and not
> the time as reported in, say, ZDA/GGA records?

No.  ZDA/GGA, etc. is always UTC, unless it is not, in which case
there no NMEA way to tell.

> Or do they just set the time as obtained in step 1?

In the NMEA only case, yes.  If your GNSS receiver does binary protocols
the the algorithm is different.  It it really, really matters, then get
a receiver with a sane binary message option.

> If they are doing
> that, is the time then really UTC time?

Most likely.  Depending on battery backup, etc, then the first 30
minutes (12.5 min) will be iffy, and no way to know in the NMEA only
case.

This is why NTP asks you to use many time sources, so they can vote
on the current time.

> Classification: Confidential

SeriouslY?  Please stop that.

RGDS
GARY
---------------------------------------------------------------------------
Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703
        gem@rellim.com  Tel:+1 541 382 8588

            Veritas liberabit vos. -- Quid est veritas?
    "If you can't measure it, you can't improve it." - Lord Kelvin

Attachment: pgpaYO7IoK8cT.pgp
Description: OpenPGP digital signature


reply via email to

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