Product Development

On 6th April 2019, a number of customers reported that the Arrowvale OTMR date had reverted back to 21st August 1999.

Certain OTMRs use a GPS module to provide accurate time, date, and position information and in particular, updated the internal clock if the system detected more than one-second difference with the time and date. So the culprit was found almost immediately, the GPS module date had travelled back in time.

The satellite GPS transmissions do not include the date as we normally understand it. Instead, it sends a week number (WN) in the form of a 10-bit binary number, this limits the range of week numbers from 0 to 1023. GPS receivers can then calculate the date from a known reference point.

Most GPS receivers at the time of manufacture are programmed with an arbitrary reference point that allows them to calculate the date up to 1024 weeks from that point after which they revert or rollback and start again from the same reference point, just like the film ‘Groundhog Day’ except in this case it is 7168 days before repeating. This event is known as a Week Number Roll Over (WRNO).

WNRO in April 2019 caused chaos with GPS units giving the wrong date, Y2K all over again but 20 years later!

Therefore, a WNRO will occur roughly every 20 years unless the GPS device took appropriate action to stop this from happening.

The original Arrowvale GPS decoder module part number 8000410 was based on a Trimble device which exhibited this phenomenon with 0 representing 21st August 1999.

Even newer GPS devices are unable to operate indefinitely as they are still designed with a 1024 week life starting from the date they are programmed during manufacture, which is sufficient for most electronic products except for rail vehicles which normally are expected to have a 35-year life span.

Also, changes in the data format in the newer GPS devices mean that they are not compatible with their predecessors on a plug-and-play basis. Both Latitude & Longitude values have now increased precision changing from three decimal places to five decimal places. Together with the time field changed from one decimal place to two decimal places meaning that they now transmit a longer message.

This means simply replacing the GPS device in the GPS module will not work as the OTMR will not understand the new message.

To solve this problem a new GPS module had to be designed to receive the new message but send the old message by stripping out the additional data so that the OTMR would not need modification. It was important that it could cope with all future WNRO events.

The solution was to add a co-processor that could receive the new data message from the GPS device and repackage the data into the old format, but also deal with future WRNO events on 20th November 2038 and 6th July 2058, etc.

The co-processor approach is different in it used a reference point set at the origin of GPS time which is 6th January 1980, but for this to work, it must know something called the Epoch Number.

The Epoch Number or EN is simply the number of times there has been a WNRO event since the origin of GPS time.

Currently, at the time of writing this document, we are in the 2nd Epoch, as there have been two rollovers during the past 40 years since the start of GPS time.

During manufacture, the Grinsty Rail Module is programmed with the current EN. After that, the co-processor monitors the GPS device for a backward date shift. Once detected, this event causes the Module to increment the EN by one and store it in non-volatile random-access memory. This event will only happen once every 19.7 years.

The co-processor takes the date calculated by the GPS device, regenerates the week number as sent by the GPS satellite. It then applies the week number together with the Epoch number to generate an Extended Week Number (EWN) which is no longer limited to a maximum of 1024 in size.

From the EWN the co-processor can then re-calculate the correct date.

Example:

WN = 117 (received from the GPS satellite)
EN = 2 (2019 -2039)
EWN = EN * 1024 + WN
EWN = 2 * 1024 + 117
EWN = 2165

The calculated date is the week ending Saturday 10th July 2021

By storing the EWN in a 16-bit register in non-volatile FRAM it now has a range of 65536 weeks, this allows calculation of the correct date for 1220 years from the last rollover, well beyond the life of the vehicles!

Here ends the theory, the problem now was how to test the software for an event in 20 years’ time without help from NASA.

So, it was decided to write a program that simulated the output from the GPS device and feed this into the co-processor and monitor the results.

As the date changed at midnight on the 20th November 2038 the simulator rolled back 19.7 years but the co-processor must continue onto 21st November 2038. This was repeated for the 6th July 2058 and so on. In this way, it was confirmed that ‘Groundhog Day’ did not occur.

The final correct operation of the GPS module was confirmed by connecting to an OTMR and repeating the simulator testing.

The subsequent replacement module part number 9060048 was EMC tested, shock & vibration tested, and temperature tested to EN50155 but was also produced in accordance with the requirements of RIS-2700-RST as assessed by an external certification company.

We look forward to working on more projects like this to challenge our abilities. This was an interesting project where I was given the task to re-design an existing hardware product and write the firmware for a new co-processor.  The design was implemented in such a way that the output message formats are configurable at production level via configuration links to allow the module to be used for retrofitting but also new build requiring increased precision. The firmware was written in the native C programming language where I really enjoyed the programming the challenges I came across, especially when it came to detecting the GPS week number rollover and having to recalculate the correct current date using the extended epoch number. One interesting aspect was having to develop a PC application that could test for an event that would happen in 20 years’ time.

Tahir Hanif, Senior Electronics Design Engineer

Our engineers are ready for a similar challenge from you, just contact us.

Interiors

We specialise in production and refurbishment of transport & leisure seating.

Electronics

We specialise in the design, manufacturer and service of electrical equipment in a number of sectors including for example the Railway Industry.

Let’s work together

If you are a current customer and have a query of a Technical nature, please contact us using the form here.