fix collapsing into uturns, that aren't u-turns
This commit is contained in:
committed by
Patrick Niklaus
parent
8719821363
commit
37774a331a
@@ -306,7 +306,12 @@ bool suppressedStraightBetweenTurns(const RouteStepIterator step_entering_inters
|
||||
hasTurnType(*step_leaving_intersection, TurnType::Continue) ||
|
||||
hasTurnType(*step_leaving_intersection, TurnType::OnRamp));
|
||||
|
||||
return both_short_enough && similar_length && correct_types;
|
||||
const auto total_angle =
|
||||
totalTurnAngle(*step_entering_intersection, *step_leaving_intersection);
|
||||
const auto total_angle_is_not_uturn =
|
||||
(total_angle > NARROW_TURN_ANGLE) && (total_angle < 360 - NARROW_TURN_ANGLE);
|
||||
|
||||
return both_short_enough && similar_length && correct_types && total_angle_is_not_uturn;
|
||||
}
|
||||
|
||||
bool maneuverSucceededByNameChange(const RouteStepIterator step_entering_intersection,
|
||||
|
||||
Reference in New Issue
Block a user