Difference between revisions of "Train Activation"

From Open Rail Data Wiki
Jump to navigation Jump to search
(Example packet)
Line 61: Line 61:
 
! Field !! Value !! Explanation
 
! Field !! Value !! Explanation
 
|-
 
|-
| train_id|| 865B77M125|| train header code. provides a unique identifier for this journey. Digits 3-6 indicate the route, which can be looked up in the timetable data (1N16 - In this case may have been Liverpool Street -Clacton-on-Sea )
+
| train_id|| 865B77M125|| train header code. provides a unique identifier for this journey. Digits 3-6 indicate the route, which can be looked up in the timetable data
 
|-
 
|-
 
| creation_timestamp|| 1341393780000|| The time the train was activated (Wed, 04 Jul 2012 10:23:00 +0100)
 
| creation_timestamp|| 1341393780000|| The time the train was activated (Wed, 04 Jul 2012 10:23:00 +0100)

Revision as of 22:27, 24 July 2012

Overview

The Train Activation message is used to link a 10-character unique train identity to a schedule. This unique identity is used in all other message types to refer to the train.

Unique identities are guaranteed unique only within a calendar month, as the final two digits are the day of the month in which the train ran.

Linking a schedule to a unique identity

Schedules are uniquely identified by UID, start date and STP indicator. The activation message has three fields - 'train_uid', 'schedule_start_date' and 'schedule_type'. To find the schedule that a train is running to, look these up in your timetable database.

Auto and Manual Call

Internally, the activation process is known as 'calling', and a train may be called in one of two ways:

  • The majority of schedules are set up as Auto Call. Activation messages will automatically be sent for them around an hour before the scheduled departure time.
  • Some schedules are set up as Manual Call where a train may operate more than one schedule - usually a freight train which has three timetables available with different destinations, but will only run to one specific one depending on demand on the day.

There is no difference in handling Auto and Manually called trains.

Example

 "header":
 {
   "msg_type":"0001",
   "source_dev_id":"",
   "user_id":"",
   "original_data_source":"TSIA",
   "msg_queue_timestamp":"1343168357000",
   "source_system_id":"TRUST"
 },
 "body":
 {
   "schedule_source":"C",
   "train_file_address":null,
   "schedule_end_date":"2012-12-07",
   "train_id":"865B77M125",
   "tp_origin_timestamp":"2012-07-25",
   "creation_timestamp":"1343171957000",
   "tp_origin_stanox":"",
   "origin_dep_timestamp":"1343179140000",
   "train_service_code":"24676004",
   "toc_id":"84",
   "d1266_record_number":"00000",
   "train_call_type":"AUTOMATIC",
   "train_uid":"W82187",
   "train_call_mode":"NORMAL",
   "schedule_type":"O",
   "sched_origin_stanox":"86520",
   "schedule_wtt_id":"5B77M",
   "schedule_start_date":"2011-12-13"
 }

Important Fields

The fields of main significance are:

Field Value Explanation
train_id 865B77M125 train header code. provides a unique identifier for this journey. Digits 3-6 indicate the route, which can be looked up in the timetable data
creation_timestamp 1341393780000 The time the train was activated (Wed, 04 Jul 2012 10:23:00 +0100)
sched_origin_stanox 86520 The location where the train came online. (Southampton Central in this case)