How OneBusAway deals with vehicle positions - Interpolation with trip updates

214 views
Skip to first unread message

Antoine Fournier

unread,
Jun 29, 2012, 11:37:52 AM6/29/12
to onebusaway...@googlegroups.com
Hi,

I created a feed (in GTFS-realtime) for vehicle positions and another one for trip updates. I defined a trip_id from my GTFS data, a delay for one stop in this trip, and I placed my simulated vehicle somewhere in my agency's area.
When I look at any trip action, I can see my vehicle pinned in the right place on the map. In the stop action for my delayed stop, I can see the correct delay.

But what I don't understand is that the delay is only reflected from the trip update feed. It doesn't seems to take into account my vehicle position, even if this one is at the opposite end of the city.
Can someone explain me why ? Isn't there any interpolation to take into account the position of the vehicle to calculate the real delay ?

Thanks again for all the support from the community in this forum.
Regards
Antoine

Antoine Fournier

unread,
Jul 4, 2012, 3:59:49 AM7/4/12
to onebusaway...@googlegroups.com
Hello,

So from what I understood, reading the blog of OneBusAway, "OneBusAway doesn't do its own arrival prediction [...] This arrival prediction data comes from the agencies themselves for buses that use GPS".
Then the arrival predictions doesn't depend on buses positions ? Then what's the purpose of using vehicle position feed (with GTFS-realtime for example) ?

Maybe I should ask the same question on MTA forum; they seem to use vehicle positions to adjust arrival predictions.

Anyway, according to the article quoted above (http://onebusaway.blogspot.fr/2012/02/on-onebusaway-inaccuracies.html), it is up to the agencies to calculate the delay's predictions according to vehicle positions. Is there any sources I could find somewhere, showing those algorithms ?

Thanks for your support
Regards
Antoine

Jeff Maki

unread,
Jul 4, 2012, 12:49:55 PM7/4/12
to onebusaway...@googlegroups.com
Hello Antoine,

Perhaps the confusion is coming in because there are two kinds of
predictions OBA uses--time and location.

First location: OBA /can/ interpolate a vehicle's position for times
that are in between actual reports from the vehicle--I believe it uses
a simple schedule-based interpolation strategy (that takes into
account schedule deviation). The code for that is, I believe,
ultimately here (it passes through many layers before getting to the
user):

https://github.com/OneBusAway/onebusaway-application-modules/blob/master/onebusaway-transit-data-federation/src/main/java/org/onebusaway/transit_data_federation/impl/blocks/ScheduledBlockLocationServiceImpl.java

called from here:

https://github.com/OneBusAway/onebusaway-application-modules/blob/master/onebusaway-transit-data-federation/src/main/java/org/onebusaway/transit_data_federation/impl/realtime/BlockLocationServiceImpl.java#L729

And then there's time. Time-based predictions come from another
external system (OBA integrates with a few common ones). Same with the
MTA version. Both OBA and MTA OBA do no time-based predictions
themselves. So it's entirely possible to have the vehicle's location
appear in one place, and a time-based arrival be generated on another
assumption, though you'd hope the two are receiving the same inputs
and therefore are consistent with each other.

I'm not sure if that answers your question, or if I've understood it
properly, but hope that helps,

-Jeff
> --
> You received this message because you are subscribed to the Google Groups
> "onebusaway-developers" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/onebusaway-developers/-/hq_3Jlkti7UJ.
>
> To post to this group, send email to onebusaway...@googlegroups.com.
> To unsubscribe from this group, send email to
> onebusaway-devel...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/onebusaway-developers?hl=en.



--
Jeff Maki
OpenPlans Transportation
917-388-9088
jm...@openplans.org

Frumin, Michael

unread,
Jul 4, 2012, 4:31:32 PM7/4/12
to onebusaway...@googlegroups.com
Jeff, that's a good breakdown of the location prediction (ie interpolation) vs time prediction. My feeling is that in most cases one will want to disable the location interpolation/prediction because of the risk of innacuracy. I guess it all depends how much time there is between real-time updates. At the 30 second cycle we have, it is clearly unnecessary.

As for time, it's important to make clear I think that you can configure/use OBA to make the very naive *assumption* about when a bus will serve a stop based *only* on schedule deviation and the scheduled service time. This will affect the outputs based on the real-time inputs.

Thanks,
Mike
Reply all
Reply to author
Forward
0 new messages