abrensch / brouter

configurable OSM offline router with elevation awareness, Java + Android
MIT License
498 stars 117 forks source link

Traffic lights and travel time ETA #450

Open FFMbyBicycle opened 2 years ago

FFMbyBicycle commented 2 years ago

I noticed that brouter ETA is working really good when riding outside of cities, including mountains :+1:

But when riding in cities the ETA is not that accurate and I think this is due to traffic lights. Are they ignored in terms of calculating the ETA? They are used to calculate the route and costs, but it would be nice if there would be a possibility to add i.e. a static delay of 30 seconds (could be a variable) for each traffic light which will be passed.

As long as the traffic lights configuration are not public, we have to use a static value. But I would prefer being a little bit too early at my destination due a green wave than being too late :wink:

polyscias commented 2 years ago

Yes, traffic lights are ignored in the trekking profile.

I did create an urban profile for myself that also includes penalties for traffic lights and after quite some tuning that works fine for me but it off-coarse depends on if the particular traffic_light is mapped in OSM. It adds also cost for railway crossings and give_way signs.

See #183 for a similar discussion, I can work on a patch for the trekking profile, but maybe it is better to add an urban profile?

FFMbyBicycle commented 2 years ago

Oh, I forgot to mention that I'm using my custom profile which also includes penalties for traffic lights and stop signs. This works great for calculating the costs/route, but it seems that they're not used to calculate the expected arrival time.

While riding in a city the ETA will increase minute after minute because you have to wait a lot at traffic lights.

poutnikl commented 2 years ago

There are various user profiles, considering traffic light delays for route calculation, but it can be very tricky and not only because of OSM mapping.

ETA calculation for the chosen route is done internally in BRouter, and aside of kinematic parameters for cars or bicycles, traffic light are not AFAIK considered for now.

FFMbyBicycle commented 2 years ago

ETA calculation for the chosen route is done internally in BRouter, and aside of kinematic parameters for cars or bicycles, traffic light are not AFAIK considered for now.

Thanks for confirming my observation, this is exactly what this issue is about :+1: