MTD Developer Forum
»
API
»
General Discussion
»
Suggestion: Revised GetDeparturesByStop method
Rank: Newbie
Groups: Registered
Joined: 12/7/2011(UTC) Posts: 3
|
My suggestion is to allow GetDeparturesByStop to display negative expected_mins so that we can determine whether or not a bus just left. I'm not sure if this would be possible, but it would be a great addition.
|
|
|
|
Rank: Administration
Groups: Administrators, Registered Joined: 6/1/2011(UTC) Posts: 88 Location: Urbana Thanks: 1 times Was thanked: 6 time(s) in 6 post(s)
|
Unfortunately, we don't have the capability to show departure information for buses that have already left a stop.
I do have a suggestion for how you could partially implement this functionality. The GetDeparturesByStop method returns a vehicle_id. Since this id is unique to a particular bus you could track vehicle_ids between GetDeparturesByStop requests. When a vehicle_id that was previously there disappears you can assume that the this trip has already departed.
|
|
|
|
Rank: Newbie
Groups: Registered
Joined: 12/7/2011(UTC) Posts: 3
|
The only problem I could see with that method is if a bus is removed from service off-schedule and thus also the departure list.
|
|
|
|
Rank: Administration
Groups: Administrators, Registered Joined: 6/1/2011(UTC) Posts: 88 Location: Urbana Thanks: 1 times Was thanked: 6 time(s) in 6 post(s)
|
This is certainly possible, if a bus gets overloaded or too far behind schedule we "turn" it. Meaning, we take it out of service and have a new bus pick up on schedule. One way around this is to do what I said before, but check to see if the last known time was expected to depart withing some threshold (e.x. within 2 minutes of departing).
|
|
|
|
MTD Developer Forum
»
API
»
General Discussion
»
Suggestion: Revised GetDeparturesByStop method
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.