TCX to GPX Converter

For Christmas 2006 I was given a Garmin Edge 205 bike oriented GPS. With it came their Training Center software, which at the time was Windows only. Since then they have released a version for OSX (my prefered non-server OS). This new version will export its own TCX history files.

Now, I've used tools such as GPSBabel and the rather superb MotionBased to extract tracks from the Edge 205 but have been a little frustrated at the lack of GPX export from Training Center.

So, a bit of Googling later, and I find that various tools have been written for Windows, OSX and Linux, but nothing that was a simple CLI. Not one to turn down a challenge I decided that I'd have a go at writing my own TCX converter - A bit of Perl and XML never frightened me :-). So for anyone else that may want to extract GPX files from their TCX history, here's the code :

tcx2gpx Version 1.19


  1. There are no limitations on use, but the usual GPL style license applies.
  2. Please feel free to contact me with patches/suggestions - the '-e' option to the program will reveal my email address.
  3. It defaults to scanning for bike routes. Use the -? option to find out how to change this.
  4. It doesn't fully work on newer TCX files in their raw state. When I wrote this I didn't use (or implement) a full XML parser, so the code made many assumptions about the XML format. The newer TCX files aren't "pretty printed", so my code barfs. To get around this I suggest using the 'xml_pp' application available from the Perl XML::Twig package - this is available under Ubuntu as 'apt-get install xml-twig-tools'. I shall look into using a proper XML tree parser in the near future so that this step isn't neccessary.


Thanks to :

Valid XHTML 1.0 Strict - Last modified: $Date: 2007/07/05 15:47:40 $