README.md in aixm-0.1.3 vs README.md in aixm-0.2.0

- old
+ new

@@ -29,17 +29,17 @@ You can initialize all elements either traditionally or by use of shorter AIXM class methods: ```ruby -AIXM::Feature::Airspace.new(...) AIXM.airspace(...) +AIXM.airspace(...) ``` ### Fundamentals -All fundamentals are bundled at the root of the module `AIXM`. +All fundamentals are subclasses of `AIXM::Base`. ### Document The document is the root container of the AIXM snapshot file to be generated. It's essentially a collection of features: @@ -75,18 +75,24 @@ #### Altitude and Heights Altitudes and heights exist in three different forms: ```ruby -AIXM.z(alt: 1000, code: :QFE) # height: 1000ft above ground -AIXM.z(alt: 2000, code: :QNH) # altitude: of 2000ft above mean sea level -AIXM.z(alt: 45, code: :QNE) # altitude: flight level 45 +AIXM.z(1000, :qfe) # height: 1000ft above ground +AIXM.z(2000, :qnh) # altitude: of 2000ft above mean sea level +AIXM.z(45, :qne) # altitude: flight level 45 ``` +#### Frequency + +```ruby +AIXM.f(123.35, :mhz) +``` + ### Features -All features are subclasses of `AIXM::Feature`. +All features are subclasses of `AIXM::Feature::Base`. #### Airspace * AIXM.airspace * name: String @@ -95,13 +101,76 @@ * schedule = AIXM.schedule * geometry << AIXM.point, AIXM.arc, AIXM.border or AIXM.circle * class_layers << AIXM.class_layer * remarks = String +#### Navigational Aids + +##### Designated Point + +* AIXM.designated_point + * id: String + * name: String + * xy: AIXM.xy + * z: AIXM.z or *nil* + * type: :icao, :adhp, :coordinates or :other + * remarks = String + +##### DME + +* AIXM.dme + * id: String + * name: String + * xy: AIXM.xy + * z: AIXM.z or *nil* + * channel: String + * remarks = String + +##### NDB + +* AIXM.ndb + * id: String + * name: String + * xy: AIXM.xy + * z: AIXM.z or *nil* + * f: AIXM.f + * remarks = String + +##### Marker + +* AIXM.marker + * id: String + * name: String + * xy: AIXM.xy + * z: AIXM.z or *nil* + * remarks = String + +##### TACAN + +* AIXM.tacan + * id: String + * name: String + * xy: AIXM.xy + * z: AIXM.z or *nil* + * channel: String + * remarks = String + +##### VOR and DVOR + +* AIXM.vor + * id: String + * name: String + * xy: AIXM.xy + * z: AIXM.z or *nil* + * type: :vor or :vordme + * f: AIXM.f + * north: :geographic or :magnetic + * remarks = String + ### Components -All components are subclasses of `AIXM::Component`. +All components are subclasses of `AIXM::Component::Base`. #### Schedule * AIXM.schedule * code: String or Symbol @@ -146,20 +215,25 @@ * at least three points, arcs or borders (the last of which a point with identical coordinates as the first) ## Validation -* Use `AIXM::Document#complete?` to check whether all mandatory information is +Use `AIXM::Document#complete?` to check whether all mandatory information is present. Airspaces, geometries etc have `complete?` methods as well. -* Use `AIXM::Document#valid?` to validate the resulting AIXM against the XSD -schema. If any, you find the errors in `AIXM::Document#errors`. +Use `AIXM::Document#valid?` to validate the resulting AIXM against the XSD +schema. If any, you find the errors in `AIXM::Document#errors`. Since the data +model is not fully implemented, some associations cannot be assigned and have +to be left empty. The resulting validation errors are silently ignored: + +* OrgUid - organizations may be empty tags + ## Rendering ```ruby document.to_xml # render AIXM 4.5 compliant XML -document.to_xml(:OFM) # render AIXM 4.5 + OFM extensions XML +document.to_xml(:ofm) # render AIXM 4.5 + OFM extensions XML ``` ## Constants * `AIXM::GROUND` - height: 0ft above ground @@ -168,17 +242,21 @@ ## Refinements By `using AIXM::Refinements` you get the following general purpose methods: +* `Hash#lookup(key, default)`<br>Similar to `fetch` but falls back to values * `String#indent(number)`<br>Indent every line of a string with *number* spaces * `String#uptrans`<br>upcase and transliterate to match the reduced character set for names * `String#to_dd`<br>Convert DMS angle to DD or `nil` if the format is not recognized * `Float#to_dms(padding)`<br>Convert DD angle to DMS with the degrees zero padded to *padding* length * `Float#trim`<br>Convert whole numbers to Integer and leave all other untouched * `Float#to_km(from: unit)`<br>Convert a distance from *unit* (:km, :m, :nm or :ft) to km +See the [source code](https://github.com/svoop/aixm/blob/master/lib/aixm/refinements.rb) +for more explicit descriptions and examples. + ## Extensions ### OFM This extension adds proprietary tags and attributes (most of which are prefixed @@ -192,9 +270,11 @@ ## References * [AIXM](http://aixm.aero) * [AIXM on Wikipedia](https://en.wikipedia.org/wiki/AIXM) +* [AIXM 4.5 Specification](http://aixm.aero/document/aixm-45-specification) +* [AICM 4.5 Entity-Relationship](https://www.ead.eurocontrol.int/SystemHelp/mergedProjects/SDO/aixm/) * [Open Flightmaps](https://openflightmaps.org) ## Tests Some tests are very time consuming and therefore skipped by default. To run the