How is the distance calculated for a GPX?

First of all you don't need to take my question litteraly.  I'm just wondering how it's possible there is a difference in distance for the same route.  I made a route for my Suunto on their site and the distance is 50km81.  Then I downloaded the GPX and uploaded it on Garmin Connect and their the distance is 50km91.  So a difference of 100m or about 2m per km (checked it with a 15km course and for this one it was also around 2m).  I could understand the difference if I would have created the route on Garmin Connect also by clicking points, but I would normally assume the distance must be the same since a GPX is just a list of coordinates.  I would say they on of them calculates with more numbers behind the "comma" or "point"  but then you would get sometimes a longer distance but also sometimes a shorter distance and this would level it out on the end.  But apprentely that's not the case.

As a test I also made a straight line of 10km on the Suunto site and exported it as GPX.  Then I imported it in Garmin Connect.  Imagine my surprise when Garmin Connect indicated this is a 20km06 long course. Yes twenty km.

  • A route is defined in GPX as discrete lat/lon coordinates at time increments, i.e. the route is only a polygon, not a continuous curve. The size of the time increments for recording can be selected at some Garmin watches to be 1 sec or smart recording. For calculating the distances between 2 lat/lon's there are many different formulas available, some are more exact that others. If you run a sharp turn, usually one point lies before the corner and the next after the corner, but there isn't a point exactly at the corner. Therefore some interpolation, smoothing and other corrections of the route are necessary. Every software use its own interpolation and smoothing algorithms. And of course, as already mentioned, the accuracy of the calculation in decimal digits plays also a role. So there are differences in the distance, but differences <3% are beyond reproach.

    Imagine my surprise when Garmin Connect indicated this is a 20km06 long course. Yes twenty km.

    Is it possible that you have exported or imported the same route twice?

  • I didn't import the same route twice.  But as you can see the "first" 10km are within a few metres of the start.

  • It seems that there is an error in the GPX file. To solve this issue have a look into the GPX and analyze what is going wrong.

  • I've downloaded the GPX from Garmin Connect also.  In both GPX-files there are 2 coordinates and they are identical.  I did the same thing with a straight line of 288km and itlso doubled in distance on Garmin Connect.  I also did the same thing using Alltrails and it also doubled in distance

  • I made a route for my Suunto on their site and the distance is 50km81.  Then I downloaded the GPX and uploaded it on Garmin Connect and their the distance is 50km91.  So a difference of 100m or about 2m per km (checked it with a 15km course and for this one it was also around 2m).

    I don't understand why this isn't doubled.

  • I made a triangle route (682km) and on Garmin Connect it's 938km.  When I made the same route in the other direction it's 887km.  It seems the last straight line is counted twice.

  • I recommend don't artificial generate a route by a program. Rather use a real route from an activity that you have run or rided by bike and look what happens. Is the distance also doubled?

  • It's not doubled but it's also a bit more then then original distance (20km02 >< 20km04).

  • This discussion has been around for decades...

    If you take the exactly same "activity/file/route" and open it in different apps/softwares you'll get different figures in each one of them. Even within Garmin's own products i.g.:

    you see a number in your watch (or gps)

    than you get other numbers of the same file at Garmin Connect and finally

    if you open the same file using Garmin Basecamp it will give you other numbers...

  • Yes that's true, but all calculators say 1+1 is 2 (not taking into account the binary system).  Making a comparison between what you say and calculators some apps/softwares would answer 1,9999... and others 2,00000...1.  But Garmin connect answers not 1,999... or 2,000...1 or even 2 for a straight line it answers 3.  What I'm saying is a difference of 2m/km (1,9999... 2,0000...1) can be explained with what you're saying, but the doubling of a/(the last) straight line is not a matter of the degree of accuracy or how far you go with your calculation that's to me a serious flaw in their software.

    PS The problem of the doubling doens't exist in Basecamp