logo separator

[mkgmap-dev] Resurrect adjust-turn-headings

From Gerd Petermann gpetermann_muenchen at hotmail.com on Wed Oct 14 18:26:47 BST 2020

Hi Ticker,

thanks for the patch. I'll have a closer look at the weekend.

Gerd

________________________________________
Von: mkgmap-dev <mkgmap-dev-bounces at lists.mkgmap.org.uk> im Auftrag von Ticker Berkin <rwb-mkgmap at jagit.co.uk>
Gesendet: Mittwoch, 14. Oktober 2020 10:24
An: Development list for mkgmap
Betreff: Re: [mkgmap-dev] Resurrect adjust-turn-headings

Hi Gerd

I've been looking at turn pop-ups and routing decisions and attach a
patch that makes improvements:

Move decision about when to use compactDir initialHeadings from
RouteNode to AngleChecker.
The current code checks if any headings from a RouteNode share the same
compactDir/4-bit sector and, if so, revert to the full/8-bit value.
Overlaid roads triggered this, also sharp angles that couldn't be
widened, probably when many paths converge at a road.

AngleChecker::fixSharpAngles was coded on the basis that compactDirs
are used and it tested/increased angles based on this 4-bit step, but
if these are then represented in 8-bit format, the encode angle could
be much (up to 22.5 degrees) less that the code was expecting and
result in turning delays in route calculations.

Recode fixSharpAngles to work in degrees but choose the thresholds to
be good for compactDirs. Test the resultant angles and only use
compactDirs if there are no roads in the same or adjacent 4-bit
sectors.
Not allowing Adjacent is necessary because, in compactDirs format, if
there is a path in the opposite sector to the road and the road
continuation is the adjacent sector, Garmin gives a "turn to stay on
road" pop-up, but with 8-bit headings it doesn't. This is slightly
different from the following case because this concerns an angle that
doesn't need to be "unsharpened" as it isn't permitted for vehicles to
make this turn.

When increasing an angle, change the heading of the lower class/speed
road in preference to the major road.
This helps prevent the "turn to stay on road" type pop-ups when the
lead-off road was more straight-on than the main road and one-way
tagging possibly missing.

Handle simple (<= 2 RouteArcs) RouteNodes as special cases, giving
slight efficiency improvements.

Add some diagnostics for showing RouteNodes and RouteArcs in an area.

Tidy up normalisation of headings.

Fix some bugs.

Ticker



More information about the mkgmap-dev mailing list