Realtime: track assignments coming 2018-07-23!

246 views
Skip to first unread message

Developer at MBTA

unread,
Jun 14, 2018, 10:50:15 AM6/14/18
to MBTA Developers

Hi folks,


We want to let you know about an upcoming change to our real-time data to include track information.


TL;DR: If you're querying the API for predictions with "South Station", "North Station", and "Back Bay" stop IDs, you should switch to the parent station IDs: "place-ssat", "place-north", "place-bbsta". If you're using the GTFS-RT output to match to GTFS schedules, you should match on the parent station of the stop ID along with the "stop_sequence" value.


As previously noted in this group, we added new stops for tracks at Back Bay, North Station, and South Station to our GTFS file. However, we weren't using them for anything...until now!


Starting July 23th, 2018, our GTFS-Realtime TripUpdates.pb and VehiclePositions.pb will use the new stop IDs when we know which track the train will be using. For example, this is a train that will be leaving North Station from track 2:


entity {

 id: "CR-Weekday-Spring-18-165"

 trip_update {

   trip {

     trip_id: "CR-Weekday-Spring-18-165"

     start_date: "20180723"

     route_id: "CR-Newburyport"

     direction_id: 0

   }

   stop_time_update {

     stop_sequence: 1

     departure {

       time: 1532372543

     }

     stop_id: "North Station-02"

   }

 }

}


This will also be propagated through the V3 API with a new version, which will use these platforms and remove the redundant track field. If you are using the "Back Bay", "North Station" or "South Station" stop IDs, you'll want to switch to using the parent station: "place-bbsta", "place-north", or "place-sstat". For example: https://api-v3.mbta.com/predictions/?filter[route]=CR-Kingston&filter[stop]=place-sstat. If you remain on the current version (‘2018-05-07’), querying for the old stop IDs will continue to return results for all the commuter rail platforms.


While we aren't currently using track-specific stop IDs on other stations, we will in the future and you can use the parent station ID for those stops as well. If you want to only display predictions for a particular direction, you should use a route filter and a direction_id filter, rather than relying on tracks only serving one direction.


The stop_sequence values will not change; you should continue to use that to match the prediction to the values in stop_times.txt.


If you have any questions or concerns, please let us know!


Sincerely,

Developer@MBTA


Mark Vantzelfde

unread,
Jun 14, 2018, 11:32:15 AM6/14/18
to massdotd...@googlegroups.com
--
You received this message because you are subscribed to the Google Groups "MBTA Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to massdotdevelop...@googlegroups.com.
To post to this group, send email to massdotd...@googlegroups.com.
Visit this group at https://groups.google.com/group/massdotdevelopers.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages