I found some code to calculate the distance between two lat/lon coordinates here:

http://www.zipcodeworld.com/samples/distance.pl.html

Pretty geeky stuff, but easy to incorporate it into our code and this is what I got out of the sample data I'm using in the code previously posted:

(distance is in miles, and elevation has been converted to feet)

Distance between lines 1 and 2: 0.00196259979104037 :: Elevation Difference: 3.14960630400012
Distance between lines 2 and 3: 0.00511218802656558 :: Elevation Difference: 12.6312336149999
Distance between lines 3 and 4: 0.0035948343884507 :: Elevation Difference: 4.72440945599999
Distance between lines 4 and 5: 0.000834205282553515 :: Elevation Difference: 1.57480315199987

Total Distance calculated without elevations accounted for is 0.0115038274886102

What would it be with the elevations provided above?

_________________________
--

"You want to go where?"