OpenStreetMap

Garmin Routing Algorithm?

Posted by backpacking philippines on 22 January 2011 in English (English)

as a former internetwork engineer specialized in network routing (before I switched to my present career in information security), i'm intrigued at the routing algorithm used by Garmin to compute the route for a certain destination.

with my recent experiments, i'm pretty sure the highway tag has more weight than the total distance against "lesser ranked" ways

my recent example is La Funeraria Paz in QC from Makati. Garmin wanted to route me to Buendia, quirino highway, nagtahan espana then quezon avenue

a few kilometers farther than the way via mandaluyong, san juan then sta mesa where araneta avenue is located.

i would love OSMers to revisit the way tagging convention to force garmin to show the quickest way. note from baguio to QC, it's still via macarthur highway and not via SCTEX-NLEX last time I checked, perhaps it's the link roads to the tollways should be upgraded so that garmin can easily route through it.

I think garmin looks for the nearest motorway-trunk-primary links then use the lesser ranked roads to route...just how much the weight considered is hard to know unless someone from garmin will publish the algorithm

Comment from z-dude on 22 January 2011 at 04:46

You'll probably find that their algorithm varies from year to year to accomodate new features like environmental drives, bikes, pedestrians.

I think the Basemap is involved in calculating long routes. When I had 'route calculation errors' from routing with a OSM map, I found the basemap mentioned when I google'd the 'route calculation error' issue.

I also had issues with bike routing when I had a 2.8 Gigabyte OSM map, and the routing issues (it routed me 200 kms extra through Pemberton instead of to the north side of Lions Bay) to my destination disappeared when I replaced that map and used a 226 megabyte map for my local area instead. So, I think the way the .IMG file is created can play a role in routing.

What I think will happen, is that Garmin will realize that their device sales in poorly mapped areas is increasing because there are now more detailed maps for places like Haiti, Bamako, the Phillipines, etc, and change their algorithm to support the existing state of the map.

Hide this comment

Comment from maning on 22 January 2011 at 04:48

Garmin classifies road according to:
- road class - the class of the road where 4 is the best roads eg. motorways and 0 are residential roads etc.
- road speed - an indication of how fast traffic on the road is. 0 is the slowest and 7 the fastest.

Along with road length, Gamin combines these criteria in an algorithm for selecting the route for you. Other have observed that the road class is the primary consideration.

As to the Macarthur vs Expressways, I think there are problems with the data here. You may also be correct that motorway_links maybe part of the issue here.

Hide this comment

Comment from Richard on 22 January 2011 at 11:05

You should join the mkgmap mailing list to discuss Garmin routing: http://www.mkgmap.org.uk/pipermail/mkgmap-dev/

But bear in mind that there's no chance of OSM "revisiting the way tagging convention". OSM tags for OSM. It's up to third-party utilities such as mkgmap to interpret that in any way they see fit. If mkgmap wants to upgrade the priority of link roads, it can do so without requiring mappers to change what they do.

Hide this comment

Comment from chriscf on 22 January 2011 at 19:37

Taking road class into account means that when the trunk/primary through town has a speed limit of 50mph on mostly-straight roads while the unclassified country lane with lots of tight bends and steep hills falls under the national limit of 60mph, the router keeps you on the main road.

If the router takes speed into account but none is specified, it will have to make assumptions about the speed which may not make sense. Check the routes to see if they have maxspeed= values set, and if they match the actual speed limits on the ground.

Hide this comment

Comment from backpacking philippines on 23 January 2011 at 00:24

thanks for all your replies, i will look closely at this to get a better picture of the algorithm where road class, distance, max speed, lanes, and other factors come into play to compute the "best" route.

as much as i want to make it tweakable, garmin has its proprietary algorithm that i can't tweak (like what I used to do to my telco/ISP Internet routing table to optimize)

my example: MacArthur Highway is a trunk linked to EDSA, another trunk but it's a low way.

SCTEX and NLEX are both tollways connected by a link road (not sure of the croad class) to MacArthur and EDSA and much faster. (@maning, after turning to SCTEX the routing's perfect from there)

I just wish there's a software simulator for tests like this though :P

Hide this comment

Comment from Vclaw on 23 January 2011 at 02:01

What Garmin device are you using? I think different types of Garmins will calculate routes differently.
And what routing settings are you using? eg is it set for shorter or faster routes, and what vehicle type?

For a software simulator, you could try Garmin Mapsource. Its possible to download it for free, and use OSM maps in it.
Then you can use it for calculating routes, and trying different settings. Though it probably uses a different routing algorithm from the Garmin devices.

Hide this comment

Comment from backpacking philippines on 23 January 2011 at 16:01

vclw, garmin nuvi 1300 here for car and fuel savings config. i do use mapsource but noticed the route calculations different from the nuvi even if they're both from garmin :(

Hide this comment

Leave a comment

Parsed with Markdown

  • Headings

    # Heading
    ## Subheading

  • Unordered list

    * First item
    * Second item

  • Ordered list

    1. First item
    2. Second item

  • Link

    [Text](URL)
  • Image

    ![Alt text](URL)

Login to leave a comment