Close

The 1024 week GPS bug

A project log for Late 90s GPS time unit repair & 1024-week bug fix

Repairing and fixing the firmware of a late 90s GPS time receiver

pastcomputepastcompute 01/02/2022 at 01:191 Comment

To recap: the week after I fixed the power supply, was when I fired the GPstar 365 back up.  This happened to be 19th November 2021, the purpose of stating that idle fact will become apparent shortly.

After hanging the antenna out and waiting a half or or so for the system to stabilise, I discovered to my disappointment that it was not properly tracking the time - at all - and on further investigation, the time was correct and the date was wrong.  After some brief online searching, I realised the system appeared to be subject to the GPS 1024-week bug. You can read some more about it here: https://en.wikipedia.org/wiki/GPS_week_number_rollover

The 1024-week bug is caused by the use of a 1024 bit counter to represent weeks of operation, which rolls over, you guessed it, every 1024 weeks. This corresponds to exactly 19.69 years, or 19 years and 36 weeks if we ignore leap years. This counter is integral to the wider GPS system and not specific to any particular device model.

The time shown on my GPstar was 8th April, 2002, 08:57AM.

The current local time was 22 November 2021, 19:27

So, 10.5 hours from UTC (here in South Australia) and 19 years, 8 months, 14 days out - or close enough to 19.69 years incorrect!

Discussions

Ken Yap wrote 01/02/2022 at 06:06 point

Ah well compensate for that and you're good for another 19 years or so then. 😃👍

  Are you sure? yes | no