avwx: Parse METAR weather reports

[ aviation, library, mit, program ] [ Propose Tags ]

Parse METAR weather reports


[Skip to Readme]

Downloads

Maintainer's Corner

Package maintainers

For package maintainers and hackage trustees

Candidates

Versions [RSS] 0.1.0.0, 0.1.0.1, 0.2.0.0, 0.3.0.0, 0.3.0.1, 0.3.0.2, 0.3.0.3
Change log changelog.md
Dependencies attoparsec (>=0.13 && <1), avwx, base (>=4.7 && <5), HTTP (>=4000 && <5000), lens (>=4.1 && <5), parsers (>=0.12 && <1), pretty-show, text (>=1.2.2.1 && <1.3) [details]
License MIT
Copyright 2016, Hans-Christian Esperer
Author Hans-Christian Esperer <hc@hcesperer.org>
Maintainer Hans-Christian Esperer <hc@hcesperer.org>
Category Aviation
Home page https://github.com/hce/avwx
Source repo head: git clone https://github.com/hce/avwx.git
Uploaded by hc at 2016-09-19T07:09:15Z
Distributions
Executables metar
Downloads 4417 total (26 in the last 30 days)
Rating (no votes yet) [estimated by Bayesian average]
Your Rating
  • λ
  • λ
  • λ
Status Docs available [build log]
Last success reported on 2016-09-19 [all 1 reports]

Readme for avwx-0.2.0.0

[back to package description]

Build Status

avwx

Fetch and parse aviation weather reports.

Currently, only standard METAR reports are supported, subject to extensive testing. RMK sections are not yet supported. Making this parser work with all METARs is pretty tedious and difficult, because every country seems to be using some subtly different specification. This parser was written with the publicly available documentation from DWD (Deutscher Wetterdienst) in mind, so it should work with all German METARs. Patches (pull requests) and suggestions are very welcome!

Important: "For educational purposes only, not for flight planning! Use at your own risk."

Usage

This package is intended to be used as a library. However, for demonstration purposes, it comes with a small command line utility that can be invoked like this:

hc@hc-pc ~ λ metar eddf llbg eham tncm

The output will look like this:

Fetching weather information for eddf
Parsing "METAR EDDF 281650Z 15006KT 9999 FEW034 SCT048 BKN130 22/15 Q1015 NOSIG="
METAR
  { date = Date 28 16 50
  , station = ICAO "EDDF"
  , flags = []
  , wind =
      Just
        Wind
          { direction = Degrees 150 , velocity = Knots 6 , gusts = Nothing }
  , visibility = [ TenOrMore ]
  , runwayvis = []
  , runwaycond = []
  , wx = []
  , clouds =
      [ Cloud FEW (Height 3400) Unclassified
      , Cloud SCT (Height 4800) Unclassified
      , Cloud BKN (Height 13000) Unclassified
      ]
  , pressure = Just (QNH 1015)
  , temperature = Just 22
  , dewPoint = Just 15
  , trend = NOSIG
  , remark = Nothing
  , maintenance = False
      }
...