Originally Posted By billstephenson

Let's go back to that.

That math is way over my head but writing the code to use is not. I'll have to take a look at the data file my GPS exports, but if it does record elevation with the lat/long in the track logs then could you write a formula to account for that?

I should point out that I don't think it's beyond the GPS/GIS technologies capability to do what Gershon wants, it's just not how it is approached and implemented. There are some logical reasons behind the approach used.

But for our purposes, the total distance walked would be more accurate if it included the difference in elevation between the points. And knowing the total ups and downs, which I can do if the elevation is there, would also be interesting to know.



Sure... The equation for linear distance between two points in 3-d space is:

d = sqrt(deltax^2 + deltay^2 + deltaz^2)

you would calculate deltax as the difference in latitude between points, deltay as the difference in longitude, and deltaz as the difference in elevation.

That would be the linear approach (assuming you walked in a straight between successive points). I could develop an algorithm the plots a smooth curve over all the data points and then calculates distance traveled from their. I'd have to think about that a bit more. In 2-d space it would be called a cubic spline.