
Firstly, thanks for the great work so far. Having been using my 605 for the past few weeks I've noticed something that was first mentioned a few weeks ago by someone else but was in the midst of a flurry of activity so I thought I'd bring it up again as I too have noticed this. When following a route if you go off course you seem to have to travel quite a way off course before the device re-calculates. I don't know whether this is related to Garmin, my 605, mkgmap or something else so thought it worth mentioning. http://openstreetmap.org/?lat=53.50969&lon=-2.31557&zoom=15&layers=B000FTF I was recently following a route on my 605 and travelling down Newhey Road to the A640 where I had to turn right at the A640 and come back to the roundabout. I ignored this route and turned right along Ladyhouse Lane instead. At the end I turned left and approached the roundabout from the opposite direction to the given route. At no point did the device recalculate such that when I arrived at the roundabout I was given the instruction to take the first exit which is obviously wrong. The "Pink Line" showed me that the first exit was not what I wanted and I could see my actual approach was different to the given approach on the live map screen but I would have expected a recalculation before this occurred. Cheers Paul

Paul schrieb:
When following a route if you go off course you seem to have to travel quite a way off course before the device re-calculates. I don't know whether this is related to Garmin, my 605, mkgmap or something else so thought it worth mentioning.
I have made the same observation with my Nuevi. If I use the pre-installed city navigator maps, it detects nearly instantly, when you leave the precalculated route. If I use on the same device an OSM-map created with mkgmap, you need to travel approx. 100m away from the road, before the deviation is detected. Gruss Torsten

That should have been http://openstreetmap.org/?lat=53.60361&lon=-2.10689&zoom=16&layers=B000FTF Paul

Yes, I (and some others on this list) ve seen the same behaviour. If I leave the calculated route, then the distance has to get bigger than ~260m before recalculating starts. Tested on my etrex Venture. If I use the original garmin maps, then recalculation starts nearly immediately at entering the wrong route. So it has clearly to do with the mkgmap created maps.

I do confirm that too (Nüvi 660T). Paul -- Don't take life too seriously; you will never get out of it alive. -- Elbert Hubbard

Paul Ortyl wrote:
I do confirm that too (Nüvi 660T).
Paul
I raised a comment about this quite a while back on the Wiki pages for mkgmap. As far as I've seen, no-one has the faintest idea what's going on. I postulated that street widths ought to be a variable setting in Garmin's routable-map files, but it seems no-one's yet worked out how to set it. A question please: does anyone know if the behaviour is "correct" with maps built using the 'cGPSmapper' program or the http://mapcenter.cgpsmapper.com/ web-page that provides an online version of its functionality? I've never been able to get this page to work for me - has anyone else been luckier? Steve

This behavior is "correct" with maps created with cgpsmapper (including those at mapcenter2). Only last week they found a breakthrough on this - http://malfreemaps.com/viewtopic.php?p=22936#p22936. I'm not sure if Stan has released the updated version of cgpsmapper yet. Another problem solved is the left-hand traffic roundabout display issue on Nuvi and MobileXT (see attached pic) http://malfreemaps.com/viewtopic.php?p=26047#p26047. Not sure if this also correctly identify "u-turn" as opposed to "turn-right, turn-right" instruction. nyem Steve Hosgood wrote:
Paul Ortyl wrote:
I do confirm that too (Nüvi 660T).
Paul
I raised a comment about this quite a while back on the Wiki pages for mkgmap. As far as I've seen, no-one has the faintest idea what's going on. I postulated that street widths ought to be a variable setting in Garmin's routable-map files, but it seems no-one's yet worked out how to set it.
A question please: does anyone know if the behaviour is "correct" with maps built using the 'cGPSmapper' program or the http://mapcenter.cgpsmapper.com/ web-page that provides an online version of its functionality? I've never been able to get this page to work for me - has anyone else been luckier?
Steve

