Unfortunately, path length cannot be calculated directly from total horizontal and total vertical distance (unless you're moving on a perfectly straight line), so you'd have to calculate the increment gained each time the GPS collects data (say, every 30 seconds, or so?), and add up the result:


delta_x = horizontal distance
delta_z = vertical distance

pathlength += Sqrt[ delta_x^2 + delta_z^2 ]