Crate metar

source ·
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";
let r = Metar::parse(metar).unwrap();
println!("{:#?}", r);

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

  • A complete METAR
  • An error when parsing a METAR
  • A struct to store time as it is represented in a METAR
  • A weather information block
  • Wind information.

Enums

  • Cloud cover
  • A cloud type description
  • Cloud state
  • 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 where Data<T> is used, data is usually given but has been replaced in the METAR by slashes, indicating that it is not known.
  • Measured air pressure
  • Vertical visibility measurement
  • Horizontal visibility
  • Descriptor of weather
  • Intensity of weather
  • A representation of wind direction
  • The wind speed