Crates.io | openair |
lib.rs | openair |
version | 0.3.2 |
source | src |
created_at | 2019-04-26 15:16:19.043819 |
updated_at | 2024-10-12 20:19:27.066945 |
description | Parser for airspace files in OpenAir format. |
homepage | https://github.com/dbrgn/openair-rs/ |
repository | https://github.com/dbrgn/openair-rs/ |
max_upload_size | |
id | 130335 |
size | 63,131 |
A Rust parser for airspace files in OpenAir format (used by flight instruments like Skytraxx and others).
http://www.winpilot.com/UsersGuide/UserAirspace.asp (see also FORMAT.txt
)
Docs: https://docs.rs/openair/
Supported file format features:
Label placement hints (AT) and style records (SP, SB) are not supported.
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: Altitude levels without a unit specifier (e.g. "1000 GND") will be treated as feet!)
You can try the parser using the example program:
$ cargo run --example parse_file example_data/Switzerland.txt
To include serialization of all data types, enable the serde
feature.
Licensed under either of
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.