Home Tech Countdown to the GPS Timepocalypse – Hackaday

Countdown to the GPS Timepocalypse – Hackaday

22 min read
0
41

There’s a bug about to hit older GPS hardware that has echos of Y2K. Those old enough to have experienced the transition from the 1990s to the 2000s will no doubt recall the dreaded “Year 2000 Bug” that was supposed to spell the doom of civilization. Thanks to short-sighted software engineering that only recorded two digits for year, we were told that date calculations would fail en masse in software that ran everything from the power grid to digital watches. Massive remediation efforts were undertaken, companies rehired programmers whose outdated skills were suddenly back in demand, and in the end, pretty much nothing actually happened.

Yet another epoch is upon us, far less well-known but potentially deeper and more insidious. On Saturday April 6, 2019 — that’s tomorrow — GPS receivers may suffer from software issues due to rollover of their time counters. This could result in anything from minor inconvenience to major confusion, with an outside chance of chaos. Some alarmists are even stating that they won’t fly this weekend, for fear of the consequences.

So what are the real potential consequences, and what’s the problem with GPS in the first place? Unsurprisingly, it all boils down to basic math.

Epoch Story

GPS satellites are essentially super-accurate clocks in orbit, transmitting navigation messages at a screaming 50 bits per second. The navigation messages include a timestamp and information about the orbit of each satellite, which GPS receivers below can use to determine their location. Each full navigation message is 37.5 kilobits long, meaning that a full page of GPS data takes 12.5 minutes to transmit.

Image source: ESA Navipedia

The navigation message is broken down into frames of 1500 bits, each divided into five 300-bit subframes that take 6 seconds each to transmit. Each 300-bit subframe is further divided into ten 30-bit words. The first 30-bit word of each subframe is a telemetry word, encoding certain information about the health of the satellite. The telemetry word is followed by a 30-bit time of week (TOW) word, which encodes the week number and time within that week. GPS time reckoning is a bit weird due to some gymnastics needed to encode the number of seconds in a week (604,800) into the 17 bits available in the TOW word after taking out 13 bits for parity and other uses. The TOW word actually represents the number of 1.5 second periods in a week, which is further divided by four, since there are four 1.5 second periods in the six seconds it takes each subframe to be transmitted.

Despite appearances, the complexity of time encoding on the space side of the GPS system is not the cause of the looming problem, although it is related. The problem is with how the time data is interpreted by GPS receivers, and like the erstwhile Y2K bug, comes back to decisions made by software engineers. Of the 17 bits devoted to encoding the TOW word, the week counter uses 10 bits. That means the satellites can count up to 1024 weeks, or about 19 years and 8 months, before the counter rolls over to zero. Right now, the week counter is all ones: 1111111111. On Saturday April 6, the week counter will be incremented, rolling back to 0000000000. Therein lies the problem.

Been Here, Done This

Now, this is not the first time this has happened. The GPS system has been operating in various forms since the late 1970s, strictly for military use at first, then opened up for the civilian market in 1983, partially as a response to the shootdown of Korean Airlines flight 007 by Soviet air defenses which claimed that the airline was a spy plane. The beginning of the GPS epoch was set to January 6, 1980, with time reckoned from that point forward. That means the first rollover occurred on August 21, 1999 – 1024 weeks after the clocks were started.

GPS II/IIa satellite image from GPS.gov

The astute reader will note that the world did not come to an end the last time the GPS week counter rolled over, so surely this time will be a non-event as well. Probably, but there are a couple of complicating factors this time around. First, in 1999 there were very, very few GPS receivers in civilian hands. While Magellan introduced the first handheld GPS receiver, the Magellan NAV 1000, in 1989, and some mobile phones were equipped with receivers as early as 1999, any problems with the nascent system when the date flipped the first time were just not that big of a deal.

The year after the first rollover, the US Department of Defense made the decision to broadcast navigation messages with full positional accuracy enabled. For the first time, everyone would be able to get centimeter accuracy with the right equipment, and the GPS industry took off. By 2001, dashboard navigators by Garmin and Tom Tom became the killer app for GPS. Cell phones would morph into smartphones shortly thereafter, and would begin to incorporate GPS receivers and navigation software. In 2017 the worldwide market for GPS receivers was estimated at almost $38 billion, so there are a lot of GPS receivers out there, far more than there were back in 1999.

Back to the Future?

So what’s likely to happen to your GPS devices? Probably nothing. GPS manufacturers have known about this rollover for a while, and pretty much any receiver made in the last decade is already capable of dealing with the rollover. Older devices, like my ancient Garmin eTrex Legend that was once the source of a lot of family geocaching fun back in 2003 but has been sitting in a drawer for years, might have a meltdown on Saturday.

How the end of the second GPS epoch will manifest on specific devices is completely dependent on how the manufacturer coded the thing. Some will interpret the rollover as a 19.7 year leap in time, either backward or forward. Navigation itself should not be impacted, even if the time goes wonky, or just for a moment if it does. Non-navigational GPS receivers, like the GPS timebases used to synchronize cell phone services, might have more of an issue, but again, if the devices are of recent vintage or have been patched, there shouldn’t be an issue.

So, relax and go about your business, secure in the knowledge that when ten ones become ten zeroes sometime on Saturday, pretty much nothing will happen. If you’re so inclined, you might want to plug your car GPS in and see if there are any updates needed, but other than that, you’re probably all good. And if you really want to spend some time fretting over rollovers, think about this: it’s less than 19 years until we have to deal with the Year 2038 problem.

Let’s block ads! (Why?)


Source link

Load More Related Articles
Load More By sudo
Load More In Tech

Check Also

Digital music may not have saved the environment after all – Engadget

Chesnot/Getty Images Logic would suggest that music downloads and streaming are good for t…