TD

From Open Rail Data Wiki
Revision as of 11:54, 8 October 2012 by PeterHicks (talk | contribs) (Restructured page, made more factual)
Jump to navigation Jump to search

Overview

What on earth is this?

The TD feed provides low-level detail about the position of trains and their train reporting number through a network of berths. Usually, but not always, a berth is associated with a signal - but there are locations (such as terminal platforms at stations) where there may be more than one berth.

From each berth, there are zero or more other berths which a train description may move, or 'step' in to. Some of these may be one-way, some may be two-way.

Message types

The Train Describer feed has four message types:

  • CA - Berth Step, where a description moves 'from' a berth, 'to' another berth
  • CB - Berth Cancel, where a description is removed from a berth
  • CC - Berth Interpose, where a description is interposed (placed in to) a berth
  • CT - Heartbeat

With the exception of the CT message type, TD messages include a four-character train description. At present, only class 1, 2 and 9 trains are included in the feed.

Format

Messages are sent in JSON format, as follows:

  • {"CA_MSG"=>{"time"=>"1349696911000", "area_id"=>"SK", "msg_type"=>"CA", "from"=>"3647", "to"=>"3649", "descr"=>"1F42"}}
  • {"CB_MSG"=>{"time"=>"1349696911000", "area_id"=>"G1", "msg_type"=>"CB", "from"=>"G669", "descr"=>"2J01"}}
  • {"CC_MSG"=>{"time"=>"1349696911000", "area_id"=>"G1", "msg_type"=>"CC", "descr"=>"2J01", "to"=>"G669"}}
  • {"CT_MSG"=>{"time"=>"1349696911000", "area_id"=>"SA", "msg_type"=>"CT", "report_time"=>"1249"}}