Take stop signs into account during routing

This commit is contained in:
Siarhei Fedartsou
2022-10-27 21:39:21 +02:00
parent 8a4af59838
commit 7f635f2ed6
2 changed files with 3 additions and 2 deletions
+1
View File
@@ -485,6 +485,7 @@ function process_turn(profile, turn)
turn.duration = profile.properties.traffic_light_penalty
end
if turn.number_of_roads > 2 or turn.source_mode ~= turn.target_mode or turn.is_u_turn then
if turn.angle >= 0 then
turn.duration = turn.duration + turn_penalty / (1 + math.exp( -((13 / turn_bias) * turn.angle/180 - 6.5*turn_bias)))