Matching train_uid between SCHEDULE and Train Movement data

49 views
Skip to first unread message

Александр Цыплаков

unread,
Jan 22, 2026, 5:31:59 AM (8 days ago) Jan 22
to A gathering place for the Open Rail Data community
Good day all,

I wanted to ask a question on whether I am matching Schedule and Train movement data on the train_uid correctly - or there are some things I am missing (because I am getting unexpected results) 

Context:
I am trying to collect some historic information on train movements, and to do that I've been collecting Train Movement data from TRUST. 
I wanted to enrich train movement data with some train parameters by joining it with information from the Schedule. 

To do that I've used Train Activation messages to assign train_uid to all Train_Movement messages with the same train_id code. I then tried joining the result on the Schedule on the train_uid (being mindful of specific dates)
The Schedule itself is full_all_toc schedule for 1st of January 2026 schedule, that has been "progressed" by applying schedule updates from 1st to 7th of January to it.

What I got is that about 15% of messages failed to join: Train Movement messages have train_uid codes, that I can't find in the Schedule. I have done this for the first week of 2026 - and there are about 8000 train_uid codes that I see in Train Activation messages that I can't find in Schedule. 

About 1000 of these codes are numeric 5 digit codes, that start with a "4" (so 41632, 41655, etc) . Since all train_uid's in Schedule that I see are Letter+5 digits - that already looks like an edge case that I didn't account for properly
But remaining unmatched codes are regular 6 symbol codes - and I still can't seem to find them in the schedule. 

Sorry for the long message. My question is: is there some additional step that I am missing when I am trying to connect train parameters from schedule to the specific train movement via train_uid. Or should all unique train_uid's listed in Train Activation messages of TRUST definetly be in Schedule + Schedule updates, the problem is somewhere in my code

Regards,
Alex


Peter Hicks

unread,
Jan 22, 2026, 5:35:56 AM (8 days ago) Jan 22
to openrail...@googlegroups.com
Hi Alex

On Thursday, 22 January 2026 at 10:32, Александр Цыплаков <deli...@gmail.com> wrote:

What I got is that about 15% of messages failed to join: Train Movement messages have train_uid codes, that I can't find in the Schedule. I have done this for the first week of 2026 - and there are about 8000 train_uid codes that I see in Train Activation messages that I can't find in Schedule.

About 1000 of these codes are numeric 5 digit codes, that start with a "4" (so 41632, 41655, etc) . Since all train_uid's in Schedule that I see are Letter+5 digits - that already looks like an edge case that I didn't account for properly
But remaining unmatched codes are regular 6 symbol codes - and I still can't seem to find them in the schedule.

Those five-digit codes are new VSTP schedules - they start with a space.  You will need to process the VSTP feed in order to know the schedules to which they apply.

You can also have VSTP schedules which are not 'new' VSTP schedules, but overlays to an existing schedule - these will have a letter at the start, and the activation message will show the source as 'V' for VSTP.  This indicates that you should use the VSTP schedule rather than the CIF schedule.  If you ignore the source flag and activate the CIF schedule when the VSTP is the one valid on TRUST, you'll have an inconsistency with locations and times in the schedule.


Peter


Andrew Whittam

unread,
Jan 22, 2026, 6:03:25 AM (8 days ago) Jan 22
to A gathering place for the Open Rail Data community
Hi Alex, if and when you manage to implement Peters solution, can you post the detail here please?
I'm not familiar enough with that part of the data yet but having a solution I can use when I get to it, would be immensely useful.
Thanks
Andrew

Александр Цыплаков

unread,
Jan 22, 2026, 6:15:54 AM (8 days ago) Jan 22
to A gathering place for the Open Rail Data community
Thank you for promt reply! 

So, I guess I am missing a whole additional layer of schedulling data (Very Short-Term Planning) - and something that has to be captured in real time together with the messages. 
Well, next steps for me is then to setup collection of VSTP messages and parsing those. 

Again, many thanks 

Alex
четверг, 22 января 2026 г. в 10:35:56 UTC, Peter Hicks:

Александр Цыплаков

unread,
Jan 22, 2026, 6:45:37 AM (8 days ago) Jan 22
to A gathering place for the Open Rail Data community
Collegues, following up on on this: 

Would someone by chance have an archive of raw VSTP messages between 31st of December 2025 and today?
An archive they would be willing to share?

I've setup the listener for the new VSTP messages and will incorporate that data in my analysis going forward - but this leaves me with a 22-day gap in data that I have.

Best regards,
Alex 



четверг, 22 января 2026 г. в 11:15:54 UTC, Александр Цыплаков:
Reply all
Reply to author
Forward
0 new messages