[Top][All Lists]

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

Re: [gpsd-dev] attitude_t.mtime (Gary E. Miller)

From: Gary E. Miller
Subject: Re: [gpsd-dev] attitude_t.mtime (Gary E. Miller)
Date: Fri, 28 Sep 2018 11:20:48 -0700

Yo Peter!

On Fri, 28 Sep 2018 12:24:38 +0000 (GMT)
Peter Liu <address@hidden> wrote:

> You are right about precision and not playing well with PPS. Doubles
> only have 15 significant decimal digits. There are currently 10
> digits in the integer seconds. Therefore doubles are not capable to
> present microseconds or below.

Yup.  And gets worse in 2038.

> Is this global change necessary for
> fix time and attitude measurement time?

Yes, probably next gpsd cycle.

> Their timestamps are
> transmitted in the popular ISO8601 to the clients. The clients will
> only see ms resolution anyway.

Depends on your definition of 'popular'.  u-blox is pretty popular.
A u-blox for RasPi can be as cheap as $10.  And the u-blox has many
messages to nanosecond precision that gpsd uses now.  And gpsd has
to throw away a lot of that precision currently.

> I guess that is adequate.

For some, others have been complaining.  The next generation, u-blox 9,
significantly improves on GPS accuracy.  We need to support it.

> I am all for consistency.

And luckily the gpsd JSON time is in strings, so the extra precision
is upwardly compatible.

Clients will need to convert timetamp to timespec, but if they do
not need the extra precision that is easy:
        timestamp = (double)(timespec.tv_sec + timespec.tv_nsec * 1e-9)

> I love to hear more about the rationale and benefits
> that I have missed. Thanks in advance.

Pretty basic stuff:

    More consistent.

    More accurate.

    No more floating point flakeyness.

Gary E. Miller Rellim 109 NW Wilmington Ave., Suite E, Bend, OR 97703
        address@hidden  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: pgp2h5i6vTAUS.pgp
Description: OpenPGP digital signature

reply via email to

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