logo separator

[mkgmap-dev] Problem in AngleFixer?

From Ticker Berkin rwb-mkgmap at jagit.co.uk on Tue Aug 13 17:57:04 BST 2024

Hi Thorsten

This is different from what I'm getting (after adjustments to get compatible
class & speed):

sharp angle 15.375715 ° at 49.478507,10.942814 headings 328° 343° speeds 3 3
classes 2 1
decreasing arc with heading 328° by 30.624285

Can you check {yourbase}/src/uk/me/parabola/imgfmt/app/net/AngleChecker.java
around line 379 you have:
<<<
// Hoping sameWay before road_class fixing more problems than it might cause
if (chooseWhich == 0) {
	// if the two arcs either side of the sharp angle belong to the same
	// way then change the arc on the other side hoping to trigger
	// the correct turn-instruction
	ag0 = arcGroups.get ...
	ag3 = n == 3 ? ...
	if (ag2.sameWay(ag3))
		chooseWhich = -1;
	else if (ag1.sameWay(ag0))
		chooseWhich = +1;
	}
if (chooseWhich == 0)
	chooseWhich = ag1.maxRoadClass - ag2.maxRoadClass;
>>>
as from AngleChecker_v3.patch and this is the version you've build and tested.

If it is all correct then I'll need to add more diagnostics to see if the
internal ways have been manipulated.

Concerning the second example, I hope we've got good and consistent
representations of all the RouteNode angles in the two formats in the garmin
.img file and, generally, we get the turn-instructions expected but we don't
know the rules for these.

Your examples where the turn-instructions are not what you expect are explicable
because the other road is more straight-on than the way continuation.
AngleChecker sometimes made this worse when giving junction RouteNode geometry
that is different from reality to avoid garmin applying massive time penalties
to some turns.

Regards
Ticker

On Tue, 2024-08-13 at 17:06 +0200, Thorsten Kukuk wrote:
> 
> Hi Ticker,
> 
> Am 2024-08-12 13:14, schrieb Ticker Berkin:
> > Really sorry, previous patch was wrong. Correct one attached
> 
> Sorry, but for https://www.openstreetmap.org/#map=18/49.47851/10.94281 
> this has still no effect.
> But I think I found the problem.
> 
> The part from the log file is:
> sharp angle 15.375715 ° at 49.478507,10.942814 headings 328° 343° speeds 
> 2 2 classes 2 1
> increasing arc with heading 343° by 30.624285
> 
> The other sharp angle a few meters away 
> (https://www.openstreetmap.org/#map=19/49.47966/10.94146),
> which works, has:
> sharp angle 40.094727 ° at 49.479659,10.941464 headings 132° 172° speeds 
> 2 2 classes 2 2
> increasing arc with heading 172° by 2.3486972
> decreasing arc with heading 132° by 3.5565763
> 
> Difference: in the first case, the heading is >> 180°
> In the second case, it's < 180°.
> 
> So I did go through the log and tested some more cases:
> If the heading is >> 180°, the navigation instruction is wrong.
> If the heading is < 180°, the navigation instruction is correct.
> 
> Looks like if an angle is >> 180°, we have to code another one in the 
> map.
> 
> Regards,
> Thorsten
> 
> > Ticker
> > 
> > 
> > _______________________________________________
> > mkgmap-dev mailing list
> > mkgmap-dev at lists.mkgmap.org.uk
> > https://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
> _______________________________________________
> mkgmap-dev mailing list
> mkgmap-dev at lists.mkgmap.org.uk
> https://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev



More information about the mkgmap-dev mailing list