VSTP: Difference between revisions

From Open Rail Data Wiki
mNo edit summary
→‎Note: CIF Speed: CIF speed field fixed
 
(7 intermediate revisions by 4 users not shown)
Line 1: Line 1:
== Overview ==
The VSTP (Very Short Term Planning) feed provides train schedules which are due to run in the next 48 hours that aren't included in the [[SCHEDULE]] feed.


The VSTP (Very Short Term Planning) feed provides schedule records via the VSTP process.
= Message Topics =


This channel is a real-time channel. Freight services are not included in these channels; only messages containing headcodes for classes 1, 2 and 9 are included in this feed.
VSTP messages are available through ActiveMQ.


Last minute schedule changes that can't be reflected in the [[SCHEDULE|Amazon S3 Bucket Schedule Feeds]] are sent here.
{| class="wikitable"
!Topic name
!Description
|-
|VSTP_ALL
|All train schedules which are due to run in the next 48 hours that aren't included in the SCHEDULE feed.
|}


== Data Format ==
= Structure =


More often than not this feed will return a lot of nothing.
Messages are sent in JSON format and are broadly similar to the messages in the SCHEDULE feed:


With a STOMP Client ID, you can check this feed less regularly that other feeds.
<pre>
{
"VSTPCIFMsgV1": {
"schemaLocation": "http://xml.networkrail.co.uk/ns/2008/Train itm_vstp_cif_messaging_v1.xsd",
"classification": "industry",
"timestamp": "1356697917000",
"owner": "Network Rail",
"originMsgId": "2012-12-28T12:31:57-00:00vstp.networkrail.co.uk",
"Sender": {
"organisation": "Network Rail",
"application": "TOPS",
"component": "VSTP"
},
"schedule": {
"schedule_id": "",
"transaction_type": "Create",
"schedule_start_date": "2012-12-29",
"schedule_end_date": "2012-12-29",
"schedule_days_runs": "0000010",
"applicable_timetable": "Y",
"CIF_bank_holiday_running": " ",
"CIF_train_uid": " 43876",
"train_status": "1",
"CIF_stp_indicator": "N",
"schedule_segment": [{
"signalling_id": "2C90",
"uic_code": "",
"atoc_code": "",
"CIF_train_category": "OO",
"CIF_headcode": "",
"CIF_course_indicator": "",
"CIF_train_service_code": "24672104",
"CIF_business_sector": "",
"CIF_power_type": "EMU",
"CIF_timing_load": "",
"CIF_speed": "",
"CIF_operating_characteristics": "",
"CIF_train_class": "",
"CIF_sleepers": "",
"CIF_reservations": "0",
"CIF_connection_indicator": "",
"CIF_catering_code": "",
"CIF_service_branding": "",
"CIF_traction_class": "",
"schedule_location": [{
"scheduled_arrival_time": " ",
"scheduled_departure_time": "125100",
"scheduled_pass_time": " ",
"public_arrival_time": " ",
"public_departure_time": "125100",
"CIF_platform": "1",
"CIF_line": "",
"CIF_path": " ",
"CIF_activity": "TB",
"CIF_engineering_allowance": "",
"CIF_pathing_allowance": "",
"CIF_performance_allowance": "",
"location": {
"tiploc": {
"tiploc_id": "WOKNGHM"
}
}
}, {
"scheduled_arrival_time": "125630",
"scheduled_departure_time": "125730",
"scheduled_pass_time": "      ",
"public_arrival_time": "      ",
"public_departure_time": "      ",
"CIF_platform": "1",
"CIF_line": "",
"CIF_path": "",
"CIF_activity": "",
"CIF_engineering_allowance": "",
"CIF_pathing_allowance": "",
"CIF_performance_allowance": "",
"location": {
"tiploc": {
"tiploc_id": "BRACKNL"
}
}
}, {
"scheduled_arrival_time": "135800",
"scheduled_departure_time": " ",
"scheduled_pass_time": " ",
"public_arrival_time": "135800",
"public_departure_time": " ",
"CIF_platform": "19",
"CIF_line": " ",
"CIF_path": "",
"CIF_activity": "TF",
"CIF_engineering_allowance": " ",
"CIF_pathing_allowance": " ",
"CIF_performance_allowance": " ",
"location": {
"tiploc": {
"tiploc_id": "WATRLOO"
}
}
}]
}]
}
}
}
</pre>


- All Timestamp columns are in Milliseconds
= Note: CIF Speed =


== Example ==
There is a VSTP process that has been known to populate the ''CIF_speed'' field incorrectly.  As of April 2024, this appears to have been fixed.


