-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathexample.py
42 lines (29 loc) · 945 Bytes
/
example.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
# ========================================
#
# Py-ATIS module
# github.com/faramire/py-atis/
# (c) Fabio Ramirez Stern, 2023-2024
#
# ========================================
# CONFIG
owmAPIkey = 'YOUR-OWM-KEY' # OpenWeatherMap API key
wxapikey = 'YOUR-WX-KEY' # checkWXapi key
icaoCode = 'XXXX' # ICAO airport code
atislocation = 'YOUR-LOCATION-STRING' # Location
rwy = '25' # rwy to be said in ATIS, as string!
expect = 'expect foot approach'
lat = 12.34
lon = 56.78
# IMPORTS
from atis import createATIS()
# ========================================
# SETUP
letterc = 0 # Alpha
wxurl = f'https://api.checkwx.com/metar/{icaoCode}/' # WX API url
# ========================================
# RUNTIME
cATIS = createATIS(wxurl_=wxurl, wxapikey_=wxapikey, owmAPIkey_=owmAPIkey, atislocation_=atislocation, rwy_=rwy, lat_=lat, lon_=lon, letterc_=letterc)
print(cATIS[0])
print("\n=============================\n")
print(cATIS[1])
#END