O/T Using GPS to obtain UTC...

hippy

Technical Support
Staff member
https://ics-cert.us-cert.gov/sites/default/files/documents/Memorandum_on_GPS_2019.pdf
A GPS device that provides UTC time does so by converting GPS Time to UTC using multiple parameters - including WN - conveyed in page 18 of GPS sub-frame 4. GPS devices with a poorly implemented GPS Time-to-UTC conversion algorithm may provide incorrect UTC following a WN rollover.
Updated: From a number of sources it appears "GPS Time counts in weeks and seconds of a week from this epoch". So it seems it is more critical than I imagined originally. A misinterpretation of what a GPS puts out rather than what it received ...
I'm struggling to think how week number would enter into any calculation for converting GPS time to UTC.

I thought week number was provided by GPS in much the same way that day of week is provided by a DS1307 RTC chip and similar, not because it's necessary, but simply to save those who want to know what it is from calculating it. I might be wrong.

I can't see anyone who doesn't actually need or use the week number provided by GPS to be affected by its roll-over to zero.

Given the last Week 0 started on Sunday, 22nd August 1999, I imagine the raw value isn't particularly much use for those who would use week number and year.
 
Last edited:

AllyCat

Senior Member
Hi,
in a nutshell, GPS Year is maintained as 10bit value, that rolls-over on 6th April 2019.
Not really, the (raw) GPS system counts in weeks (as hippy noted) so the 10-bit counter overflows about every 20 years. As the GPS system dates back to about 1980, the overlfow has happened once already, at about the same time as the Y2K "millenium bug", and was about as disasterous as that (wasn't). ;)

There are other "complications" associated with the raw (transmitted) GPS data (for example "GPS time" has now "slipped" by tens of seconds relative to UT/GMT) but these issues are generally handled by the "GPS Engine" anyway.

Cheers, Alan.
 

PhilHornby

Senior Member
As the GPS system dates back to about 1980, the overlfow has happened once already, at about the same time as the Y2K "millenium bug", and was about as disasterous as that (wasn't). ;)
But the last time it happened, was before Bill Clinton removed the 'error' signal and effectively made it available to the general public. Presumably the military got their act together, but do today's $10 Chinese GPS boards handle things properly? I can't think of any way of testing them, prior to April 6th, to find out ....

As for Y2K, that wasn't a disaster, because of the team of highly skilled IT specialists who deployed hundreds of patches to millions of PCs...
(guess how I earned a living in 1999? :))
 

inglewoodpete

Senior Member
…., but do today's $10 Chinese GPS boards handle things properly? I can't think of any way of testing them, prior to April 6th, to find out ....
That was the first thought that went through my mind, too.
As for Y2K, that wasn't a disaster, because of the team of highly skilled IT specialists who deployed hundreds of patches to millions of PCs...
(guess how I earned a living in 1999? :))
Not just PCs. I remember 1999 well - I was working in internetworking at the time and remember the thousands of router firmware upgrades. I also had to return from leave for 9-Sept-1999 (the date 9-9-99 was used last century to fill a mandatory date field when you didn't know what the real date was!)
 
Last edited:

Pongo

Senior Member
Check out the Ublox (maker of the NEO and other GPS modules) forum. I don't see any sign of real panic there.
 

inglewoodpete

Senior Member
Hopefully all the 'big' boys had this in hand...like Microsoft.

We await @InglewoodPete's reply :unsure:
It's nice to be invited to comment! However, I had the opportunity to take a voluntary redundancy about three years ago and have left the rat-race of internetworking behind me (actually, it's raced ahead without me). I have found a niche career in public visual art which, thankfully, pays well and keeps me pretty busy.

My only projects that use GPS modules have ignored the year value from GPS data. Eg Little Ben And, I haven't dug out my spare (cheap) GPS receiver yet to test what date it provides in its output data.
 

marks

Senior Member
Weather News Australia
Y2K of GPS causes glitch grounding Bureau of Meteorology weather balloons
Ben Collins, Wednesday April 10, 2019

Before automated weather balloons with GPS tracking, they were hand-launched and tracked by radar. - ABC
A GPS clock rollover that experts predicted would have little impact because of years of advance notice has caused the grounding of the Bureau of Meteorology's (BOM) weather balloons.

