Expand description
§METAR parsing library for Rust
§Quick usage
This simple usage will print out the parsed data from the METAR.
use metar::Metar;
let metar = "EGHI 282120Z 19015KT 140V220 6000 RA SCT006 BKN009 16/14 Q1006";
match Metar::parse(metar) {
Ok(metar) => println!("{metar:#?}"),
Err(es) => {
for e in es {
eprintln!("{e}");
}
}
}§Issues
METARs are complicated structures. If you come across a METAR that doesn’t parse correctly, please open an issue and include the METAR. This will aid in debugging the issue significantly.
Structs§
- Cloud
Layer - Cloud cover
- Metar
- A complete METAR
- Metar
Error - An error when parsing a METAR
- Owned
Metar Error - An error when parsing a METAR
- Runway
Condition - Describes contamination on a runway
- Runway
Visual Range - The visibility measured for a specific runway.
- SeaCondition
- Describes the condition of the sea
- Time
- A struct to store time as it is represented in a METAR
- Trend
NewCondition - New conditions apply
- Weather
- A weather information block
- Windshear
Group - A runway affected by windshear
Enums§
- Cloud
Density - The density of the cloud cover
- Cloud
Type - A cloud type description
- Clouds
- Cloud state
- Colour
Code - Military airport colour code
- Compass
Direction - A compass direction
- Data
- Data that is provided in a metar which might be unknown.
Note that this differs from an
Option<T>field which is used when data might not be given at all. In the cases whereData<T>is used, data is usually given but has been replaced in the METAR by slashes, indicating that it is not known. - Error
Variant - Kind
- The kind of METAR produced.
- Pressure
- Measured air pressure
- Runway
Contamination - Describes contamination on a runway
- Runway
Deposits - Describes deposits on a runway
- RvrTrend
- How is the RVR trending?
- RvrUnit
- The unit of measurement
- RvrValue
- The visibility value
- RvrValue
Inner - The visibility value
- SeaCondition
Inner - Sea condition
- SeaState
- The state of the sea
- Trend
- How is the weather expected to change in the near future?
- Trend
Time - The time at which conditions change
- Vertical
Visibility - Vertical visibility measurement
- Visibility
- Horizontal visibility
- Weather
Condition - Descriptor of weather
- Weather
Intensity - Intensity of weather
- Wind
- Wind information.
- Wind
Direction - A representation of wind direction
- Wind
Speed - The wind speed
- Windshear
Warnings - A windshear warnings