GTFS Realtime VS Scheduled data

50 views
Skip to first unread message

Paul Harrington

unread,
Jul 28, 2016, 11:52:41 AM7/28/16
to MBTA Developers
Hi,

Based on the current scheduled GTFS data I can see that the next 10 arrivals at stop id 5 (Washington St @ Massachusetts Ave) after 10:47 this morning are:

FINE [2016-07-28 15:47:18] Retrieving departure Info: Date [20160728 10:47] StopId [5] StopCode [5] StopName [Washington St @ Massachusetts Ave]
FINER [2016-07-28 15:47:18]   Arrival  Departure DirectionId RouteType Headsign Route TripId TripShortName StopSequence
FINER [2016-07-28 15:47:18]   10:51:00  10:51:00 1 3 [Downtown] [SL5] [31248486] [] [4]
FINER [2016-07-28 15:47:18]   10:57:00  10:57:00 1 3 [South Station] [SL4] [31248809] [] [4]
FINER [2016-07-28 15:47:18]   11:01:00  11:01:00 1 3 [Downtown] [SL5] [31248532] [] [4]
FINER [2016-07-28 15:47:18]   11:07:00  11:07:00 1 3 [Downtown] [SL5] [31248586] [] [4]
FINER [2016-07-28 15:47:18]   11:12:00  11:12:00 1 3 [South Station] [SL4] [31248841] [] [4]
FINER [2016-07-28 15:47:18]   11:16:00  11:16:00 1 3 [Downtown] [SL5] [31248628] [] [4]
FINER [2016-07-28 15:47:18]   11:17:00  11:17:00 0 3 [Harbor Point via South Bay Center] [8] [31210373] [] [24]
FINER [2016-07-28 15:47:18]   11:21:00  11:21:00 1 3 [South Station] [SL4] [31248728] [] [4]
FINER [2016-07-28 15:47:18]   11:27:00  11:27:00 1 3 [Downtown] [SL5] [31248452] [] [4]
FINER [2016-07-28 15:47:18]   11:33:00  11:33:00 1 3 [South Station] [SL4] [31248778] [] [4]

The realtime snapshot taken at the same time for this stop is:

stopId=5 tripId=31248450 stopSeq=4 stopSch=SCHEDULED arrTime=2016-07-28 10:59:22 arrDelay=-1 depTime=2016-07-28 10:59:22 depDelay=-1 timestamp=1969-12-31 18:59:59
stopId=5 tripId=31248486 stopSeq=4 stopSch=SCHEDULED arrTime=2016-07-28 11:00:09 arrDelay=-1 depTime=2016-07-28 11:00:09 depDelay=-1 timestamp=1969-12-31 18:59:59
stopId=5 tripId=31248532 stopSeq=4 stopSch=SCHEDULED arrTime=2016-07-28 11:02:58 arrDelay=-1 depTime=2016-07-28 11:02:58 depDelay=-1 timestamp=1969-12-31 18:59:59
stopId=5 tripId=31248841 stopSeq=4 stopSch=SCHEDULED arrTime=2016-07-28 11:13:57 arrDelay=-1 depTime=2016-07-28 11:13:57 depDelay=-1 timestamp=1969-12-31 18:59:59
stopId=5 tripId=31248586 stopSeq=4 stopSch=SCHEDULED arrTime=2016-07-28 11:14:57 arrDelay=-1 depTime=2016-07-28 11:14:57 depDelay=-1 timestamp=1969-12-31 18:59:59
stopId=5 tripId=31210373 stopSeq=24 stopSch=SCHEDULED arrTime=2016-07-28 11:22:36 arrDelay=-1 depTime=2016-07-28 11:22:36 depDelay=-1 timestamp=1969-12-31 18:59:59
stopId=5 tripId=31248628 stopSeq=4 stopSch=SCHEDULED arrTime=2016-07-28 11:24:36 arrDelay=-1 depTime=2016-07-28 11:24:36 depDelay=-1 timestamp=1969-12-31 18:59:59

If you look into it you see that for the scheduled trip 31248809 departing at 10:57 there is no real time data. 

In the absence of RTD would it be correct to assume that the trip still exists and should arrive at 10:57 as scheduled or the fact that it doesn't appear at all in the RTD mean that it is
more likely that it has been cancelled ?

Thanks Paul.

Developer at MBTA

unread,
Aug 1, 2016, 6:02:53 PM8/1/16
to MBTA Developers
Hi Paul, if there's no data available for a trip we recommend the trip be treated as just that: no data available. It might be running using a bus that is having a tracking problem, or it might not be running due to an operational problem. It's uncertain. There are multiple options for what should be presented to the user, the one thing we advise against is hiding the uncertainty by showing a scheduled arrival mixed in with predicted arrivals without any way to tell them apart. 

Sincerely,
developer@mbta

Paul Harrington

unread,
Aug 2, 2016, 5:09:29 AM8/2/16
to MBTA Developers
This makes sense, appreciate feedback.

Thanks Paul.

Paul Harrington

unread,
Aug 2, 2016, 9:38:53 AM8/2/16
to MBTA Developers
Hi,

Have another question on the same subject. The data below shows trip update realtime and schedule information for stop 10101. There is a line of realtime data and immediately under it the scheduled data for the 
real time update. I have 2 questions:

1) For the last 3 entries the RTD did not have a timestamp (hence printed as timestamp=1969-12-31 19:00:00). Should trip updates without a timestamp be treated exactly the same as those with a timestamp or
should they be ignored ?

2) In the example below all trip updates for the stop are ahead of scheduled apart from the first one which is 6:50 late.  If a bus arrives at a stop ahead of schedule does it generally wait or does it drive on until
the trip is ended ? And is the example below  unusual, I pulled the same updates for 90 minutes later and all trips were behind schedule which is what I would expect to be more normal. 