<tt>
For reference, the following speed values should be divided by 2.24 to get miles per hour:


    [VSTPCIFMsgV1] => stdClass Object
{| class="wikitable"
        (
!CIF_speed value
            [schemaLocation] => http://xml.networkrail.co.uk/ns/2008/Train%20itm_vstp_cif_messaging_v1.xsd
!Speed in mph
            [classification] => industry
|-
            [timestamp] => 1343339831000
|22
            [owner] => Network Rail
|10
            [originMsgId] => 2012-07-26T21:57:11-00:00vstp.networkrail.co.uk
|-
            [Sender] => stdClass Object
|34
                (
|15
                    [organisation] => Network Rail
|-
                    [application] => TOPS
|56
                    [component] => VSTP
|20
                )
|-
           
|67
            [schedule] => stdClass Object
|30
                (
|-
                    [schedule_id] =>
|78
                    [transaction_type] => Create
|35
                    [schedule_start_date] => 2012-07-26
|-
                    [schedule_end_date] => 2012-07-26
|89
                    [schedule_days_runs] => 0001000
|40
                    [applicable_timetable] => N
|-
                    [CIF_bank_holiday_running] => 
|101
                    [CIF_train_uid] =>  95629
|45
                    [train_status] => 1
|-
                    [CIF_stp_indicator] => N
|112
                    [schedule_segment] => Array
|50
                        (
|-
                        )
|123
                )
|55
        )
|-
</tt>
|134
|60
|-
|157
|70
|-
|168
|75
|-
|179
|80
|-
|195
|87
|-
|201
|90
|-
|213
|95
|-
|224
|100
|-
|246
|110
|-
|280
|125
|-
|314
|140
|-
|417
|186
|-
|}


- Note %20 added to the schemaLocation field for Train itm_vstp_cif_messaging_v1.xsd for wiki purposes, its a PHP JSON Decode
{{Navtable-DataFeeds}}
 
[[Category:VSTP Data]]

Latest revision as of 11:06, 7 October 2024

The VSTP (Very Short Term Planning) feed provides train schedules which are due to run in the next 48 hours that aren't included in the SCHEDULE feed.

Message Topics

VSTP messages are available through ActiveMQ.

Topic name Description
VSTP_ALL All train schedules which are due to run in the next 48 hours that aren't included in the SCHEDULE feed.

Structure

Messages are sent in JSON format and are broadly similar to the messages in the SCHEDULE feed:

{
	"VSTPCIFMsgV1": {
		"schemaLocation": "http://xml.networkrail.co.uk/ns/2008/Train itm_vstp_cif_messaging_v1.xsd",
		"classification": "industry",
		"timestamp": "1356697917000",
		"owner": "Network Rail",
		"originMsgId": "2012-12-28T12:31:57-00:00vstp.networkrail.co.uk",
		"Sender": {
			"organisation": "Network Rail",
			"application": "TOPS",
			"component": "VSTP"
		},
		"schedule": {
			"schedule_id": "",
			"transaction_type": "Create",
			"schedule_start_date": "2012-12-29",
			"schedule_end_date": "2012-12-29",
			"schedule_days_runs": "0000010",
			"applicable_timetable": "Y",
			"CIF_bank_holiday_running": " ",
			"CIF_train_uid": " 43876",
			"train_status": "1",
			"CIF_stp_indicator": "N",
			"schedule_segment": [{
				"signalling_id": "2C90",
				"uic_code": "",
				"atoc_code": "",
				"CIF_train_category": "OO",
				"CIF_headcode": "",
				"CIF_course_indicator": "",
				"CIF_train_service_code": "24672104",
				"CIF_business_sector": "",
				"CIF_power_type": "EMU",
				"CIF_timing_load": "",
				"CIF_speed": "",
				"CIF_operating_characteristics": "",
				"CIF_train_class": "",
				"CIF_sleepers": "",
				"CIF_reservations": "0",
				"CIF_connection_indicator": "",
				"CIF_catering_code": "",
				"CIF_service_branding": "",
				"CIF_traction_class": "",
				"schedule_location": [{
					"scheduled_arrival_time": " ",
					"scheduled_departure_time": "125100",
					"scheduled_pass_time": " ",
					"public_arrival_time": " ",
					"public_departure_time": "125100",
					"CIF_platform": "1",
					"CIF_line": "",
					"CIF_path": " ",
					"CIF_activity": "TB",
					"CIF_engineering_allowance": "",
					"CIF_pathing_allowance": "",
					"CIF_performance_allowance": "",
					"location": {
						"tiploc": {
							"tiploc_id": "WOKNGHM"
						}
					}
				}, {
					"scheduled_arrival_time": "125630",
					"scheduled_departure_time": "125730",
					"scheduled_pass_time": "      ",
					"public_arrival_time": "      ",
					"public_departure_time": "      ",
					"CIF_platform": "1",
					"CIF_line": "",
					"CIF_path": "",
					"CIF_activity": "",
					"CIF_engineering_allowance": "",
					"CIF_pathing_allowance": "",
					"CIF_performance_allowance": "",
					"location": {
						"tiploc": {
							"tiploc_id": "BRACKNL"
						}
					}
				}, {
					"scheduled_arrival_time": "135800",
					"scheduled_departure_time": " ",
					"scheduled_pass_time": " ",
					"public_arrival_time": "135800",
					"public_departure_time": " ",
					"CIF_platform": "19",
					"CIF_line": " ",
					"CIF_path": "",
					"CIF_activity": "TF",
					"CIF_engineering_allowance": " ",
					"CIF_pathing_allowance": " ",
					"CIF_performance_allowance": " ",
					"location": {
						"tiploc": {
							"tiploc_id": "WATRLOO"
						}
					}
				}]
			}]
		}
	}
}

Note: CIF Speed

There is a VSTP process that has been known to populate the CIF_speed field incorrectly. As of April 2024, this appears to have been fixed.

For reference, the following speed values should be divided by 2.24 to get miles per hour:

CIF_speed value Speed in mph
22 10
34 15
56 20
67 30
78 35
89 40
101 45
112 50
123 55
134 60
157 70
168 75
179 80
195 87
201 90
213 95
224 100
246 110
280 125
314 140
417 186


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 TIPLOC Records 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 (BPLAN)