Schedule BS records - UID to Darwin RID

38 views
Skip to first unread message

Scott Pritchard

unread,
Sep 5, 2021, 5:39:43 PMSep 5
to A gathering place for the Open Rail Data community
Evening all,

I've recently been working on parsing the schedule file (sourced from https://opendata.nationalrail.co.uk/api/staticfeeds/3.0/timetable).

I believe I've figured out most of the data I need from it, but I'm curious to know if it's possible to convert the UID into a Darwin RID.

For example, the following BS record from the MCA file:

BSNL100322105162112050000001 POO2V585754111819020 EMU333 100      S S          P

References the UID "L10032".

I know that the RID begins with the date (e.g. 202010905), and looks something like this:

202109057610032

As can be seen, this consists of the date, then 2 digits, and then the numerical characters of the UID (10032). However, is there any way of identifying where the digits 76 come from or what they relate to? Is it even possible to calculate an RID from the values in the schedule files and the date?

Looking around at the wiki as well as the data files, I can't seem to find what it relates to, or if it's just an ID that's not present in the schedule files. I'm aware that it's possible to look up services by their UID, but I'm hoping someone can shed some light on the logic behind what these 2 mystery digits mean.

Thanks,
Scott

Evelyn Snow

unread,
Sep 5, 2021, 6:12:56 PMSep 5
to openrail...@googlegroups.com
Hello,

The 76 in this example represents the UID prefix "L" in ANSI-based text
encoding, which is at the 76th position. This behaviour is consistent across
all RIDs at present.

Evelyn

2021-09-05T14:39:43-0700 Scott Pritchard <spritch...@gmail.com>:
> --
> You received this message because you are subscribed to the Google Groups
> "A gathering place for the Open Rail Data community" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to openraildata-t...@googlegroups.com.
> To view this discussion on the web, visit
> https://groups.google.com/d/msgid/openraildata-talk/851398b3-0d3b-4bc4-9c67-a09bb63d697cn%40googlegroups.com.

Reply all
Reply to author
Forward
0 new messages