source: src/mlx/const.py@ 100:6aa63e0e31c0

Last change on this file since 100:6aa63e0e31c0 was 98:f017d907fa39, checked in by István Váradi <ivaradi@…>, 13 years ago

The delay code buttons are generated in a more generic way

File size: 4.5 KB
Line 
1# Various constants used in the logger
2
3#-------------------------------------------------------------------------------
4
5# The version of the program
6VERSION="0.006"
7
8#-------------------------------------------------------------------------------
9
10# The ratio between lbs and kg
11LBSTOKG=0.4536
12
13# The ratio between kgs and lbs
14KGSTOLB=1/LBSTOKG
15
16# The ratio between feet and metre
17FEETTOMETRES=0.3048
18
19#-------------------------------------------------------------------------------
20
21# Flight simulator type: MS Flight Simulator 2004
22SIM_MSFS9 = 1
23
24# Flight simulator type: MS Flight Simulator X
25SIM_MSFSX = 2
26
27# Flight simulator type: X-Plane 9
28SIM_XPLANE9 = 3
29
30# Flight simulator type: X-Plane 10
31SIM_XPLANE10 = 4
32
33#-------------------------------------------------------------------------------
34
35# Aircraft type: Boeing 737-600
36AIRCRAFT_B736 = 1
37
38# Aircraft type: Boeing 737-700
39AIRCRAFT_B737 = 2
40
41# Aircraft type: Boeing 737-800
42AIRCRAFT_B738 = 3
43
44# Aircraft type: Boeing 737-300
45AIRCRAFT_B733 = 4
46
47# Aircraft type: Boeing 737-400
48AIRCRAFT_B734 = 5
49
50# Aircraft type: Boeing 737-500
51AIRCRAFT_B735 = 6
52
53# Aircraft type: Dash-8 Q400
54AIRCRAFT_DH8D = 7
55
56# Aircraft type: Boeing 767-200
57AIRCRAFT_B762 = 8
58
59# Aircraft type: Boeing 767-300
60AIRCRAFT_B763 = 9
61
62# Aircraft type: Canadair CRJ-200
63AIRCRAFT_CRJ2 = 10
64
65# Aircraft type: Fokker F-70
66AIRCRAFT_F70 = 11
67
68# Aircraft type: Lisunov Li-2
69AIRCRAFT_DC3 = 12
70
71# Aircraft type: Tupolev Tu-134
72AIRCRAFT_T134 = 13
73
74# Aircraft type: Tupolev Tu-154
75AIRCRAFT_T154 = 14
76
77# Aircraft type: Yakovlev Yak-40
78AIRCRAFT_YK40 = 15
79
80#-------------------------------------------------------------------------------
81
82# Flight stage: boarding
83STAGE_BOARDING = 1
84
85# Flight stage: pushback, startup and taxi
86STAGE_PUSHANDTAXI = 2
87
88# Flight stage: takeoff
89STAGE_TAKEOFF = 3
90
91# Flight stage: RTO
92STAGE_RTO = 4
93
94# Flight stage: climb
95STAGE_CLIMB = 5
96
97# Flight stage: cruise
98STAGE_CRUISE = 6
99
100# Flight stage: descent
101STAGE_DESCENT = 7
102
103# Flight stage: landing
104STAGE_LANDING = 8
105
106# Flight stage: taxi after landing
107STAGE_TAXIAFTERLAND = 9
108
109# Flight stage: parking
110STAGE_PARKING = 10
111
112# Flight stage: go-around
113STAGE_GOAROUND = 11
114
115# Flight stage: end
116STAGE_END = 12
117
118#-------------------------------------------------------------------------------
119
120# Plane status: unknown
121PLANE_UNKNOWN = 0
122
123# Plane status: at home, i.e. LHBP
124PLANE_HOME = 1
125
126# Plane status: away
127PLANE_AWAY = 2
128
129# Plane status: parking
130PLANE_PARKING = 3
131
132#-------------------------------------------------------------------------------
133
134# Flight type: scheduled
135FLIGHTTYPE_SCHEDULED = 0
136
137# Flight type: old-timer
138FLIGHTTYPE_OLDTIMER = 1
139
140# Flight type: VIP
141FLIGHTTYPE_VIP = 2
142
143# Flight type: charter
144FLIGHTTYPE_CHARTER = 3
145
146#-------------------------------------------------------------------------------
147
148# Delay code: loading problems
149DELAYCODE_LOADING = 0
150
151# Delay code: VATSIM problem
152DELAYCODE_VATSIM = 1
153
154# Delay code: network problems
155DELAYCODE_NETWORK = 2
156
157# Delay code: controller's fault
158DELAYCODE_CONTROLLER = 3
159
160# Delay code: system crash or freeze
161DELAYCODE_SYSTEM = 4
162
163# Delay code: navigation problem
164DELAYCODE_NAVIGATION = 5
165
166# Delay code: traffic problems
167DELAYCODE_TRAFFIC = 6
168
169# Delay code: apron navigation
170DELAYCODE_APRON = 7
171
172# Delay code: weather problems
173DELAYCODE_WEATHER = 8
174
175# Delay code: personal reasons
176DELAYCODE_PERSONAL = 9
177
178#-------------------------------------------------------------------------------
179
180# The available gates at LHBP
181lhbpGateNumbers = []
182
183for i in range(1, 7):
184 lhbpGateNumbers.append(str(i))
185
186for i in range(10, 19):
187 lhbpGateNumbers.append(str(i))
188
189for i in range(24, 28):
190 lhbpGateNumbers.append(str(i))
191
192for i in range(31, 39):
193 lhbpGateNumbers.append(str(i))
194
195for i in range(42, 47):
196 lhbpGateNumbers.append(str(i))
197
198for i in range(60, 84):
199 if i!=70 and i!=80:
200 lhbpGateNumbers.append(str(i))
201
202#-------------------------------------------------------------------------------
203
204_stageStrings = { STAGE_BOARDING : "boarding",
205 STAGE_PUSHANDTAXI : "pushback and taxi",
206 STAGE_TAKEOFF : "takeoff",
207 STAGE_RTO : "RTO",
208 STAGE_CLIMB : "climb",
209 STAGE_CRUISE : "cruise",
210 STAGE_DESCENT : "descent",
211 STAGE_LANDING : "landing",
212 STAGE_TAXIAFTERLAND : "taxi",
213 STAGE_PARKING : "parking",
214 STAGE_GOAROUND : "go-around",
215 STAGE_END : "end" }
216
217def stage2string(stage):
218 """Convert the given stage to a lower-case string."""
219 return _stageStrings[stage] if stage in _stageStrings else None
220
221
Note: See TracBrowser for help on using the repository browser.