Don't compute new modifier for merge instructions in collapsing
This commit is contained in:
parent
921471a153
commit
5b79640b44
@ -1,7 +1,10 @@
|
|||||||
# UNRELEASED
|
# UNRELEASED
|
||||||
|
|
||||||
- Profile:
|
- Changes from 5.13:
|
||||||
- Remove dependency on turn types and turn modifier in the process_turn function in the `car.lua` profile. Guidance instruction types are not used to influence turn penalty anymore so this will break backward compatibility between profile version 3 and 4.
|
- Profile:
|
||||||
|
- Remove dependency on turn types and turn modifier in the process_turn function in the `car.lua` profile. Guidance instruction types are not used to influence turn penalty anymore so this will break backward compatibility between profile version 3 and 4.
|
||||||
|
- Bugfixes:
|
||||||
|
- Fixed #4670: Fix bug where merge instructions got the wrong direction modifier
|
||||||
|
|
||||||
# 5.13.0
|
# 5.13.0
|
||||||
- Changes from 5.12:
|
- Changes from 5.12:
|
||||||
|
@ -145,5 +145,5 @@ Feature: Merging
|
|||||||
| cf | | 1B | motorway_link | yes |
|
| cf | | 1B | motorway_link | yes |
|
||||||
|
|
||||||
When I route I should get
|
When I route I should get
|
||||||
| waypoints | route | turns |
|
| waypoints | route | turns |
|
||||||
| e,d | ,A100,A100 | depart,merge straight,arrive |
|
| e,d | ,A100,A100 | depart,merge slight left,arrive |
|
||||||
|
@ -186,8 +186,9 @@ void AdjustToCombinedTurnStrategy::operator()(RouteStep &step_at_turn_location,
|
|||||||
{
|
{
|
||||||
const auto angle = findTotalTurnAngle(step_at_turn_location, transfer_from_step);
|
const auto angle = findTotalTurnAngle(step_at_turn_location, transfer_from_step);
|
||||||
|
|
||||||
// Forks point to left/right. By doing a combined angle, we would risk ending up with
|
// Forks and merges point to left/right. By doing a combined angle, we would risk ending up with
|
||||||
// unreasonable fork instrucitons. The direction of a fork only depends on the forking location,
|
// unreasonable fork instrucitons. The direction of a fork or a merge only depends on the
|
||||||
|
// location,
|
||||||
// not further angles coming up
|
// not further angles coming up
|
||||||
//
|
//
|
||||||
// d
|
// d
|
||||||
@ -195,7 +196,8 @@ void AdjustToCombinedTurnStrategy::operator()(RouteStep &step_at_turn_location,
|
|||||||
// a - b
|
// a - b
|
||||||
//
|
//
|
||||||
// could end up as `fork left` for `a-b-c`, instead of fork-right
|
// could end up as `fork left` for `a-b-c`, instead of fork-right
|
||||||
const auto new_modifier = hasTurnType(step_at_turn_location, TurnType::Fork)
|
const auto new_modifier = hasTurnType(step_at_turn_location, TurnType::Fork) ||
|
||||||
|
hasTurnType(step_at_turn_location, TurnType::Merge)
|
||||||
? step_at_turn_location.maneuver.instruction.direction_modifier
|
? step_at_turn_location.maneuver.instruction.direction_modifier
|
||||||
: getTurnDirection(angle);
|
: getTurnDirection(angle);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user