[][src]Crate openair

Simple line-based parser for airspace files in OpenAir format (used by flight instruments like Skytraxx and others).

http://www.winpilot.com/UsersGuide/UserAirspace.asp

If you want to use this library, you need the parse function as entry point.

For an example on how to use the parse function, see the examples in the source repository.

Implementation Notes

Unfortunately the OpenAir format is really underspecified. Every device uses varying conventions. For example, there is nothing we can use as clear delimiter for airspaces. Some files delimit airspaces with an empty line, some with a comment. But on the other hand, some files even place comments between the coordinates so that they cannot be used as delimiter either.

This parser tries to be very lenient when parsing, based on real life data. The end of an airspace is reached when the next one starts (with an AC record) or when the file ends.

Note: AT records (label placement hints) are currently ignored

Structs

Airspace

An airspace.

Arc

An arc (DB record).

ArcSegment

An arc segment (DA record).

Coord

A coordinate pair (WGS84).

Enums

Altitude

Altitude, either ground or a certain height AMSL in feet.

Class

Airspace class.

Direction

Arc direction, either clockwise or counterclockwise.

Geometry
PolygonSegment

A polygon segment.

Functions

parse

Process the reader until EOF, return a list of found airspaces.