logo separator

[mkgmap-dev] Resurrect adjust-turn-headings

From Ticker Berkin rwb-mkgmap at jagit.co.uk on Wed Oct 14 09:24:09 BST 2020

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

-------------- next part --------------
A non-text attachment was scrubbed...
Name: arcHeading.patch
Type: text/x-patch
Size: 29770 bytes
Desc: not available
URL: <http://www.mkgmap.org.uk/pipermail/mkgmap-dev/attachments/20201014/e063c8a5/attachment-0001.bin>


More information about the mkgmap-dev mailing list