User testing suggestion: since pgr_djikstra() returns the total cost of a given route, we should be able to return an approximate time for a given route by assuming a certain speed (this blog post suggests 11-18 mph) and multiplying it by the cost.
The one snag is that in order to prioritize mellow streets we cheat by reducing the cost in the query:
So in order to get the true cost we'll need to either figure out how to adjust the pgr_djisktra() query to return the unaltered cost, or run an additional query after we get the route to confirm its true cost.
User testing suggestion: since
pgr_djikstra()
returns the total cost of a given route, we should be able to return an approximate time for a given route by assuming a certain speed (this blog post suggests 11-18 mph) and multiplying it by the cost.The one snag is that in order to prioritize mellow streets we cheat by reducing the cost in the query:
https://github.com/jeancochrane/mellow-bike-map/blob/6846b7f51272d9aaa09f34d1000b305e37d08876/app/mbm/views.py#L103-L116
So in order to get the true cost we'll need to either figure out how to adjust the
pgr_djisktra()
query to return the unaltered cost, or run an additional query after we get the route to confirm its true cost.