[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [gpsd-dev] attitude_t.mtime
From: |
Gary E. Miller |
Subject: |
Re: [gpsd-dev] attitude_t.mtime |
Date: |
Thu, 27 Sep 2018 14:51:48 -0700 |
Yo Peter!
On Thu, 27 Sep 2018 20:59:19 +0000 (GMT)
Peter Liu <address@hidden> wrote:
> You added attitude_t.mtime in gps.h as timespec. Unless there is some
> special reasons, could we use timestamp_t instead?
There has been a long term plan to move all timestamp_t to timespec.
timespec keeps time to the nanosecond.
timestamp_t is just a double.
As a comment in gps.h notes:
/* WARNING! potential loss of precision in timestamp_t
* a double is 53 significant bits.
* UNIX time to nanoSec precision is 62 significant bits
* UNIX time to nanoSec precision after 2038 is 63 bits
* timestamp_t is only microSec precision
* timestamp_t and PPS do not play well together
*/
So all new time will be timespe. All existing timestamps will become
timespec in gpsd 3.19.
No need to fear the conversion. It is a good thing.
RGDS
GARY
---------------------------------------------------------------------------
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
pgpGFsfTABm4L.pgp
Description: OpenPGP digital signature