diff options
author | Eric S. Raymond <esr@thyrsus.com> | 2010-12-16 10:14:35 -0500 |
---|---|---|
committer | Eric S. Raymond <esr@thyrsus.com> | 2010-12-16 10:14:35 -0500 |
commit | 32dbc53021fc5ec163afbf2c22f065c9509c54ac (patch) | |
tree | 65e67441241aba20a674da404ba8886e4d2a96b8 /www/hacking.html | |
parent | 09c935aed956fd01d643fe108dee9bf828912454 (diff) | |
download | gpsd-32dbc53021fc5ec163afbf2c22f065c9509c54ac.tar.gz |
Add info to the Hacking Guyide on the GPS Week rollover problem.
Also, downgrade gpsd's "this is the far future" message from error to
warning so it will play nice with test logs exhibiting the rollover.
Diffstat (limited to 'www/hacking.html')
-rw-r--r-- | www/hacking.html | 19 |
1 files changed, 16 insertions, 3 deletions
diff --git a/www/hacking.html b/www/hacking.html index eb363e99..67fc7324 100644 --- a/www/hacking.html +++ b/www/hacking.html @@ -885,9 +885,13 @@ and bite on various future dates. </p> <p>The three specific problems are:</p> <ol> -<li><p>GPS has a Y2K-style bug, the week counter rollover, which happens -every 1024 weeks (roughly 20 years). At time of writing the last 0 week -was in 1999 and the next wil be in 2019.</p> + +<li><p>The GPS radio format has a Y2K-style bug, the week counter +rollover, which happens either every 1024 weeks (roughly 20 years) or +every 8192 weeks (roughly 157 years), depending on whether your +receiver can decode a 10-bit or 13-bit GPS week field. At time of +writing the last 0 week was in 1999, the next 10-bit wraparound will +be in 2019, and the next 13-bit wraparound will be in 2157.</p> <li><p>NMEA delivers only two-digit years.</p></li> @@ -907,6 +911,15 @@ after a rollover. This can have side effects:</p> have a recent ephemeris.</p></li> </ol> +<p>The public documentation is unclear, but it appears from a +reference in the Transmission Week Number section of IS-GPS-200 +PIRN-002 that whether you can get 10 or 13 bits is a function of the +satellite firmware revision, with 13 bits in the Block IIF and later +birds (the first of these was launched in May 2010). Of course your +receiver firmware also has to know that the extra three bits are +present; at time of writing in late 2010 this capability is at best +rare and possibly nonexistent.</p> + <p>See the timebase.h file for various constants that will need to be tweaked occasionally to cope with these problems.</p> |