Skip to content

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 NOTAMNQ) LOVV/QWPLW/IV/BO/W/000/130/4809N01610E001A) LOVV B) 1509261100 C) 1509261230E) PJE WILL TAKE PLACE AT AREA LAAB IN WALDEPSN:N480930 E0161028 RADIUS - 1NMF) GND G) FL130)""">>>n=notam.Notam.from_str(s)

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

>>>n.valid_fromdatetime.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/15NOTAMNQ) LOVV/QWPLW/IV/BO/W/000/130/4809N01610E001A) LOVVB) 1509261100C) 1509261230E) ParachuteJumpingExerciseWILLTAKEPLACEATAREALAABINWALDEPosition:N480930E0161028RADIUS-1NMF) GroundG) 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

Stars

47 stars

Watchers

7 watching

Forks

Releases

Packages

Contributors

Languages