A blog about skating and cycling, or vice versa

Garmin and Linux#

Wed, 18 Oct 2006 02:27:25 +0000

The first thing to note is that none of the bundled Garmin software or MotionBased or Sporttracks support Linux. It may be possible to make them run under VMWare (I had no joy with Wine: the Garmin stuff needs USB and MB needs complicated MSIE stuff), but my attempts to do so with the evaluation version of VMWare Workstation were hampered by not having any version of Windows in the house more recent than Win 98, and apparently nothing works with 8 year old technology any more.

Basically the idea is to sling all the data into one directory, then extract sessions out by date range. It's a bit like this -

$ sudo gpsbabel -t -i garmin -f usb: -o garmin301 -F ~/training/data/`date +%s`
$ perl ~/training/extract.pl
No --start argument: choose from:
 Sat Oct 14 10:10:00 2006 : 1160817000 (100 minutes)
 Sat Oct 14 14:10:00 2006 : 1160831400 (70 minutes)
 Sat Oct 14 16:10:00 2006 : 1160838600 (20 minutes)
 Sun Oct 15 13:50:00 2006 : 1160916600 (20 minutes)
 Sun Oct 15 14:20:00 2006 : 1160918400 (60 minutes)
 Sun Oct 15 15:30:00 2006 : 1160922600 (50 minutes)
 Sun Oct 15 18:20:00 2006 : 1160932800 (30 minutes)
 Mon Oct 16 08:10:00 2006 : 1160982600 (40 minutes)
:; perl extract.pl --start 1160817000
gnuplot> call "png.gp"
gnuplot> quit
$ ls *.png
Running extract.pl also brings up an X11 gnuplot window showing the graph. If it's the right one, you call png.gp (as above) to produce PNGs - in this example, this leaves you with files 1160817000-1160823000-big.png and 1160817000-1160823000-small.png .

If I develop this stuff further I'll set up a darcs project for it, but for the moment, download and installation instructions are as follows:

  1. develop Mad Perl Skillz (to be honest, you don't need much, but there's no documentation other than what you're reading here)
  2. get http://ww.telent.net/tmp/extract.pl and http://ww.telent.net/tmp/png.gp and put them in ~/training

Standard lack of warranty applies: if it breaks, you get to keep both pieces. Feedback to comment@coruskate.net