logo separator

[mkgmap-dev] [Patch v1] curve bytes

From Gerd Petermann gpetermann_muenchen at hotmail.com on Wed Feb 12 15:40:23 GMT 2014

Hi Steve,

the major error was caused by a last minute change, another one by wrong masking.
Please check attached v2 of the patch. I still see error messages regarding ratio and 
bearing, but they may be caused by the different precisions.
How sure are you about these threshold values in NodCheck?
            double v = 30.0;
            int calcRatio = (int) Math.round(v * direct / path) & 0x1f;
            if (calcRatio > 26)
                calcRatio = 0;

Gerd

From: gpetermann_muenchen at hotmail.com
To: mkgmap-dev at lists.mkgmap.org.uk
Date: Wed, 12 Feb 2014 14:39:21 +0100
Subject: Re: [mkgmap-dev] [Patch v1] curve bytes




Hi Steve,

yes,  I just found this as well. The remaining errors all have ratio = 7, looking at this now.

Gerd

> Date: Wed, 12 Feb 2014 13:37:43 +0000
> From: steve at parabola.me.uk
> To: mkgmap-dev at lists.mkgmap.org.uk
> Subject: Re: [mkgmap-dev] [Patch v1] curve bytes
> 
> On 12/02/14 10:46, Gerd Petermann wrote:
> > @@ -80,22 +88,27 @@
> >   		this.roadDef = roadDef;
> >   		this.source = source;
> >   		this.dest = dest;
> > -		this.initialHeading = initialHeading;
> > -		this.finalHeading = finalHeading;
> > -		this.length = convertMeters(length);
> > +		this.initialHeading = (float) initialBearing;
> > +		this.finalHeading = (float) finalBearing;
> > +		this.directHeading = (float) directBearing;
> > +		this.length = convertMeters(length);
> >   		this.curveEnabled = curveEnabled;
> >   		this.pointsHash = pointsHash;
> > +		int encodedDirectLength = convertMeters(source.getCoord().distance(dest.getCoord()));
> > +		
> > +		lengthRatio = (byte) ((int)Math.round(32.0 * encodedDirectLength / length) & 0x1f);
> 
> This (above) should use this.length, not length
> 		
> > +		haveCurve = curveEnabled && lengthRatio > 0;
> >   	}
> 
> That fix makes leaves me with just a small number of ratio errors.
> 
> ..Steve
> _______________________________________________
> mkgmap-dev mailing list
> mkgmap-dev at lists.mkgmap.org.uk
> http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
 		 	   		  

_______________________________________________
mkgmap-dev mailing list
mkgmap-dev at lists.mkgmap.org.uk
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.mkgmap.org.uk/pipermail/mkgmap-dev/attachments/20140212/4cc6888e/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: curvebytes-v2.patch
Type: application/octet-stream
Size: 12616 bytes
Desc: not available
URL: <http://www.mkgmap.org.uk/pipermail/mkgmap-dev/attachments/20140212/4cc6888e/attachment-0001.obj>


More information about the mkgmap-dev mailing list