I would like to add that when I rode the generated file I quickly
realized the distance was not 51 miles, but rather 51 km. Anyway, this
was Greg's response to my issue that I thought I would put here to see
if anyone has some good ideas:
Eric,
The GPX distance isn't encoded in the file, we calculate the distance
based on the GPS information in the file. We are using the haversine
formula to figure out the distance.
http://en.wikipedia.org/wiki/Haversine_formula
I have re-implemented the distance calculation using slightly
different constants from this website:
http://blog.julien.cayzac.name/2008/10/arc-and-distance-between-two-points-on.html
But, it didn't fix the 10% error.
I had a hunch that your file didn't have enough data to be accurate.
The file only had 816 track points, and the Haversine formula does a
point to point calculation. Thus, it doesn't follow the road. I took
a few of my tcx files that are sampled every second and converted them
to gpx files (using
connect.garmin.com). The result was an error >
20%. It got worst!!!
Hmmm. I am out of ideas at this point. If there is a GPS expert and/
or math/trig whiz... Please help us out... The mapmyride and garmin
connect websites get the correct mileage from the gpx files.
Sorry,
Greg