Hi, thats interesting news. Is there any info what has to be changed ? I just did a quick compare in some of the img headers between the following maps: http://www.malfreemaps.net/MFMv150.exe http://www.malfreemaps.com/download/MFM-Litev146.zip I didn't found a download link for MFMv145.exe so I just used the lite version. - The NET header has grown from 55 to 100 bytes. Some 1 have been added there. - In the NOD Header I noticed that the static 0x27 flag changed to 0x0303 I added this stuff to mkgmap but at least in simulation mode I think calculation speed is just the same like before on my nuvi 360. Anyway I have attached the patch. Maybe I have just made a small mistake ... Thanks Berni.
This behavior is "correct" with maps created with cgpsmapper (including those at mapcenter2). Only last week they found a breakthrough on this - http://malfreemaps.com/viewtopic.php?p=22936#p22936. I'm not sure if Stan has released the updated version of cgpsmapper yet.
Index: mkgmap/src/uk/me/parabola/imgfmt/app/net/NETHeader.java =================================================================== --- mkgmap/src/uk/me/parabola/imgfmt/app/net/NETHeader.java (revision 314) +++ mkgmap/src/uk/me/parabola/imgfmt/app/net/NETHeader.java (working copy) @@ -29,7 +29,7 @@ * @author Steve Ratcliffe */ public class NETHeader extends CommonHeader { - public static final int HEADER_LEN = 55; // Other lengths are possible + public static final int HEADER_LEN = 100; //55; // Other lengths are possible private static final char SORTED_ROAD_RECSIZE = 3; @@ -89,6 +89,9 @@ writer.putInt(0); writer.put((byte) 1); writer.put((byte) 0); + writer.putInt(0); + writer.put((byte) 1); + writer.putInt(0x01000000); } ImgFileWriter makeRoadWriter(ImgFileWriter writer) { Index: mkgmap/src/uk/me/parabola/imgfmt/app/net/NODHeader.java =================================================================== --- mkgmap/src/uk/me/parabola/imgfmt/app/net/NODHeader.java (revision 314) +++ mkgmap/src/uk/me/parabola/imgfmt/app/net/NODHeader.java (working copy) @@ -62,7 +62,8 @@ nodes.writeSectionInfo(writer); // now sets 0x02 (enable turn restrictions?) - writer.putInt(0x27); + //writer.putInt(0x27); + writer.putInt(0x0303); writer.putChar(align); writer.putChar((char) (align - 1));

Bernhard Heibler wrote:
Hi,
thats interesting news. Is there any info what has to be changed ? I just did a quick compare in some of the img headers between the following maps:
http://www.malfreemaps.net/MFMv150.exe http://www.malfreemaps.com/download/MFM-Litev146.zip
I didn't found a download link for MFMv145.exe so I just used the lite version.
You can try http://www1.mmu.edu.my/~fmchong/MFM/MFMv146.exe - nyem

Hi,
Another problem solved is the left-hand traffic roundabout display issue on Nuvi and MobileXT (see attached pic) http://malfreemaps.com/viewtopic.php?p=26047#p26047. Not sure if this also correctly identify "u-turn" as opposed to "turn-right, turn-right" instruction.
Sorry, can you tell me what the problem is that gets fixed by this change? Thanks, Mark

Hi, I'm not sure if the issues have been raised here, so I'll try my best to explain. This is a problem only when the map is for left-hand drive users. Issue 1: Incorrect roundabout display http://www.mkgmap.org.uk/pipermail/mkgmap-dev/attachments/20090329/6a4b873f/... This only affect the information display on the top-left corner of my MobileXT screen - the roundabout should be clockwise not counter-clockwise. Routing correctly follows road direction. Issue 2: Incorrect U-turn identification http://www.yournavigation.org/?flat=3.08947&flon=101.54504&tlat=3.08836&tlon... Here is a u-turn but the driving direction will say "Turn right onto road, Turn right onto road" instead of "Perform a u-turn" http://www.yournavigation.org/?flat=3.08894&flon=101.54504&tlat=3.08763&tlon... Here is turning left from a main road into a residential road and taking another left turn - but my Garmin incorrectly detects this as a u-turn. If my avoidance option includes avoid u-turn, routing will ignore this route. When I apply the change u-turns are correctly identified, and the roundabout info display correctly shows traffic direction. - nyem Mark Burton wrote:
Hi,
Another problem solved is the left-hand traffic roundabout display issue on Nuvi and MobileXT (see attached pic) http://malfreemaps.com/viewtopic.php?p=26047#p26047. Not sure if this also correctly identify "u-turn" as opposed to "turn-right, turn-right" instruction.
Sorry, can you tell me what the problem is that gets fixed by this change?
Thanks,
Mark

Hi Nyem, Many thanks for the explanation. One question: if the change from 0x27 to 0x0327 is applied, what effect does it have for people who drive on the right? Cheers, Mark
Hi,
I'm not sure if the issues have been raised here, so I'll try my best to explain. This is a problem only when the map is for left-hand drive users.
Issue 1: Incorrect roundabout display
http://www.mkgmap.org.uk/pipermail/mkgmap-dev/attachments/20090329/6a4b873f/... This only affect the information display on the top-left corner of my MobileXT screen - the roundabout should be clockwise not counter-clockwise. Routing correctly follows road direction.
Issue 2: Incorrect U-turn identification
http://www.yournavigation.org/?flat=3.08947&flon=101.54504&tlat=3.08836&tlon... Here is a u-turn but the driving direction will say "Turn right onto road, Turn right onto road" instead of "Perform a u-turn"
http://www.yournavigation.org/?flat=3.08894&flon=101.54504&tlat=3.08763&tlon... Here is turning left from a main road into a residential road and taking another left turn - but my Garmin incorrectly detects this as a u-turn. If my avoidance option includes avoid u-turn, routing will ignore this route.
When I apply the change u-turns are correctly identified, and the roundabout info display correctly shows traffic direction.
- nyem
Mark Burton wrote:
Hi,
Another problem solved is the left-hand traffic roundabout display issue on Nuvi and MobileXT (see attached pic) http://malfreemaps.com/viewtopic.php?p=26047#p26047. Not sure if this also correctly identify "u-turn" as opposed to "turn-right, turn-right" instruction.
Sorry, can you tell me what the problem is that gets fixed by this change?
Thanks,
Mark
mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

I have no idea what garmin software would do, my guess is it would be the reverse of what we get here. Can Mkgmap guess if a map is in left-hand drive countries? probably by detecting roundabout direction if it is running clockwise. - nyem Mark Burton wrote:
Hi Nyem,
Many thanks for the explanation. One question: if the change from 0x27 to 0x0327 is applied, what effect does it have for people who drive on the right?
Cheers,
Mark
Hi,
I'm not sure if the issues have been raised here, so I'll try my best to explain. This is a problem only when the map is for left-hand drive users.
Issue 1: Incorrect roundabout display
http://www.mkgmap.org.uk/pipermail/mkgmap-dev/attachments/20090329/6a4b873f/... This only affect the information display on the top-left corner of my MobileXT screen - the roundabout should be clockwise not counter-clockwise. Routing correctly follows road direction.
Issue 2: Incorrect U-turn identification
http://www.yournavigation.org/?flat=3.08947&flon=101.54504&tlat=3.08836&tlon... Here is a u-turn but the driving direction will say "Turn right onto road, Turn right onto road" instead of "Perform a u-turn"
http://www.yournavigation.org/?flat=3.08894&flon=101.54504&tlat=3.08763&tlon... Here is turning left from a main road into a residential road and taking another left turn - but my Garmin incorrectly detects this as a u-turn. If my avoidance option includes avoid u-turn, routing will ignore this route.
When I apply the change u-turns are correctly identified, and the roundabout info display correctly shows traffic direction.
- nyem
Mark Burton wrote:
Hi,
Another problem solved is the left-hand traffic roundabout display issue on Nuvi and MobileXT (see attached pic) http://malfreemaps.com/viewtopic.php?p=26047#p26047. Not sure if this also correctly identify "u-turn" as opposed to "turn-right, turn-right" instruction. Sorry, can you tell me what the problem is that gets fixed by this change?
Thanks,
Mark

nyem wrote:
I have no idea what garmin software would do, my guess is it would be the reverse of what we get here. Can Mkgmap guess if a map is in left-hand drive countries? probably by detecting roundabout direction if it is running clockwise.
I need to check the orientation of a polygon for a patch I'm currently working on so I thought I would post the code for this here in case somebody needs to check the orientation of a roundabout. think it only makes sense to check the orientation for a MapShape so you'll need to create a temporary MapShape from the MapRoad and check the orientation from that object. Cheers, Ben diff --git a/src/uk/me/parabola/mkgmap/general/MapShape.java b/src/uk/me/parabola/mkgmap/general/MapShape.java index 8845db3..e9f15eb 100644 --- a/src/uk/me/parabola/mkgmap/general/MapShape.java +++ b/src/uk/me/parabola/mkgmap/general/MapShape.java @@ -56,6 +57,54 @@ public class MapShape extends MapLine {// So top code can link objects from here return this.poiType; } + public boolean isClockwise() { + // from http://cgafaq.info/wiki/Simple_Polygon_Orientation: + // "Find the lowest vertex (or, if there is more than one vertex with the same lowest + // coordinate, the rightmost of those vertices) and then take the cross product of + // the edges fore and aft of it." + List<Coord> points = this.getPoints(); + if (points.size() < 3) // arbitrarily say that a single line segment is clockwise + return true; + + Coord lowest = new Coord(Integer.MIN_VALUE, Integer.MAX_VALUE); + int lowestIndex = -1, i = 0; + for (Coord coord : points) { + if (coord.getLongitude() < lowest.getLongitude() || + (coord.getLongitude() == lowest.getLongitude() && coord.getLatitude() > lowest.getLatitude())) { + lowest = coord; + lowestIndex = i; + } + i++; + } + + // find before and after points dealing with start/end points and closed/open ploygons + Coord beforeLowest, afterLowest; + if (lowestIndex == 0) { + beforeLowest = points.get(points.size()-1); + if (lowest.equals(beforeLowest)) + beforeLowest = points.get(points.size()-2); + afterLowest = points.get(1); + } else if (lowestIndex == points.size() - 1) { + afterLowest = points.get(0); + if (lowest.equals(afterLowest)) + afterLowest = points.get(1); + beforeLowest = points.get(points.size() - 2); + } else { + beforeLowest = points.get(lowestIndex - 1); + afterLowest = points.get(lowestIndex + 1); + } + + // calculate vectors + Coord a = new Coord(beforeLowest.getLatitude() - lowest.getLatitude(), beforeLowest.getLongitude() - lowest.getLongitude()); + Coord b = new Coord(lowest.getLatitude() - afterLowest.getLatitude(), lowest.getLongitude() - afterLowest.getLongitude()); + + // from http://en.wikipedia.org/wiki/Cross_product: + // a × b = (a2b3 − a3b2, a3b1 − a1b3, a1b2 − a2b1) + // since the two vectors are in the same plane, we only need to calculate + // the z value and check the sign + return (a.getLatitude()*b.getLongitude() - a.getLongitude()*b.getLatitude()) > 0; + } + /** * Checks if a point is contained within this shape. Points on the * edge of the shape are considered inside.
participants (10)
-
Ben Konrath
-
Bernhard Heibler
-
Johann Gail
-
Mark Burton
-
nyem
-
nyem
-
Paul
-
Paul Ortyl
-
Steve Hosgood
-
Torsten Leistikow