Take the 2-minute tour ×
Mathematics Stack Exchange is a question and answer site for people studying math at any level and professionals in related fields. It's 100% free, no registration required.

Imagine a person takes a walk through some hilly territory, and they record their elevation at intervals as they go.

How would you calculate their total ascent, given that there is some error in the data? Your algorithm should count ascent gain when they walk up a hill, but probably not if they undulate up and down a bit on the path or due to GPS error.

If you count every foot of elevation gain, then you will end up with an unrealistically large ascent.

share|improve this question
Is there a problem with just taking the difference of the elevations at the beginning and the end of the walk? –  Rahul Feb 7 '12 at 20:15
What if they go up and down 3 hills? I think maybe the algorithm should be taking critical altitude changes of a given tolerance. –  Andrew Johnson Feb 7 '12 at 22:14
add comment

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.