Train Termination

69 views
Skip to first unread message

Andrew Powell

unread,
Nov 11, 2015, 11:29:53 AM11/11/15
to A gathering place for the Open Rail Data community
Hi

Context: Using the JSON Train Movement feed data

How might I find if a train has terminated. e.g. finished its route. 

I presumed it would be to look at the movement planned_event_type from the movement data but I see that a few don't have this and are just set as ARRIVAL.

Thanks

Andrew

Andrew Powell

unread,
Nov 12, 2015, 4:02:06 AM11/12/15
to A gathering place for the Open Rail Data community
I forgot to mention that I would expect to check for the DESTINATION value in the planned_event_type ^

Tom Lane

unread,
Nov 12, 2015, 4:44:04 AM11/12/15
to A gathering place for the Open Rail Data community
According to the wiki there is a train_terminated property on movement messages (type '0003'). 

Andrew Powell

unread,
Nov 12, 2015, 7:11:08 AM11/12/15
to A gathering place for the Open Rail Data community
Hi Tom

Ok I have been looking at the data for train_id = 234R72CT30

As you can see, the last one at 17.46 had the planned event type as departure and the train terminated to false?

planned_timestamp actual_timestamp planned_event_type train_terminated
2015-10-30 16:35:00 2015-10-30 16:30:00 DEPARTURE          false
2015-10-30 16:37:00 2015-10-30 16:36:00 DEPARTURE          false
2015-10-30 16:48:00 2015-10-30 16:42:00 DEPARTURE          false
2015-10-30 17:07:00 2015-10-30 17:07:00 DEPARTURE          false
2015-10-30 17:26:00 2015-10-30 17:22:00 DEPARTURE          false
2015-10-30 17:31:00 2015-10-30 17:28:00 DEPARTURE          false
2015-10-30 17:38:00 2015-10-30 17:36:00 DEPARTURE          false
2015-10-30 17:44:00 2015-10-30 17:44:00 ARRIVAL                  false
2015-10-30 18:05:00 2015-10-30 17:45:00 DEPARTURE          false
2015-10-30 18:09:00 2015-10-30 17:46:00 ARRIVAL                  false
2015-10-30 18:09:00 2015-10-30 17:46:00 ARRIVAL                  false

I have notice that this train is cancelled now, But not sure if it was 15:35 or 16:35 as this due to the dodgy time formats in UK DST. 

id msg_type source_dev_id user_id original_data_source msg_queue_timestamp source_system_id train_id orig_loc_stanox orig_loc_timestamp toc_id dep_timestamp division_code loc_stanox canx_timestamp canx_reason_code canx_type train_service_code train_file_address
69 0002 V03C #PEE0129 SDR 2015-10-30 16:01:16 TRUST 234R72CT30 NULL NULL 54 2015-10-30 15:35:00 54 23451 2015-10-30 16:01:00 FL AT ORIGIN 51462180 GK4
114 0002 SV2W #PEE0088 SDR 2015-10-30 20:20:16 TRUST 234R72CT30 NULL NULL 54 2015-10-30 17:33:00 54 21415 2015-10-30 20:20:00 FL EN ROUTE 51462180 GK4
157 0002 VNHU #PEE0088 SDR 2015-10-31 01:49:35 TRUST 234R72CT30 NULL NULL 54 2015-10-30 17:33:00 54 21415 2015-10-31 01:49:00 FL EN ROUTE 51462180 GK4
158 0002 VNHU #PEE0088 SDR 2015-10-31 01:52:42 TRUST 234R72CT30 NULL NULL 54 2015-10-30 17:33:00 54 21415 2015-10-31 01:52:00 FL EN ROUTE 51462180 GK4

My question still stands, if a train is cancelled then does that mean it has terminated or just stays open?

What I am trying to do is get the percentage of trains that have terminated between two dates.

Many thanks

Andrew
Reply all
Reply to author
Forward
0 new messages