source: src/mlx/const.py@ 51:f0f99ac21935

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

Fleet retrieval and gate selection works, started new connection handling and the fsuipc simulator

File size: 3.6 KB
Line 
1# Various constants used in the logger
2
3#-------------------------------------------------------------------------------
4
5# The version of the program
6VERSION="0.004"
7
8#-------------------------------------------------------------------------------
9
10# The ratio between lbs and kg
11LBSTOKG=0.4536
12
13# The ratio between feet and metre
14FEETTOMETRES=0.3048
15
16#-------------------------------------------------------------------------------
17
18# Flight simulator type: MS Flight Simulator 2004
19SIM_MSFS9 = 1
20
21# Flight simulator type: MS Flight Simulator X
22SIM_MSFSX = 2
23
24# Flight simulator type: X-Plane 9
25SIM_XPLANE9 = 3
26
27# Flight simulator type: X-Plane 10
28SIM_XPLANE10 = 4
29
30#-------------------------------------------------------------------------------
31
32# Aircraft type: Boeing 737-600
33AIRCRAFT_B736 = 1
34
35# Aircraft type: Boeing 737-700
36AIRCRAFT_B737 = 2
37
38# Aircraft type: Boeing 737-800
39AIRCRAFT_B738 = 3
40
41# Aircraft type: Boeing 737-300
42AIRCRAFT_B733 = 4
43
44# Aircraft type: Boeing 737-400
45AIRCRAFT_B734 = 5
46
47# Aircraft type: Boeing 737-500
48AIRCRAFT_B735 = 6
49
50# Aircraft type: Dash-8 Q400
51AIRCRAFT_DH8D = 7
52
53# Aircraft type: Boeing 767-200
54AIRCRAFT_B762 = 8
55
56# Aircraft type: Boeing 767-300
57AIRCRAFT_B763 = 9
58
59# Aircraft type: Canadair CRJ-200
60AIRCRAFT_CRJ2 = 10
61
62# Aircraft type: Fokker F-70
63AIRCRAFT_F70 = 11
64
65# Aircraft type: Lisunov Li-2
66AIRCRAFT_DC3 = 12
67
68# Aircraft type: Tupolev Tu-134
69AIRCRAFT_T134 = 13
70
71# Aircraft type: Tupolev Tu-154
72AIRCRAFT_T154 = 14
73
74# Aircraft type: Yakovlev Yak-40
75AIRCRAFT_YK40 = 15
76
77#-------------------------------------------------------------------------------
78
79# Flight stage: boarding
80STAGE_BOARDING = 1
81
82# Flight stage: pushback, startup and taxi
83STAGE_PUSHANDTAXI = 2
84
85# Flight stage: takeoff
86STAGE_TAKEOFF = 3
87
88# Flight stage: RTO
89STAGE_RTO = 4
90
91# Flight stage: climb
92STAGE_CLIMB = 5
93
94# Flight stage: cruise
95STAGE_CRUISE = 6
96
97# Flight stage: descent
98STAGE_DESCENT = 7
99
100# Flight stage: landing
101STAGE_LANDING = 8
102
103# Flight stage: taxi after landing
104STAGE_TAXIAFTERLAND = 9
105
106# Flight stage: parking
107STAGE_PARKING = 10
108
109# Flight stage: go-around
110STAGE_GOAROUND = 11
111
112# Flight stage: end
113STAGE_END = 12
114
115#-------------------------------------------------------------------------------
116
117# Plane status: unknown
118PLANE_UNKNOWN = 0
119
120# Plane status: at home, i.e. LHBP
121PLANE_HOME = 1
122
123# Plane status: away
124PLANE_AWAY = 2
125
126# Plane status: parking
127PLANE_PARKING = 3
128
129#-------------------------------------------------------------------------------
130
131# The available gates at LHBP
132lhbpGateNumbers = []
133
134for i in range(1, 7):
135 lhbpGateNumbers.append(str(i))
136
137for i in range(10, 19):
138 lhbpGateNumbers.append(str(i))
139
140for i in range(24, 28):
141 lhbpGateNumbers.append(str(i))
142
143for i in range(31, 39):
144 lhbpGateNumbers.append(str(i))
145
146for i in range(42, 47):
147 lhbpGateNumbers.append(str(i))
148
149for i in range(60, 84):
150 if i!=70 and i!=80:
151 lhbpGateNumbers.append(str(i))
152
153#-------------------------------------------------------------------------------
154
155_stageStrings = { STAGE_BOARDING : "boarding",
156 STAGE_PUSHANDTAXI : "pushback and taxi",
157 STAGE_TAKEOFF : "takeoff",
158 STAGE_RTO : "RTO",
159 STAGE_CLIMB : "climb",
160 STAGE_CRUISE : "cruise",
161 STAGE_DESCENT : "descent",
162 STAGE_LANDING : "landing",
163 STAGE_TAXIAFTERLAND : "taxi",
164 STAGE_PARKING : "parking",
165 STAGE_GOAROUND : "go-around",
166 STAGE_END : "end" }
167
168def stage2string(stage):
169 """Convert the given stage to a lower-case string."""
170 return _stageStrings[stage] if stage in _stageStrings else None
171
172
Note: See TracBrowser for help on using the repository browser.