diff options
author | jandegr <jandegr@users.noreply.github.com> | 2015-10-03 12:24:38 +0200 |
---|---|---|
committer | jandegr <jandegr@users.noreply.github.com> | 2015-10-03 12:24:38 +0200 |
commit | 946ddfeb7817633188bcd2c9d160ea158c35699b (patch) | |
tree | 71f38346d181a776a491bc09a55cfa0defe2e505 | |
parent | 7de2f45d1403c3f7b683ab0ec681beefd61fbfbb (diff) | |
parent | 122597e423c94d01ff8cab9c40b4992a20836b34 (diff) | |
download | navit-R6295.tar.gz |
Merge pull request #26 from navit-gps/jandegr-patch-1R6295
some missing maneuvers
-rw-r--r-- | navit/navigation.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/navit/navigation.c b/navit/navigation.c index 888a64d09..d3f4c52ac 100644 --- a/navit/navigation.c +++ b/navit/navigation.c @@ -2335,7 +2335,17 @@ maneuver_required2 (struct navigation *nav, struct navigation_itm *old, struct n if (!m.is_same_street && m.is_unambiguous < 1) { /* FIXME: why < 1? */ ret=1; r="yes: different street and ambiguous"; - } else + } + /* we should have cat of the candidate within dlim + * instead of testing against max_cat. + * The highest cat road might be well outside dlim + */ + else if (m.max_cat >= m.new_cat && m.is_unambiguous < 1) + { + ret = 1; + r="yes: ambiguous because of other candidates within dlim"; + } + else r="no: same street or unambiguous"; #ifdef DEBUG r=g_strdup_printf("%s: d %d left %d right %d dlim=%d cat old:%d new:%d max:%d unambiguous=%d same_street=%d", ret==1?"yes":"no", m.delta, m.left, m.right, dlim, m.old_cat, m.new_cat, m.max_cat, m.is_unambiguous, m.is_same_street); |