BOM declined to be interviewed by the ABC, but provided a statement confirming it had ceased weather balloon observations due to a "technical fault with the equipment's communications systems".
The ABC understands the fault was caused by the rollover of the time stamp in GPS signals.
Similar to the Y2K, or millennium bug, where some computer calendars rolled back to the year 00, GPS clocks returned to zero early on Sunday morning.
BOM weather balloons carry a device called a radiosonde that includes GPS tracking.
RMIT University geospatial scientist that only older GPS technology was at risk of a problem as hardware manufacturers have had years to prepare.
But in its statement, BOM said its equipment supplier advised the Bureau of the fault after the rollover on April 7, and balloon launches ceased on April 8.
Vital information missing
BOM's website said normally 56 weather balloons were launched each day from 38 locations, and they provided "vital information" that helped meet "international obligations under the Convention of the World Meteorological Organization".

University of Queensland weather researcher Andrew Schwartz said he used weather balloon data in his research into forecasting severe storms.
He said weather balloons also provided important direct measurements of the atmosphere used to inform and correct weather models in Australia and around the world.
"We use them as forecasters, but we also use them in the weather models themselves," Mr Schwartz said.
"Having that data missing from an entire region like Australia is really kind of going to play havoc with some of those global weather models."

BOM's statement said "the issue did not impact the Bureau's capacity to issue accurate and timely forecasts and warnings".
De-staffing of regional offices by automating weather observations, including automated weather balloon launches,

But BOM's statement said automation was not a factor in this case.
The ABC also contacted aircraft manufacturer Boeing which confirmed that the GPS clock rollover caused "a limited number of 787 airplanes" to display the wrong date, causing them to be temporarily grounded in China.
BOM's statement said that following a "fix for the global software issue", balloon launches were resumed in several locations on the morning of April 9.
"All other balloon launching sites are expected to resume operations throughout the day," the statement said.
 

newplumber

Senior Member
Weather News Australia


But BOM's statement said automation was not a factor in this case.
The ABC also contacted aircraft manufacturer Boeing which confirmed that the GPS clock rollover caused "a limited number of 787 airplanes" to display the wrong date, causing them to be temporarily grounded in China.
BOM's statement said that following a "fix for the global software issue", balloon launches were resumed in several locations on the morning of April 9.
"All other balloon launching sites are expected to resume operations throughout the day," the statement said.
Good information I had no idea the gps rollover would impact so much....Now I get to add another excuse why it takes me so long to finish a plumbing job.....like "I'm sorry lady...just had a glitch with my GPS clock rollover" :)
thanks you all for sharing tho
 

inglewoodpete

Senior Member
I'm back writing software for a GPS module. The project is for an automatic outdoor lighting controller for a client, so I went upmarket and bought a Grove GPS module from seeed via RS Australia. At A$39.51 (22GBP or US$27US), I wouldn't call it a cheapie, though.

Anyway, the firmware seems to be dated October 2015 and the GPRMS data sentences look like this:
$GPRMC,091810.000,A,3155.3860,S,11553.3181,E,0.00,14.68,150819,,,A*4A
...which shows a date of 150819. Definitely the right epoch - it's even today's date:rolleyes:.

For my project, I only need the day and month values to determine the switch-on time for the lighting show (ie dusk), so the year doesn't matter anyway.
 

hippy

Technical Support
Staff member
For my project, I only need the day and month values to determine the switch-on time for the lighting show (ie dusk), so the year doesn't matter anyway
Would you not you need to check for leap years ?

I suppose being one day out isn't much of a problem most times and one hour out on entering and leaving DST would be a tolerable 'glitch'.
 

inglewoodpete

Senior Member
Would you not you need to check for leap years ?

I suppose being one day out isn't much of a problem most times and one hour out on entering and leaving DST would be a tolerable 'glitch'.
As I mentioned, this is for a lighting controller. Generally speaking, the lights need to switch on at dusk, which is a fairly vague period of time when light levels drop enough to warrant the artificial lights turning on. 'On' switching times will be calculated on a weekly basis using month and multiples of 7 days during each month via a lookup table. At my latitude (32 degrees South), the delta T is only a few minutes each week.

And, as I mentioned in an earlier post in this thread, DST is a concept that our government trials once every 12 or so years, which then gets consistently voted down in the following referendum. Regardless, dusk can be calculated using UTC, which pays no respect to local time laws! Of course, if the lights are to be turned off at a set time (Eg midnight), then that is a different matter.
 
Top