Skip to content

slavak/PyNotam

Folders and files

NameName
Last commit message
Last commit date
Oct 3, 2015
Jul 10, 2021
Oct 3, 2015
Oct 3, 2015
Oct 10, 2015
Oct 3, 2015
Jul 10, 2021
Oct 3, 2015
Oct 3, 2015

Repository files navigation

PyNotam

Notice To Airmen Parser module written in Python.

This provides a means to parse standard format ICAO NOTAMs, and extract useful information from them without having to do any string processing yourself.

Usage

Parsing a NOTAM is as easy as:

>>> s = """(A1912/15 NOTAMN
Q) LOVV/QWPLW/IV/BO/W/000/130/4809N01610E001
A) LOVV B) 1509261100 C) 1509261230
E) PJE WILL TAKE PLACE AT AREA LAAB IN WALDE
PSN:N480930 E0161028 RADIUS - 1NM
F) GND G) FL130)"""
>>> n = notam.Notam.from_str(s)

Now you can access all information provided in the NOTAM easily and natively:

>>> n.valid_from
datetime.datetime(2015, 9, 26, 11, 0, tzinfo=datetime.timezone.utc)
>>> n.area
{'lat': '4809N', 'long': '01610E', 'radius': 1}

You can also get a decoded form of the NOTAM, with all ICAO abbreviations expanded, with a single method call:

>>> print(n.decoded())
(A1912/15 NOTAMN
Q) LOVV/QWPLW/IV/BO/W/000/130/4809N01610E001
A) LOVV B) 1509261100 C) 1509261230
E) Parachute Jumping Exercise WILL TAKE PLACE AT AREA LAAB IN WALDE
Position:N480930 E0161028 RADIUS - 1NM
F) Ground G) FL130

For a full list of the fields available in a Notam object, see its __init__ method in the code.

Requirements

Tested on Python 3.5.

Parsing grammar implemented with Erik Rose's excellent module Parsimonious. To install it:

> pip install parsimonious

About

Notice To Airmen Parser Written in Python

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages