source: src/mlx/const.py@ 87:b13b4d827920

Last change on this file since 87:b13b4d827920 was 82:c24db9d1ba8d, checked in by István Váradi <ivaradi@…>, 13 years ago

There is more space for the flight number on the connect page

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