RID

From Open Rail Data Wiki
Revision as of 09:14, 28 October 2023 by PeterHicks (talk | contribs) (Add NRE Data Feeds footer)
Jump to navigation Jump to search

RID stands for RTTI Identity, and RTTI stands for Real-Time Train Information, the original name of the system now called Darwin.

A RID is Darwin's globally unique numeric identifier for a train. It cannot be guaranteed to be in a specific format other than a set of numbers as described in the relevant XSD. As with the 10-character TRUST train identifier, developers are strongly advised not to rely on it being calculated via a specific method.

Algorithm

The RID comprises of the date the train is scheduled to depart its origin, e.g. 20230115.

The next digits were originally an incrementing sequence number based on an internal counter within Darwin, resetting each time a new timetable was loaded - for example 201411200059826. This was changed some time after 2014, possibly to speed up Darwin by not relying on a single counter to generate RIDs.

As of Octtober 2023, the non-date part of of the RID is calculated by taking the ASCII value of the letter contained in the schedule UID and appending the digits. For example, the RID for schedule P63461 starting on 2024-11-20 would be 201411208063461. The ASCII value of 'P' in decimal is 80, and the digits are 63461.