wego-bus-map icon indicating copy to clipboard operation
wego-bus-map copied to clipboard

Feature: Enhance Progress Bar to Calculate Distance based on Shape

Open stephenyeargin opened this issue 1 year ago • 0 comments

Currently, the progress bar is looking for the most-recently passed stop sequence by comparing the current time to the scheduled or updated time. The result is for a fairly accurate meter for stops that are evenly spaced, but less-so for those that are farther apart (e.g. the regional bus routes).

We have the data to make this more accurate based on vehicle position. The vehicle position can be used to search for the closest Shape point of the list of points, which has a corresponding dist_traveled attribute.

The hazard of using this is if the vehicle is on a detour, or the route has a switchback because the closest point may not be the actual progress along the route. In these cases, a distance-from-point tolerance could be defined. If it falls outside the tolerance, it would fall back to using the stop time based calculation of percentage complete.

stephenyeargin avatar Jul 24 '22 15:07 stephenyeargin