March 7, 2007

Tracking your sport activity with open source software

Author: Nikos Kouremenos

If you're a FOSS enthusiast who keeps fit by exercising or playing sports, it's time you used an open source application to track your activities. With these programs you can get a good overview of your exercises or create diagrams and statistics for specific time ranges and sport types.

SportsTracker

SportsTracker is a good place to start recording your sporting activities. It is not bound to a specific kind of sport -- you can create categories for any sport type, such as cycling, running, swimming, or tennis. Once you have a category, you can use it to log the time you spent doing that activity.

The application's main window is minimalistic; it holds a menubar, a toolbar for the common actions, and a calendar view that displays the days of the week plus a separate column on the right that sums up the activity of the week. To display all your exercises in detail choose View -> Exercise List. To set the detail view as the default view instead of the calendar, go to Edit -> Preferences. There you can also choose between using kilometers or miles. Chances are you won't have to do that though, as SportsTracker gets its units from the locale settings in your system.

To add exercise data, you first have to create a sport type and, optionally, subtypes. For example, a sport type could be bicycle, and two subtypes of it could be mountain and city. All the application data is stored in XML files in ~/.sportstracker.

Once you've logged some activities, you're going to want to get statistics about them. Choose Tools -> Statistics. Here you can adjust the time span you want to look at by clicking the Change button. When you're ready, click the Calculate button. SportsTracker then displays a window of information that includes the total duration of all exercises, the average duration, the minimum and maximum duration, etc.

To get your information in a more visual way, choose Tools -> Overview Diagram. The x-axis holds the time, and you can change the y-axis to hold any variable you are interested in, including distance summary, average speed, or even calorie consumption, and the chart will automatically update to reflect the changes.

If you have logged many exercises, you can filter them to find those you're most interest in. The exercises filter window is easy to use, offering the ability to limit the searching field down to a specific sport type or subtype or time duration, and offers filtering via regular expressions.

If you own a heart rate monitor with a computer interface, you can display the monitor's recorded exercise files with SportsTracker's integrated PolarViewer application. You can attach the recorded files to the exercise entries. When you add new exercises you can import the data from the recorded exercise files.

PolarViewer supports Polar and CicloSport heart rate monitors. However, SportsTracker itself is not able to download the exercise files from the heart rate monitor. You need to use external tools such as s710 for many Polar models, rs200-decoder for the Polar RS200 monitor, or HAC4Linux for the CicloSport HAC4 monitor.

An alternative to PolarViewer, Polarscope, can do more or less the same things as PolarViewer: you can browse all your workout information with a calendar interface, display altitude, heart rate, and speed data plots, and look at workout lap times, distance, and speed.

SportsTracker is written in C# and was very stable on the latest Mono platform I tested it on. Other dependencies include GTK# for the graphical user interface and libgdiplus for the plotting abilities.

Pytrainer

Pytrainer is an alternative to SportsTracker that also allows you to log all your sport activities. It was originally programmed for cyclists, but it can be used for other types of individual sports, such as running or swimming.

Pytrainer is written in Python using the GTK library for the graphical user interface and can be used with a SQLite (which is what the application defaults to) or MySQL database. The interface does not follow the GNOME Human Interface Guidelines, and is in general a bit problematic. As with SportsTracker, with it you can produce graphs from your logged data as well as see calendar-like and list views.

A feature Pytrainer offers that SportsTracker lacks is GPS integration. With Pytrainer you can integrate data from a GPS device you've hooked on your bike or your body.

These applications can help you track sports data. They will do more for you than putting such information in a text document or a spreadsheet.

Nikos Kouremenos is a computer science student who has been active in the open source community since 2002.

Click Here!