Skip to content

Commit

Permalink
all failing cases are in
Browse files Browse the repository at this point in the history
  • Loading branch information
Moritz Kobitzsch committed Sep 6, 2016
1 parent fc13858 commit 3b89d51
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 18 deletions.
36 changes: 20 additions & 16 deletions features/guidance/turn-angles.feature
Original file line number Diff line number Diff line change
Expand Up @@ -673,16 +673,10 @@ Feature: Simple Turns
Scenario: Curved Exit from Curved Road
Given the node map
# 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | g | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | f | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | g |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | f | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
Expand All @@ -691,13 +685,13 @@ Feature: Simple Turns
| | | | | | | | | | | | | | | | | | | | e | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | d | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | c | | | | | h | | | | | | | | | | | | | | |
| | | | | | | | | | | | c | | | | | | | | | | | | | | | | | | | |
| a | | | | | | | b | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | i | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | j | | | |
| | | | | | | | | | | | | | | | | | h | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | i | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | j |

And the ways
| nodes | name | oneway | lanes | highway |
Expand Down Expand Up @@ -752,17 +746,27 @@ Feature: Simple Turns
Given the node map
# 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
| | | | | | | | | | | | | | | | | | | h | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | f | | | | | | | | | | | | g |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | f | | | | | | | | | i | | | g |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | e | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | d | | | | | | | | | | | | | | |
| a | | | | | | | | | | | b | c | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | | | | d | | | | | | | | | | | | | |
| a | | | | | | | | | | | b | | | | c | | | | | | | | | | | | j | | | |

And the ways
| nodes | name | oneway | lanes | highway |
| abcdef | ella | no | | residential |
| fg | ella | no | | residential |
| fig | ella | no | | residential |
| hf | ilse | no | | residential |
| ij | wash | no | | residential |

When I route I should get
| waypoints | route | turns |
Expand Down
4 changes: 2 additions & 2 deletions src/engine/guidance/post_processing.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -960,9 +960,9 @@ std::vector<RouteStep> collapseTurns(std::vector<RouteStep> steps)

// handle final sliproad
if (steps.size() >= 3 &&
steps[getPreviousIndex(steps.size() - 1)].maneuver.instruction.type == TurnType::Sliproad)
steps[getPreviousIndex(steps.size() - 1,steps)].maneuver.instruction.type == TurnType::Sliproad)
{
steps[getPreviousIndex(steps.size() - 1)].maneuver.instruction.type = TurnType::Turn;
steps[getPreviousIndex(steps.size() - 1,steps)].maneuver.instruction.type = TurnType::Turn;
}

BOOST_ASSERT(steps.front().intersections.size() >= 1);
Expand Down

0 comments on commit 3b89d51

Please sign in to comment.