RID: Difference between revisions
PeterHicks (talk | contribs) m Add NRE Data Feeds footer |
EvelynSnow (talk | contribs) A lot of rewording, reference to XSD, slightly more exact about train vs service, correct final example (P63461 on 2024-11-20 would be 202411208063461, not 201411208063461) |
||
(One intermediate revision by the same user not shown) | |||
Line 1: | Line 1: | ||
RID | A '''RID''' is Darwin's globally unique identifier for a service. RIDs are currently expressed as a string of 15 numeric characters (e.g. ''202301147621947''), but no guarantees are provided about the specific format of RIDs, except the 16 character maximum length described in the relevant XSDs<ref>https://lite.realtime.nationalrail.co.uk/OpenLDBSVWS/rtti_2007-10-10_ldb_common_types.xsd – ''RIDType''</ref>. As with the 10-character TRUST train identifier, developers are strongly advised not to rely on RIDs being calculated by any specific method. | ||
= Name = | |||
''RID'' stands for ''RTTI Identity'', with ''RTTI'' itself expanding to ''Real-Time Train Information'', the original name of the system now called Darwin. | |||
= Algorithm = | = Algorithm = | ||
Before 2015, a RID was formed from the date a service was scheduled to depart its origin (e.g. 20141120 for a SSD of 2014-11-20), prepended to a padded incrementing sequence number based on an internal counter within Darwin, resetting every time a new timetable was loaded (e.g. 201411200059826). At some time after 2014, the counter portion of the RID was replaced with a more predictable element, possibly to speed up Darwin by avoiding the reliance on a single counter to generate RIDs. | |||
As of October 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 202411208063461. The ASCII value of 'P' in decimal is 80, and the digits are 63461. | |||
=References= | |||
<references /> | |||
[[Category:National Rail Enquiries Data Feeds]] | [[Category:National Rail Enquiries Data Feeds]] |
Latest revision as of 19:16, 28 October 2023
A RID is Darwin's globally unique identifier for a service. RIDs are currently expressed as a string of 15 numeric characters (e.g. 202301147621947), but no guarantees are provided about the specific format of RIDs, except the 16 character maximum length described in the relevant XSDs[1]. As with the 10-character TRUST train identifier, developers are strongly advised not to rely on RIDs being calculated by any specific method.
Name
RID stands for RTTI Identity, with RTTI itself expanding to Real-Time Train Information, the original name of the system now called Darwin.
Algorithm
Before 2015, a RID was formed from the date a service was scheduled to depart its origin (e.g. 20141120 for a SSD of 2014-11-20), prepended to a padded incrementing sequence number based on an internal counter within Darwin, resetting every time a new timetable was loaded (e.g. 201411200059826). At some time after 2014, the counter portion of the RID was replaced with a more predictable element, possibly to speed up Darwin by avoiding the reliance on a single counter to generate RIDs.
As of October 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 202411208063461. The ASCII value of 'P' in decimal is 80, and the digits are 63461.