source: src/mlx/const.py@ 97:f885322fb296

Last change on this file since 97:f885322fb296 was 97:f885322fb296, checked in by István Váradi <ivaradi@…>, 12 years ago

The PIREP can be created and sent.

File size: 3.9 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# The available gates at LHBP
149lhbpGateNumbers = []
150
151for i in range(1, 7):
152 lhbpGateNumbers.append(str(i))
153
154for i in range(10, 19):
155 lhbpGateNumbers.append(str(i))
156
157for i in range(24, 28):
158 lhbpGateNumbers.append(str(i))
159
160for i in range(31, 39):
161 lhbpGateNumbers.append(str(i))
162
163for i in range(42, 47):
164 lhbpGateNumbers.append(str(i))
165
166for i in range(60, 84):
167 if i!=70 and i!=80:
168 lhbpGateNumbers.append(str(i))
169
170#-------------------------------------------------------------------------------
171
172_stageStrings = { STAGE_BOARDING : "boarding",
173 STAGE_PUSHANDTAXI : "pushback and taxi",
174 STAGE_TAKEOFF : "takeoff",
175 STAGE_RTO : "RTO",
176 STAGE_CLIMB : "climb",
177 STAGE_CRUISE : "cruise",
178 STAGE_DESCENT : "descent",
179 STAGE_LANDING : "landing",
180 STAGE_TAXIAFTERLAND : "taxi",
181 STAGE_PARKING : "parking",
182 STAGE_GOAROUND : "go-around",
183 STAGE_END : "end" }
184
185def stage2string(stage):
186 """Convert the given stage to a lower-case string."""
187 return _stageStrings[stage] if stage in _stageStrings else None
188
189
Note: See TracBrowser for help on using the repository browser.