Opened 4 years ago

Last modified 2 years ago

#1175 new defect/bug

Navigation next turn is wrong for individual roundabouts

Reported by: linesoff.myopenid.com Owned by: KaZeR
Priority: minor Milestone: version 0.5.1
Component: core Version: git master
Severity: normal Keywords: roundabound, directions, routing
Cc:

Description (last modified by usul)

Although most roundabout-turns are displayed correctly (counter-clockwise) it happens that individual roundabout turns are displayed misleading (clockwise and wrong angle). In contrast is the displayed route path is fine (counterclockwise, correct exit). The effect appears with SVN_5650 and older versions (both windows and Android) and OSM-map of Italy. The example roundabout ist near Lucca (Lat 43 50' 23, Long 10 29' 43').

Attachments (4)

fancyRoundabout.jpg (80.2 KB) - added by linesoff.myopenid.com 4 years ago.
navit.log (9.5 KB) - added by linesoff.myopenid.com 4 years ago.
LuccaKreisel_141123.jpg (80.8 KB) - added by linesoff (2) 3 years ago.
Next turn near Lucca, Map 23.11.2014
Lucca_12258.jpg (91.5 KB) - added by linesoff (2) 2 years ago.

Download all attachments as: .zip

Change History (16)

Changed 4 years ago by linesoff.myopenid.com

Changed 4 years ago by linesoff.myopenid.com

comment:1 follow-ups: Changed 4 years ago by usul

  • Description modified (diff)
  • Keywords roundabound directions routing added
  • Milestone set to version 0.5.1

Thanks for your report :)

I tried to find the turnabout with your coordinates, but failed. Can you please provide us a OSM permalink of the right region?

comment:2 in reply to: ↑ 1 Changed 4 years ago by crystalgfan .

Replying to http://wiki.navit-project.org/index.php/user:usul:

Thanks for your report :)

I tried to find the turnabout with your coordinates, but failed. Can you please provide us a OSM permalink of the right region?


Here is a link where it happens on my daily route: http://www.openstreetmap.org/#map=19/51.83815/10.79049

If you go from "Vor der Mauer" to "Halberstaedter Strasse", you'll have to take the first exit because of your wanted route, then Navit tells you to take the right exit, first exit, but it doesn't show it: It shows to take the second exit.

comment:3 in reply to: ↑ 1 Changed 4 years ago by linesoff.myopenid.com

  • Severity set to normal

Replying to http://wiki.navit-project.org/index.php/user:usul:

Thanks for your report :)

I tried to find the turnabout with your coordinates, but failed. Can you please provide us a OSM permalink of the right region?

The coordinates seem to be correct. Is the following the asked OSM permalink means ?

http://www.openstreetmap.org/#map=18/43.83968/10.49571

The crossing is displayed: Viale Giosue Carducci / Viale Europa

comment:4 Changed 3 years ago by jandegr

The sample roundabout near Lucca was at the least missing the oneway key in OSM http://www.openstreetmap.org/changeset/26773883 Test again when a new Navit map including this change becomes available. This is a classic 'Navit does this or that' cause when it involves a roundabout. EDIT : the above is irrelevant, maptool handles missing oneway tags correctly for roundabouts

Last edited 3 years ago by jandegr (previous) (diff)

comment:5 Changed 3 years ago by linesoff (2)

I saw, that you changed the map 9 days ago. I loaded today (23. Nov.2014) a map from PlanetExtractor?. I assume, that the change should be in, but I cannot really check it. The display of the "next turn" is a little bit different (now 270 degree clockwise, before it showed 315 degree clockwise). The route displays correctly approx. 200 degree counterclockwise.

(I cannot manage to put an attachment/picture here)

Changed 3 years ago by linesoff (2)

Next turn near Lucca, Map 23.11.2014

comment:6 Changed 3 years ago by jandegr

I downloaded a map of lucca (version 141206) and indeed, the route is ok but the roundabout icon is in reverse, will further investigate.

comment:7 Changed 3 years ago by tryagain

way https://www.openstreetmap.org/way/140684781#map=19/51.57576/5.06706 exits at zero angle from the roundabout.

I guess the code at line 72089 of navigation.c decides (once again delta=0) to use wrong manoeuvre type.

I would suggest to take into account next roundabout segment and compare exit angle with next roundabout segment entry angle.

comment:8 Changed 3 years ago by jandegr

navigation.c now uses the angle from the road onto the roundabout, and compares these between the entry and exit road to derive the angle. This leads to bad results in many cases, the Lucca sample being the very worst I've ever seen. Maybe another solution is to derive the angle from the distance traveled on the roundabout versus the length of the entire roundabout. This may not yet be ideal either but will certainly cure this rediculous sample, angles can never be in reverse that way.

In the Lucca sample a delta of -14 is derived with the existing code !

Last edited 3 years ago by jandegr (previous) (diff)

comment:9 Changed 3 years ago by mvglasow (2)

I've analyzed this case. Navit uses the delta of the exit maneuver, assuming one would make a right turn to leave a counterclockwise roundabout (in countries that drive on the right, and vice versa in countries that drive on the left).

Since in this particular case the exit turns left (-14), Navit assumes that we're leaving the roundabout to the left and thus the roundabout goes clockwise.

I've modified the code to compare exit delta against the continuation of the roundabout. This has fixed the following test case:

Langwieder_See 11.457781 48.1648526 11.4120844 48.1983823

The Lucca roundabout has yet another issue, as the exit in question was mapped incorrectly: it goes INSIDE the roundabout (thus, as far as deltas are concerned, exits to the left, with a delta of -14, when the roundabout continues with a delta of -11). If you look at the screenshot closely, you will see the error. This has been corrected in OSM in the meantime, I just need to get an updated Navit map.

The fix was developed as part of Project HighFive? and will be in SVN once we merge our work.

I have come up with an alternative approach to identify the direction of a roundabout which would not be upset by incorrect map data as in this case, but it would introduce other regressions, hence I abandoned it.

Showing correct angles (straight, slightly right, right etc.) is a different issue and quite complex (we need to derive from map data how the driver would perceive it). We're going to tackle this as well eventually.

PS: in OSM, junction=roundabout implies oneway=yes, thus a oneway tag is not needed and applications should treat roundabouts as one-way roads.

comment:10 Changed 3 years ago by tryagain

mvglasow, does your code fix only roundabout direction, or its exit angle too?

If I understand correctly, your idea is to derive roundabout direction by comparing exit angle with roundabout continuation. I think it would work for most cases. Because, typically, exits are leading outside of roundabout, and other cases are probably always mean bad osm data.

I love jandegr's idea of dividing distance travelled on the roundabout versus the length of the entire roundabout to derive the angle of exit drawn on icon.

Btw there's another way to show a crossing. We have an <osd type="auxmap">, which allows to render a map region in small window. What if we reuse this one (unsure if it's possible to make it display next turn map region at a closer zoom) or make something new, drawn completely of osm data? I don't think that drawing 10-20 line segments would take significant time. But we may solve many problems related to complex crossings, be they roundabouts or not.

comment:11 Changed 3 years ago by kazer

I really like this idea tryagain.

Changed 2 years ago by linesoff (2)

comment:12 Changed 2 years ago by linesoff (2)

With version 12256 and current OSM-Map the result is a little bit different. The angle is correct, but it is still shown as clockwise (attachment Lucca_12258.jpg)

Note: See TracTickets for help on using tickets.