Thanks Paul.

INFO [2016-08-02 12:51:52] Reloading [http://developer.mbta.com/lib/GTRTFS/Alerts/TripUpdates.pb]
INFO [2016-08-02 12:51:55] 1348 trip updates added and 0 dropped due to not having supplied a trip Id. 0 stop time updates dropped
INFO [2016-08-02 12:51:55] Finished Reload of [http://developer.mbta.com/lib/GTRTFS/Alerts/TripUpdates.pb]
INFO [2016-08-02 12:51:58] stopId=10101 tripId=31211405 stopSeq=25 stopSch=SCHEDULED arrTime=2016-08-02 07:55:50 arrDelay=-1 depTime=2016-08-02 07:55:50 depDelay=-1 timestamp=2016-08-02 07:51:17
INFO [2016-08-02 12:51:58]   SCHEDULE:Date=20160802 Arrival=07:49:00 Departure=07:49:00 Direction=INBOUND RouteType=BUS HeadSign=[Dudley] Route=[1] TripId=[31211405] StopSequence=25
INFO [2016-08-02 12:51:58] stopId=10101 tripId=31211391 stopSeq=25 stopSch=SCHEDULED arrTime=2016-08-02 07:59:01 arrDelay=-1 depTime=2016-08-02 07:59:01 depDelay=-1 timestamp=2016-08-02 07:51:00
INFO [2016-08-02 12:51:58]   SCHEDULE:Date=20160802 Arrival=08:02:00 Departure=08:02:00 Direction=INBOUND RouteType=BUS HeadSign=[Dudley] Route=[1] TripId=[31211391] StopSequence=25
INFO [2016-08-02 12:51:58] stopId=10101 tripId=31211387 stopSeq=25 stopSch=SCHEDULED arrTime=2016-08-02 08:12:52 arrDelay=-1 depTime=2016-08-02 08:12:52 depDelay=-1 timestamp=2016-08-02 07:50:36
INFO [2016-08-02 12:51:58]   SCHEDULE:Date=20160802 Arrival=08:13:00 Departure=08:13:00 Direction=INBOUND RouteType=BUS HeadSign=[Dudley] Route=[1] TripId=[31211387] StopSequence=25
INFO [2016-08-02 12:51:58] stopId=10101 tripId=31211460 stopSeq=25 stopSch=SCHEDULED arrTime=2016-08-02 08:21:49 arrDelay=-1 depTime=2016-08-02 08:21:49 depDelay=-1 timestamp=2016-08-02 07:51:16
INFO [2016-08-02 12:51:58]   SCHEDULE:Date=20160802 Arrival=08:22:00 Departure=08:22:00 Direction=INBOUND RouteType=BUS HeadSign=[Dudley] Route=[1] TripId=[31211460] StopSequence=25
INFO [2016-08-02 12:51:58] stopId=10101 tripId=31211383 stopSeq=25 stopSch=SCHEDULED arrTime=2016-08-02 08:30:47 arrDelay=-1 depTime=2016-08-02 08:30:47 depDelay=-1 timestamp=2016-08-02 07:50:58
INFO [2016-08-02 12:51:58]   SCHEDULE:Date=20160802 Arrival=08:32:00 Departure=08:32:00 Direction=INBOUND RouteType=BUS HeadSign=[Dudley] Route=[1] TripId=[31211383] StopSequence=25
INFO [2016-08-02 12:51:58] stopId=10101 tripId=31211456 stopSeq=25 stopSch=SCHEDULED arrTime=2016-08-02 08:39:47 arrDelay=-1 depTime=2016-08-02 08:39:47 depDelay=-1 timestamp=1969-12-31 19:00:00
INFO [2016-08-02 12:51:58]   SCHEDULE:Date=20160802 Arrival=08:41:00 Departure=08:41:00 Direction=INBOUND RouteType=BUS HeadSign=[Dudley] Route=[1] TripId=[31211456] StopSequence=25
INFO [2016-08-02 12:51:58] stopId=10101 tripId=31211389 stopSeq=25 stopSch=SCHEDULED arrTime=2016-08-02 08:48:47 arrDelay=-1 depTime=2016-08-02 08:48:47 depDelay=-1 timestamp=1969-12-31 19:00:00
INFO [2016-08-02 12:51:58]   SCHEDULE:Date=20160802 Arrival=08:50:00 Departure=08:50:00 Direction=INBOUND RouteType=BUS HeadSign=[Dudley] Route=[1] TripId=[31211389] StopSequence=25
INFO [2016-08-02 12:51:58] stopId=10101 tripId=31211432 stopSeq=25 stopSch=SCHEDULED arrTime=2016-08-02 08:57:47 arrDelay=-1 depTime=2016-08-02 08:57:47 depDelay=-1 timestamp=1969-12-31 19:00:00
INFO [2016-08-02 12:51:58]   SCHEDULE:Date=20160802 Arrival=08:59:00 Departure=08:59:00 Direction=INBOUND RouteType=BUS HeadSign=[Dudley] Route=[1] TripId=[31211432] StopSequence=25

Developer at MBTA

unread,
Aug 5, 2016, 5:35:30 PM8/5/16
to MBTA Developers
Hi Paul, 

On question 1: yes, they should be treated the same way. 

On question 2: MBTA buses do not start their trips early, but if they are running early they do not hold for schedule (with a few exceptions.) Note also that predictions tend to err on the side of being too early, so as not to cause people to miss their bus. 

Sincerely,
developer@mbta
Reply all
Reply to author
Forward
0 new messages