source: src/mlx/airports.py@ 294:0d35468a92b3

Last change on this file since 294:0d35468a92b3 was 261:aad834a04851, checked in by István Váradi <ivaradi@…>, 12 years ago

Added airport names

File size: 2.9 KB
RevLine 
[261]1# The mapping of ICAO codes to airport names
2# -*- coding: utf-8 -*-
3
4#-----------------------------------------------------------------------------
5
6airportNames = {
7 "VTBS" : ("Bangkok", "Suvarnabhumi"),
8 "KJFK" : ("New York", "J. F. Kennedy"),
9 "CYYZ" : ("Toronto", "Lester B. Pearson"),
10 "UUEE" : ("Moscow", "Sheremetevo"),
11 "UKBB" : ("Kiev", "Borispol"),
12 "UKOO" : ("Odessa", None),
13 "USSS" : ("Yekaterinburg", "Koltsovo"),
14 "LTBA" : ("Istanbul", "Atatürk"),
15 "LLBG" : ("Tel-Aviv", "Ben Gurion"),
16 "HECA" : ("Cairo", None),
17 "LCLK" : ("Larnaca", None),
18 "LGAV" : ("Athens", "Eleftherios Venizelos"),
19 "OLBA" : ("Beirut", "Rafic Hariri"),
20 "OSDI" : ("Damascus", None),
21 "LGTS" : ("Thessaloniki", "Makedonia"),
22 "LIRF" : ("Rome", "Fiumicino"),
23 "LIPZ" : ("Venezia", "Tessera"),
24 "LATI" : ("Tirana", "Rinas"),
25 "LWSK" : ("Skopje", None),
26 "LQSA" : ("Sarajevo", "Butmir"),
27 "BKPR" : ("Pristina", None),
28 "LDZA" : ("Zagreb", "Pleso"),
29 "LDSP" : ("Split", "Kastela"),
30 "LDDU" : ("Dubrovnik", "Cilipi"),
31 "LYPG" : ("Podgorica", "Titograd"),
32 "EDDS" : ("Stuttgart Echterdingen", None),
33 "EDDF" : ("Frankfurt", "Main"),
34 "EDDM" : ("Munich", "Franz-Josef Strauss"),
35 "EDDH" : ("Hamburg", None),
36 "LFPG" : ("Paris", "Charles de Gaulle"),
37 "LFLL" : ("Lyon", "Satolas"),
38 "LSGG" : ("Geneva", "Cointrin"),
39 "LEMD" : ("Madrid", "Barajas"),
40 "EBBR" : ("Brussels", "Zaventem"),
41 "EGKK" : ("London", "Gatwick"),
42 "EIDW" : ("Dublin", "Collinstown"),
43 "EICK" : ("Cork", None),
44 "EHAM" : ("Amsterdam", "Schiphol"),
45 "EDDT" : ("Berlin", "Tegel"),
46 "EFHK" : ("Helsinki", "Vantaa"),
47 "EKCH" : ("Copenhagen", "Kastrup"),
48 "ESSA" : ("Stockholm", "Arlanda"),
49 "ESGG" : ("Gothenburg", None),
50 "LKPR" : ("Prague", "Ruznye"),
51 "LBSF" : ("Sofia", "Vrhazdebna"),
52 "EPWA" : ("Warsaw", "Okecie"),
53 "LROP" : ("Bucharest", "Otopeni"),
54 "LRTR" : ("Timisoara", None),
55 "LRCK" : ("Constanta", None),
56 "LRTM" : ("Tirgu Mures", "Vidrasau"),
57 "LHBP" : ("Budapest", "Ferihegy"),
58 "LHDC" : ("Debrecen", None)
59}
60
61#-----------------------------------------------------------------------------
62
63def getWelcomeMessage(icao):
64 """Get the welcome message for the airport with the given ICAO code."""
65 message = "Welcome to "
66 if icao in airportNames:
67 (town, airportName) = airportNames[icao]
68 message += town if airportName is None else (airportName + " Airport")
69 else:
70 message += icao
71 message += "."
72 return message
73
74#-----------------------------------------------------------------------------
75
76if __name__ == "__main__":
77 for (town, airport) in airportNames.itervalues():
78 print town, airport
79 print getWelcomeMessage("LIRF")
80 print getWelcomeMessage("LHDC")
81 print getWelcomeMessage("LIRN")
82
83#-----------------------------------------------------------------------------
Note: See TracBrowser for help on using the repository browser.