|
From: | Sanjeev Gupta |
Subject: | Re: [gpsd-dev] GPSD's assumptions about time |
Date: | Tue, 26 Nov 2013 19:48:45 +0800 |
The following is the header comment of timebase.c. Please criticize,
amplify and correct. In particular, I need to know (and document) how
often the leap second is actually transmitted.
All of gpsd's assumptions about time and GPS time reporting live in this file.
This is a work in progress. Currently GPSD requires that the host system
clock be accurate to within one second. It would be nice to relax this
to "accurate within one GPS rollover period" for receivers reporting
GPS week+TOW, but isn't possible in general.
Date and time in GPS is represented as number of weeks
from the start
of zero second of 6 January 1980, plus number of seconds into the
week. GPS time is not leap-second corrected, though satellites also
broadcast a current leap-second correction which is updated on
according to rotational bulletins issued by the
International Earth Rotation and Reference Systems Service (IERS).
2) Many NMEA devices - in fact, all that don't report ZDA - never tell
us what century they think it is. Those that do report century are
still subject to rollover problems. We need an external time reference
for this, too.
3) Supposing we're looking at a binary protocol that returns week/tow,
we can't know which rollover period we're in without an external time
source.
.
Conclusion: if the system clock isn't accurate enough that we can deduce
what rollover period we're in, we're utterly hosed. Furthermore, if it's
not accurate to within a second and only NMEA devices are reporting,
we don't even know what century it is!
[Prev in Thread] | Current Thread | [Next in Thread] |