diff options
| author | jandegr <jandegr@users.noreply.github.com> | 2015-05-23 12:57:07 +0200 |
|---|---|---|
| committer | Pierre GRANDIN <grandinp@altern.org> | 2015-08-02 12:53:49 -0700 |
| commit | 90604c205f221c295bd38e4b42edda5bad0280b8 (patch) | |
| tree | 8debde4b51cc33d9b04aff60c1c74d4ffb8bb954 | |
| parent | 43788910665e4425fc2bf8f837324224fca80af6 (diff) | |
| download | navit-90604c205f221c295bd38e4b42edda5bad0280b8.tar.gz | |
#1303-2
improve roundabout exit counting
| -rw-r--r-- | navit/navigation.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/navit/navigation.c b/navit/navigation.c index 903f6eb47..50cb14de1 100644 --- a/navit/navigation.c +++ b/navit/navigation.c @@ -3310,6 +3310,30 @@ show_maneuver(struct navigation *nav, struct navigation_itm *itm, struct navigat } cur = cur->prev; } + + /*try to figure out if the entry node has a usable exit as well + * + * this will fail for left-hand driving areas + */ + if (cur && cur->next) + { + candidate_way=cur->next->way.next; + while (candidate_way) + { + if (candidate_way && is_way_allowed(nav,candidate_way,3) + && (cur->angle_end < candidate_way->angle2) && ( candidate_way->angle2 > cur->next->way.angle2 )) + /*for the entry node only count exits to the right ?*/ + { + count_roundabout++; + /* As soon as we have an allowed one on this node, + * stop further counting for this node. + */ + break; + } + candidate_way=candidate_way->next; + } + } + switch (level) { case 3: |
