Sunday, October 20, 2013

GPSBabel

So I've been using MapMyRide to record my bicycle rides using my iPhone. One day I took a long ride and my phone battery ran out. After this I decided to pickup a GPS - I settled on the Garmin eTrex 30. I did a ride and manually uploaded my track to MapMyRide and noticed that it's calculated elevation gain just didn't add up.

After researching a bit I came across Garmin Connect. I honestly didn't expect much from Garmin's site, but that is really a great site. After uploading my workout to Garmin Connect I was hooked. I had a few workouts that I wanted to import from MapMyRide, so started that process. Unfortunately, even though MapMyRide will export workouts in the GPX format, they couldn't be imported by Garmin Connect.

After some more digging around it looks like MapMyRide exports the GPX files w/o timestamps, which Garmin Connect needs. I found that these could be "faked" using GPSBabel like so:

gpsbabel -i gpx -f FromMapMyRide.gpx \
    -x track,faketime=f20131020084500+10 \
    -o gpx -F ForGarminConnect.gpx

The workout you import has meaningless speed data, but the position and Garmin's calculated elevation can be trusted.