GetNextTripsForStopAllRoutes API Question

80 views
Skip to first unread message

Volodya Antonevych

unread,
Feb 13, 2018, 9:56:41 AM2/13/18
to Open Data Ottawa
Hello,

I want to use https://api.octranspo1.com/v1.2/GetNextTripsForStopAllRoutes API function to find out a next scheduled time for a trip by stop ID.

I found the following description for XML schema:
http://www.octranspo.com/developers/documentation#method-GetNextTripsForStopAllRoutes

<!--start time for the trip. Format HH:MI, where HH = 24 hour format-->
<TripStartTime>string</TripStartTime>      
 
<!--adjusted scheduled time in minutes-->
<AdjustedScheduleTime>string</AdjustedScheduleTime>

<!--The time since the scheduled was adjusted in whole and fractional minutes. -->
<AdjustmentAge>string</AdjustmentAge>


Here is a data example from documentation:
{
"TripDestination": "Ottawa Rockcliffe",
"TripStartTime": "14:51",
"AdjustedScheduleTime": "13",
"AdjustmentAge": "0.39",
"LastTripOfSchedule": false,
"BusType": "4L - IN",
"Latitude": "45.379298",
"Longitude": "-75.667908",
"GPSSpeed": "0.5"
},


As I understand, to calculate the exact scheduled time for trip I have to:
"TripStartTime" + "AdjustedScheduleTime".
Am I right?

Should I use "AdjustmentAge" value somehow in calculation above?

Thanks in advance,
    Volodya

Cyrus

unread,
Feb 13, 2018, 7:37:29 PM2/13/18
to Open Data Ottawa
AdjustedScheduleTime is the time that the bus is scheduled to arrive at the stop (adjusted with GPS if available)

AdjustmentAge is the # of minutes since the last refresh from the bus.

Benjm

unread,
Jan 13, 2022, 11:47:28 AM1/13/22
to Open Data Ottawa
I have used AdjustedScheduleTime + RequestProcessingTime.
After loading the API and then refreshing the time went down leading me to beleive that the API does it.

Reply all
Reply to author
Forward
0 new messages