RID: Difference between revisions
PeterHicks (talk | contribs) Add a description of RIDs |
PeterHicks (talk | contribs) m Add NRE Data Feeds footer |
||
Line 10: | Line 10: | ||
As of Octtober 2023, the non-date part of of the RID is calculated by taking the [https://en.wikipedia.org/wiki/ASCII#Printable_characters 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. | As of Octtober 2023, the non-date part of of the RID is calculated by taking the [https://en.wikipedia.org/wiki/ASCII#Printable_characters 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. | ||
[[Category:National Rail Enquiries Data Feeds]] |
Revision as of 09:14, 28 October 2023
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.