MIT licensed and maintained by Hans-Christian Esperer
This version can be pinned in stack with:avwx-0.2.0.0@sha256:ccf928649bd955a30b49c153da20dfbe49d9c70d3f72955325d54ae3b4923172,1714

Module documentation for 0.2.0.0

Used by 1 package in nightly-2016-09-21(full list with versions):

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
      }
...

Changes

0.2.0.0

Many improvements by Tony Morris:

  • Turn on GHC warnings
  • The parser uses hackage/parsers library, so a user can choose the parser implementation e.g. attoparsec, parsec.
  • A METAR optionally ends in $ or = instead of necessarily.
  • Added a field to Weather for ending in $ (meaning the station requires maintenance).
  • Added classy lenses to the data types.
  • Updated the new noaa.gov METAR publication website for fetching.
  • Moved parseWeather over to the Fetcher module so the parser does not ever import attoparsec.
  • Make Station a newtype.

Jun 28 2016

  • First release.