Sports Tracking Workflow


Summer time is outdoor time. In terms of outdoor activities I rediscovered running and mountain biking again this year. I didn’t like to run in in the past, collected my first experience around 2008 to lose some weight and did my first competition in 2009 at a local half marathon. After this race I stopped training and came back to regular running this year. 2011 provided new opportunities for sports enthusiasts like me, the invention of web based, social media enabled and mobile device supported sports / heath tracking. I’ve tried a lot of these services and finally arrived at a mix of three tools for tracking and analyzing my endurance training. With this post I’d like to give an insight into my workflow and reasons for my choices.

You can find many sports tracking apps and services with a different feature set. Most known are RunKeeper, Polar Personal Trainer, Sports Tracker, RunTastic, Endomondo and Garmin Connect. This list is not complete, there are many more services of this kind out there in the world wild web, but these are the services I used at least once or heard most about. Feel free to comment if you can suggest any other recognizable service.

Health Data tracking

My current toolkit is influenced by the initial set of devices I own. I’ve always been a Polar user. Polar heart rate monitors are awesome, they work well, have very good features like OwnZone or OwnIndex and their Wear Link strap has perfect wearing comfort. I previously used a Polar RS200sd (the RS300x is it predecessor). This model is a heart rate monitor combined with a movement sensor attached to your running shoe for tracking distances. A view years ago GPS receivers where too expensive, consumed too much energy for long sessions and where uncomfortable to wear. Movement sensors are a compromise but they work better as expected. Most importantly they provide your current pace and distance during running but are useless on a bike. Today I use the Polar FT80 (still with the Foot Pod sensor from my old RS200sd) in combination with my iPhone 4 as GPS tracking device and different apps. The FT80 has one feature I missed on the RS200, it stores all heart rate values of my training. The RS200 did only store my average and max heart rate, not the single measured values. I’m still thinking about getting a Garmin Forerunner 610 to get rid of the “heavy” iPhone and the foot pod during training sessions but the high price still holds me back. The Forerunner series from Garmin combines heart rate monitoring with GPS tracking in one device. These are bigger and heavier as Polar watches and have less training oriented features like OwnZone or OwnIndex but they are a powerful alternative.

RunKeeper is my tracking service of choice, for several reasons. In the beginning I “just” liked their iPhone app better and started using it at first place. It was the best app until competitors put more effort into their apps and left it behind. For me personally the lack of an auto pause feature is the biggest problem! This missing feature forces me to use the Sports Tracker iPhone app for mountain biking activities because it is impossible to get accurate measurements during long biking tours. Once I may have to wait for other people or just stop to take a picture. Using RunKeeper would mean I have to get out my iPhone and pause recording manually, do what I want to do and don’t dare to forget turning it on again. Furthermore RunKeeper is not spending a lot attention to elevation. It’s not showing ascent or descent of activities on the iPhone. Unfortunately I’m one of these guys who would like to see the current altitude on a bike tour. RunKeeper’s true strength is their web application, their analytics tools and the recently added API for programmers. They are on the way to build a cloud based center for any of your health and fitness data far beyond tracking running activities. They currently encourage developers to build apps and devices with their so called Health Graph API. Last but not least they have very good social features. You are able to add friends to activities and the stream showing your friend’s recent logs is clean and informative. Furthermore it’s very well integrated with FaceBook and Twitter and their API hints on a direction towards more generic sports logging. At the moment they are very running/biking centric but their future plans seem to be broader and logging will get extended to other sports and fitness activities.

My Workflow

At the moment I’m only tracking my running and mountain biking activities with RunKeeper. I’m not tracking any of my gym workouts or climbing activities until they support these in a proper way. My heart rate gets tracked with the Polar FT80 which is able to transmit the recorded data to Polar’s Personal Trainer Service. It’s quite professional with a good and solid set of features but I just like RunKeeper’s user interface much more. Running sessions are recorded with RunKeeper and mountain biking using Sports Tracker on the iPhone. Sports Tracker’s web interface (which unfortunately is made using Flash) allows to export recorded sessions as standard GPX document. This GPX files can be used to create activities within RunKeeper - so every time after biking I generate a GPX file and import it into RunKeeper.

Finally I want to get my heart rate data into RunKeeper too. Now it gets a bit complicated. RunKeeper just understands HRM formatted files. HRM is a file specification by Polar - perfect you may think! Unfortunately Polar Personal Trainer is not able to export HRM files :-(! It can just provide you XML formatted files of your training sessions which have to be translated into HRM format. Both of these file formats are quite simple and a small self written script is doing the job of converting from xml to hrm for me. Therefore my workflow looks like shown in this little graph.

It’s somehow complicated and could be easier with other equipment, but currently this is the best way of combining my tracking possibilities with RunKeeper. I could throw money a the problem and buy a Garmin Forerunner 610 to take out most of the complexity in this workflow, maybe I will do so. Nevertheless, other people may have similar problems and maybe my little writeup helps to organize anyone’s sports tracking better. If you have a different approach, let me know how you handle sports tracking on your own.

Polar Personal Trainer XLM to HRM converting script

As mentioned I’ve written a little Ruby(*) script to extract all heart rate values from the polar personal trainer XML document in order to use it with RunKeeper. Take the source code below and feel free to use it for your own tracking. Download the file and store the script anywhere on your computer. Export a workout from your Polar Personal Trainer account and save it. Open a Terminal and execute the script by typing “ruby pptxml2hrm.rb nameofyourxmlfile.xml”. It should work on every computer having Ruby installed (Mac OS should have it out of the box). If there is demand I could also put the script into a tiny web app to convert files more convenient by uploading them - actually I think I will do so anyway.

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
require 'rexml/document'

def file_name(file)
  if file.end_with?(".xml") then
    file = file.gsub(".xml", ".hrm")
  else
    file = "#{file}.hrm"
  end
  return file
end

if ARGV.count == 1 then
  file = ARGV.first

  if File.exists?(file) then
    xmlfile = File.open(file, 'rb')
    xmldoc = REXML::Document.new(xmlfile.read)
    hrmdata = xmldoc.elements['polar-exercise-data/calendar-items/
				exercise/result/samples/sample/values'].get_text

    open(file_name(file), 'w') { |f|
      f << "[Params]\nInterval=5\n[HRData]\n"
      "#{hrmdata}".split(',').each do |v|
        f << "#{v}\n"
      end
    }
  else
    puts "Could not find #{ARGV.first}"
  end
else
  puts "Usage: 'ruby xml2hrm polarpersonaltrainer.xml'"
end

(*) I’m a real ruby noob, this is my first script done with this language. Feel free to give me any useful hits.