Michael Jay Lissner
  • Home
  • About Site
  • Contact
  • Projects & Papers
  • Tags
  • Archives

Calculating the average elevation of a trip using a TCX file

If you use a site like ridewithgps, something you may want to know is how to calculate the average elevation for a trip. Unfortunately, most sites don’t seem to provide this, so we have to do a little hacking.

Here’s what worked for me:

  • download the GPS TCX file
  • grep out the altitude lines (grep -i 'altitude' your_file.tcx)
  • find & replace out the remaining XML tags and whitespace using a basic text editor
  • average the remaining values in a spreadsheet

Takes about five minutes. For my trip the number came out to be 10,753 feet!

I love getting feedback and comments. Make my day by making a comment.

Comments
comments powered by Disqus

  • « URL Hacking at REI.com
  • Presentation on Juriscraper and CourtListener for LVI2012 »

Published

Sep 16, 2012

Category

Tech

Tags

  • biking 4
  • elevation 1
  • GPS 1
  • hacking 3
  • hiking 5
  • ridewithgps 1

Contact

This is Reader-Editable

Edit this post on Github

Get Weekly Updates

  • Unless mentioned otherwise, all material on this site is licensed under a Creative Commons copyright or the GNU Affero GPL. Privacy Policy.
  • Powered by Pelican. Theme: Elegant by Talha Mansoor