albertorestifo / igc.cr

IGC File Parser in Crystal

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

igc

CI

FAI Compliant IGC file parser.

Implemented version: 2020-11-25

  • IGC File parsing:

    • A record - Flight Recorder Identification
    • H record - Headers
    • I record - Additions to the B record
    • J record - Additions to the K record
    • C record - Task
    • G record - Security
    • B record - Fixes
    • E record - Events
    • F record - Satellite Constellations
    • K record - Data needed less frequently than fixes
    • L record - Comments
    • D record - Differential GNSS
  • IGC File writing

Installation

  1. Add the dependency to your shard.yml:

    dependencies:
      igc:
        github: albertorestifo/igc.cr
  2. Run shards install

Usage

require "igc"

parsed = File.open("my_flight.igc") do |file|
  IGC.parse(file)
end

pp parsed.fixes # => prints out all the fixes in the file

The result of calling IGC.parse is an instance of IGC::File, with properties:

  • flight_recorder_id: Identifier of the device that recorded the IGC data
  • headers: Metadata contained in the file
  • task: Task definition (if present)
  • fixes: Array of fixes recorded in the file
  • datapoints: Extra data recorded at regular intervals

Contributing

  1. Fork it (https://github.com/albertorestifo/igc.cr/fork)
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create a new Pull Request

Contributors

About

IGC File Parser in Crystal

License:MIT License


Languages

Language:Crystal 100.0%