avwx: Parse METAR weather reports

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

Parse METAR weather reports


[Skip to Readme]
Versions [faq] 0.1.0.0, 0.1.0.1, 0.2.0.0, 0.3.0.0, 0.3.0.1, 0.3.0.2
Change log changelog.md
Dependencies attoparsec, avwx, base (>=4.7 && <5), HTTP, 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/VirtualForgeGmbH/hascar.git
Uploaded by hc at Tue Jun 28 17:13:52 UTC 2016
Distributions LTSHaskell:0.3.0.2, NixOS:0.3.0.2, Stackage:0.3.0.2
Executables metar
Downloads 1882 total (76 in the last 30 days)
Rating (no votes yet) [estimated by rule of succession]
Your Rating
  • λ
  • λ
  • λ
Status Hackage Matrix CI
Docs available [build log]
Last success reported on 2016-06-28 [all 1 reports]

Modules

[Index]

Downloads

Maintainer's Corner

For package maintainers and hackage trustees


Readme for avwx-0.1.0.0

[back to package description]

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