logo separator

[mkgmap-dev] [PATCH] route recalculation sensitivity

From Steve Hosgood steve at tallyho.bc.nu on Mon Apr 6 13:29:46 BST 2009

Bernhard Heibler wrote:
> Hi,
>
> I think I found the required bits. Seems to be the flag at 0x43 in the
> TRE header....
Tell you what, the code that handles the bytes at 0x47 and 0x48 looks
flawed to me.
Assuming 0x47 and 0x48 are a 16-bit number, mkgmap sets it to a constant
'1':

        writer.putInt(0x110301);

        writer.putChar((char) 1);

        writer.put((byte) 0);

        polyline.writeSectionInfo(writer);


But looking at Garmin's own maps, I see a variety of numbers coded here
in the range 0x4AE to 0x590....
(The following is a dump of the bytes at 0x43-0x46 and 0x47-0x4A
interpreted at 32-bit LE numbers)

Found  0: 0x110301 0x31000544

Found  1: 0x110301 0xC3000490

Found  2: 0x110301 0x8F0004CA

Found  3: 0x110301 0x03000564

Found  4: 0x110301 0xF3000590

Found  5: 0x110301 0xDF000524

Found  6: 0x110301 0x1D000505

Found  7: 0x110301 0x94000537

Found  8: 0x110301 0x0000053F

Found  9: 0x110301 0x3E000540

Found 10: 0x110301 0x5E00052F

Found 11: 0x110301 0x06000512

Found 12: 0x110301 0x2E0004F8

Found 13: 0x110301 0xCE0004FF

Found 14: 0x110301 0x880004EC

Found 15: 0x110301 0x320004F1

Found 16: 0x110301 0x9C0004BC

Found 17: 0x110301 0x240004F7

Found 18: 0x110301 0xA600050D

Found 19: 0x110301 0x040004CD

Found 20: 0x110301 0xBC0004EF

Found 21: 0x110301 0x36000526

Found 22: 0x110301 0x080004D6

Found 23: 0x110301 0x100004AE

Found 24: 0x110301 0x000004D8


So we see that Garmin themselves use 0x110301 at 0x43(!), it seems bytes
0x47-0x48 are a 16-bit number and presumably 0x49-0x410 are what mkgmap
gets from the call to "polyline.writeSectionInfo(writer);". The document
I have (John Mechalas, 2005) claims that 0x49 is actually constant '0'
and that the byte at 0x4A is the "Offset of Polyline Overview Section TRE4".


Steve








More information about the mkgmap-dev mailing list