Make sure we only count turns as UTurns for the turn_function
This commit is contained in:
parent
1967701385
commit
d9fcf1ecf7
@ -1,3 +1,8 @@
|
|||||||
|
# 5.14.3
|
||||||
|
- Changes from 5.14.2:
|
||||||
|
- Bugfixes:
|
||||||
|
- FIXED #4754: U-Turn penalties are applied to straight turns.
|
||||||
|
|
||||||
# 5.14.2
|
# 5.14.2
|
||||||
- Changes from 5.14.1:
|
- Changes from 5.14.1:
|
||||||
- Bugfixes:
|
- Bugfixes:
|
||||||
|
@ -77,7 +77,11 @@ struct TurnInstruction
|
|||||||
|
|
||||||
TurnType::Enum type : 5;
|
TurnType::Enum type : 5;
|
||||||
DirectionModifier::Enum direction_modifier : 3;
|
DirectionModifier::Enum direction_modifier : 3;
|
||||||
// the lane tupel that is used for the turn
|
|
||||||
|
bool IsUTurn() const
|
||||||
|
{
|
||||||
|
return type == TurnType::Turn && direction_modifier == DirectionModifier::UTurn;
|
||||||
|
}
|
||||||
|
|
||||||
static TurnInstruction INVALID() { return {TurnType::Invalid, DirectionModifier::UTurn}; }
|
static TurnInstruction INVALID() { return {TurnType::Invalid, DirectionModifier::UTurn}; }
|
||||||
|
|
||||||
|
@ -580,7 +580,7 @@ void EdgeBasedGraphFactory::GenerateEdgeExpandedEdges(
|
|||||||
ExtractionTurn extracted_turn(
|
ExtractionTurn extracted_turn(
|
||||||
turn.angle,
|
turn.angle,
|
||||||
m_node_based_graph.GetOutDegree(node_at_center_of_intersection),
|
m_node_based_graph.GetOutDegree(node_at_center_of_intersection),
|
||||||
turn.instruction.direction_modifier == guidance::DirectionModifier::UTurn,
|
turn.instruction.IsUTurn(),
|
||||||
is_traffic_light,
|
is_traffic_light,
|
||||||
edge_data1.flags.restricted,
|
edge_data1.flags.restricted,
|
||||||
edge_data2.flags.restricted,
|
edge_data2.flags.restricted,
|
||||||
|
Loading…
Reference in New Issue
Block a user