Gem that helps parsing and calculating stats form GPX files.
Add this line to your application's Gemfile:
gem 'gpx'
And then execute:
$ bundle
Or install it yourself as:
$ gem install gpx
require 'gpx'
gpx = GPX.new 'path_to_GPX_file'
gpx.points_count # get count of track points
gpx.duration # get track duration [s]
gpx.length # get track length [km]
gpx.times[n][:t] # get time delta for n-th and n-1-th track point
gpx.times[n][:dt] # get time delta for n-th and n-1-th track point
gpx.distances[n][:s] # get distance between track start and n-th track point
gpx.distances[n][:ds] # get distance delta for track n-th and n-1-th track point
gpx.max_speed # get max value from all partial speeds (ds/dt)
gpx.average_speed # get average speed for track
gpx.speeds # get partial speeds
gpx.start_date # date when track begins
gpx.end_date # date when track ends
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request