Saturday 6 April 2019

6 April 2019 - it's GPS rollover day!

Today is a special day! You could be the lucky recipient of a rollover!

No, not a lottery win, but something even more unusual: the 1,024-week GPS week-number rollover! Stay tuned to see if you are a winner!

Okay, time to be serious. Twenty years ago the news was full of the upcoming Millennium  Bug, where ancient (and sometimes recent) computer systems that used two digits to represent dates - e.g. '99' for 1999, would roll over and start using '00' for 2000 - which causes all sorts of problems when you perform operations on the data and 2000 is seen as being before 1999.

Fortunately many good engineers  worked for years to ensure that the effects of the Millennium Bug were not as bad as some forecast. Some say that this means the Bug was overwrought nonsense: in fact, problems were avoided because people did lots of work to prevent those problems.

The Millennium bug was an epoch event: dates and times in computer systems have to be represented by numbers, and those numbers are of finite size. The larger the number, and the larger the granularity each number represents, the greater the length of time the number can represent.

Another example is GPS,which has exploded in popularity over the last twenty years. Most cars now have GPS receivers, they are in all smartphones, and many of us even have receivers in our wristwatches. Many vital system require timing and positional information from GPS. Yet GPS receivers also have an epoch - in this case, the data sent from the satellites to the receiver uses 10 bits to represent the week, allowing 1024 distinct values. This means that every 1024 weeks, it resets. If for some reason it gets the 'wrong' week, the receiver may start giving incorrect data to the user.

Today, the 6th of April, the week number rolls over. It is not the first time it has happened (it last happened on August 21st 1999. There were far fewer receivers back then (in fact, is it about the time I got my first Magellan handheld GPS), and the problems were not as significant.

However today it may be different: manufacturers will have been aware of this issue, and will have  put some protections in place. However if your receiver is over a decade old, and has not had its firmware updated, then there might be problems.

The good news is that the GPS constellation is being updated, and the new signals have a 13-bit week, enough for 8,192 weeks - or 157 years. I doubt a rollover of those new signals will affect me much!

But if you have an older receiver, I hope you don't win the GPS rollover lottery!

No comments: