IGC Parser
IGC is a Ruby library for parsing International Gliding Commission (IGC) files. It is fully compliant with the IGC specification and allows you to easily extract flight data from IGC files.
IGC files are used to record flight data such as GPS coordinates, altitude, and timestamps from gliders, paragliders, and other free-flying aircraft.
Installation
Add this line to your application's Gemfile:
gem 'igc'
And then execute:
$ bundle install
Or install it yourself as:
$ gem install igc
Usage
Using the IGC library is simple. You can parse an IGC file with just one line of code:
flight = IGC.parse("path_to_file.igc")
Example
require 'igc'
# Parse an IGC file
flight = IGC.parse("path_to_file.igc")
# Access flight data
puts "Pilot: #{flight.pilot}"
puts "Glider Type: #{flight.glider_type}"
puts "Glider ID: #{flight.glider_id}"
puts "Date: #{flight.date}"
# Iterate through fixes
flight.fixes.each do |fix|
puts "Time: #{fix.time} Latitude: #{fix.location.latitude} Longitude: #{fix.location.longitude} Altitude: #{fix.gps_altitude}"
end