GPS Distance calculator

http://en.wikipedia.org/wiki/Great-circle_distance

if distances are small, and in hilly terrain, you need lat/lon and elevation at each point.

Lots of code 'round the 'net for this math.