Partial implementation of the Aeronautical Information Exchange Model (AIXM 4.5) and it's dialect Open FlightMaps eXchange format (OFMX 0) for Ruby.
For now, only the parts needed to automize the AIP import of open flightmaps are part of this gem. Most notably, the gem is only a builder for snapshot files and does not parse them.
Add this to your
Here's how to build a document object, populate it with a simple feature and then render it as AIXM:
document = AIXM.document document.features << AIXM.designated_point( id: "ABIXI", xy: AIXM.xy(lat: %q(46°31'54.3"N), long: %q(002°19'55.2"W)), type: :icao ) document.aixm! # not really necessary since AIXM is the default schema document.to_xml
You can initialize all elements either traditionally or by use of the corresponding shorthand AIXM class method. The following two statements are identical:
AIXM::CLASSES for the complete list of shorthand names.
The following configuration options are available for setting and getting:
AIXM.config.schema # either :aixm (default) or :ofmx AIXM.config.ignored_errors # ignore XML schema errors which match this regex
There are shortcuts to set and get the schema:
AIXM.schema # => :aixm AIXM.aixm? # => true AIXM.ofmx! # => :ofmx AIXM.ofmx? # => true AIXM.schema # => :ofmx AIXM.schema(:version) # => 0
AIXM::Document#valid? validates the resulting AIXM or OFMX against its XML schema. If any, you find the errors in
- XY (longitude and latitude)
- Z (height, elevation or altitude)
- D (distance or length)
- F (frequency)
- A (angle)
- Navigational aid
- Obstacle and obstacle group
- Vertical limits
using AIXM::Refinements you get a few handy extensions to Ruby core classes.
Some tests are very time consuming and therefore skipped by default. To run the full test suite, set the environment variable:
To install the development dependencies and then run the test suite:
bundle install bundle exec rake # run tests once bundle exec guard # run tests whenever files are modified
Please submit issues on:
To contribute code, fork the project on Github, add your code and submit a pull request:
The gem is available as open source under the terms of the MIT License.