Finnish AIP
Library for downloading and parsing Finnish Aeronautical Information Publication (AIP). Machine readable AIXM format exists but access is only given to authorized companies in aviation industry. This library parses freely available PDF files into JSON.
AIP is a publication containing information essential to air navigation. The structure and contents of AIPs are standardized by international agreement through ICAO. AIPs normally have three parts – GEN (general), ENR (en route) and AD (aerodromes). Finnish AIP follows EUROCONTROL electronic AIP specification.
This library can periodically poll for latest AIP images released according to AIRAC (Aeronautical Information Regulation And Control) cycles every 28 or 56 days.
Currently supported data sets include
- Aerodrome ATS airspace (AD 2.17)
- Runway physical characteristics (AD 2.12)
- Prohibited areas (ENR 5.1)
- TMA (ENR 2.1.4)
Installation
Node 6.x is required.
You must have the 7z executable available in your PATH or in the same directory of your package.json file. Check node-7z for more detailed instructions.
npm install finnish-aip
Usage
const eaip = // sync now if needed and print resultseaip
Start node with debugging to see the output.
DEBUG=finnish-aip node -e "require('.').init().then(json => console.log(json)).catch(err => console.error(err))"
API Documentation
init([dir='./data'], [poll=0], [force=false])
=> promise
Initializes the library and starts a sync if needed. Sync results are cached for later use.
- dir: output directory for extracted AIP images, will be created if missing
- poll: sync every n-days for updates (0 is off)
- force: if true starts from scratch
Returns a promise for the results similar to current()
.
current()
=> promise
Gets the parsed AIP image in JSON presentation. All geographical features are in GeoJSON format.
eaipcurrent
Example output:
status()
=> promise
Gets the status of the current AIP cycle with references to original files for further processing.
eaipstatus
Example output:
cycle: '2016-06-23' validFrom: '2016-06-23T00:00:00.000Z' validUntil: '2016-09-15T00:00:00.000Z' files: Function './data/2016-06-23/aerodromes/EF_AD_2_EFHA_EN.pdf' './data/2016-06-23/aerodromes/EF_AD_2_EFHF_EN.pdf' './data/2016-06-23/aerodromes/EF_AD_2_EFHK_EN.pdf' ...
Files can be parsed using helpers available at lib/parser.js
.
Debugging
Run your app with DEBUG=finnish-aip environment variable.