rubyist / guppy

Ruby lib to parse tcx and gpx files from GPS devices

This URL has Read+Write access

guppy /
name age message
file .gitignore Wed Oct 28 18:55:39 -0700 2009 use jeweler [Scott Barron]
file MIT-LICENSE Thu Jan 22 14:25:26 -0800 2009 license [Scott Barron]
file README.rdoc Thu Oct 29 06:29:12 -0700 2009 renaming the project guppy [Scott Barron]
file Rakefile Thu Oct 29 06:29:12 -0700 2009 renaming the project guppy [Scott Barron]
file VERSION Wed Oct 28 18:55:39 -0700 2009 use jeweler [Scott Barron]
directory doc/ Sat Jan 24 09:26:08 -0800 2009 hook up stuffs for rdoc [Scott Barron]
file guppy.gemspec Thu Oct 29 06:29:12 -0700 2009 renaming the project guppy [Scott Barron]
directory lib/ Thu Oct 29 06:29:12 -0700 2009 renaming the project guppy [Scott Barron]
directory test/ Thu Oct 29 06:29:12 -0700 2009 renaming the project guppy [Scott Barron]
README.rdoc

Guppy - Ruby library for handling tcx files

This library provides a set of classes for working with tcx and gpx dumps from GPS devices such as the Garmin Forerunner 305.

Examples

  db = Guppy::Db.open('foo.tcx')
  db.activities.each do |activity|
    puts activity.date
  end

  run = db.activity('2009-01-12T19:28:18Z')
  run.laps.each do |lap|
    puts "Lap Time: #{lap.time}"
    puts "Lap Distance: #{lap.distance}"
    puts "Lap Calories: #{lap.calories}"
    lap.track_points.each do |track_point|
      puts "#{track_point.latitude} #{track_point.longitude}"
    end
  end

TODO

  • Get aggregated pace and heart rate signals for an activity
  • Make it faster and avoid re-parsing the db in some instances
  • A nicer way to find a specific activity

Other Stuff

Author:Scott Barron <scott at elitists dot net>
License:Copyright 2009 by Scott Barron. Released under an MIT-style license. See the MIT-LICENSE file included in the distribution.
GitHub:github.com/rubyist/guppy/tree/master

Warranty

This software is provided "as is" and without any express or implied warranties, including, without limitation, the implied warranties of merchantibility and fitness for a particular purpose.