Difference between revisions of "Train Movements"

From Open Rail Data Wiki
Jump to navigation Jump to search
m (→‎Message Topics: Remove erroneous passenger TOC topic)
m
Line 2: Line 2:
  
 
There's a fuller [[TRUST Message Process|description of the process]] available.
 
There's a fuller [[TRUST Message Process|description of the process]] available.
 +
 +
'''NOTE''' - The Train Movements feed does not provide messages for all stations. You should use the [[TD]] feed for full coverage.
  
 
= Message Topics =
 
= Message Topics =

Revision as of 14:14, 27 March 2015

The Train Movements feed contains data from Network Rail's TRUST system. This reports on the progress of trains along their journey.

There's a fuller description of the process available.

NOTE - The Train Movements feed does not provide messages for all stations. You should use the TD feed for full coverage.

Message Topics

Train movement messages are available through ActiveMQ TOC-specific topics, as well as an 'all TOCs' topic.

Topic name Description
TRAIN_MVT_XX_TOC Train movement messages for XX TOC.

XX is the Network Rail business code from the TOC Codes page. For example, CrossCountry has business code 'EH', and its topic is TRAIN_MVT_EH_TOC.

TRAIN_MVT_ALL_TOC All train operating companies
TRAIN_MVT_FREIGHT All non-passenger train operating company movements
TRAIN_MVT_GENERAL Change of Identity messages for freight trains

Message types

The feed contains eight message types, all in JSON format:

Delay Attribution-related messages are not available.

NOTE - A Train Activation message will always be the first message to be received for a train, after which any of the other message types may be received.

Format

Each message is represented as a JSON hash with two keys - 'header' and 'body'. Zero or more of these messages is sent out in a JSON list, either every five seconds or when there are 32 messages to be sent. It is perfectly legitimate to receive an empty array.

All timestamp values are in milliseconds since the UNIX epoch.


Network Rail Open Data Feeds
Data Feeds About the Feeds Account States Durable Subscriptions Example Code ( PHP / C# / Java / Ruby / Node.js) • Advanced UsesFAQ Release Notes
RTPPM RTPPM Feed
Train Movements Train Movements Feed Train Activation Train Cancellation Train Movement Train Reinstatement Change of Origin Change of Identity Change of Location TSPEED Field Planned Cancellations Cancellation Codes
TD TD Feed C-Class Messages S-Class Messages Train Describers TD Berths
VSTP VSTP Feed
TSR TSR Feed Route Codes
SCHEDULE SCHEDULE Feed Schedule and Location Records Association Records CIF Codes How Scheduling Works Allowances
Reference Data Reference Data Feed TOC Codes CIF Codes Delay Attribution Codes Identifying Locations (STANOX, TIPLOC, NLC and 3-Alpha Codes) STANOX Geographical Areas Train Planning data