Changeset 917:803dc6bacfa5 for src
- Timestamp:
- 02/23/19 13:38:11 (6 years ago)
- Branch:
- default
- Parents:
-
908:fcf3c44650f1 (diff), 916:4f738ffc3596 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent. - Phase:
- public
- Location:
- src/mlx
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
src/mlx/acft.py
r899 r917 1149 1149 self.mtow = 100000 1150 1150 self.mlw = 80000 1151 elif bookedFlight.tailNumber=="HA-LCX": 1152 self.mtow = 100000 1153 self.mlw = 80000 1154 self.mzfw = 74000 1155 1156 self.flapSpeedLimits = { 15 : 227, 1157 28 : 194, 1158 36 : 178, 1159 45 : 162 } 1151 1160 1152 1161 def _appendLightsLoggers(self): -
src/mlx/acft.py
r905 r917 97 97 class Aircraft(object): 98 98 """Base class for aircraft.""" 99 dowCockpit = 2 100 dowCabin = 3 101 99 102 @staticmethod 100 103 def create(flight, bookedFlight): … … 125 128 self._landingAntiIceLineID = None 126 129 127 self.humanWeight = 82.0 130 self.cockpitCrewWeight = 85.0 131 self.cabinCrewWeight = 75.0 132 self.humanWeight = 84.0 128 133 129 134 self.initialClimbSpeedAltitude = 1500 … … 829 834 class B734(Boeing737CL): 830 835 """Boeing 737-400 aircraft.""" 836 dow = 35100 837 831 838 def __init__(self, flight): 832 839 super(B734, self).__init__(flight) 833 self.dow = 35100834 840 self.mtow = 62822 835 841 self.mlw = 54885 … … 1243 1249 """Get the derate type for this type.""" 1244 1250 return DERATE_B462 1251 1252 #--------------------------------------------------------------------------------------- 1253 1254 class IL62(Aircraft): 1255 """Ilyushin IL-62 aircraft. 1256 1257 The aircraft type-specific values in the aircraft state have the following 1258 structure: 1259 - fuel: left, centre, right 1260 - n1: left outer, left inner, right inner, right outer 1261 - reverser: empty (the plane has no reversers)""" 1262 dow = 69500 1263 1264 def __init__(self, flight): 1265 super(B462, self).__init__(flight) 1266 self.mtow = 165000 1267 self.mlw = 165000 1268 self.mzfw = 165000 1269 self.gearSpeedLimit = 210 1270 self.flapSpeedLimits = { 18 : 217, 1271 24 : 180, 1272 30 : 170, 1273 33 : 150 } 1274 1275 @property 1276 def derateType(self): 1277 """Get the derate type for this type.""" 1278 return DERATE_NONE 1245 1279 1246 1280 #--------------------------------------------------------------------------------------- … … 1271 1305 const.AIRCRAFT_T154 : T154, 1272 1306 const.AIRCRAFT_YK40 : YK40, 1273 const.AIRCRAFT_B462 : B462 } 1307 const.AIRCRAFT_B462 : B462, 1308 const.AIRCRAFT_IL62 : IL62 } 1274 1309 1275 1310 #--------------------------------------------------------------------------------------- … … 1281 1316 #--------------------------------------------------------------------------------------- 1282 1317 1318 def setupTypes(aircraftTypes): 1319 """Setup the values in the given types using the info retrieved 1320 from the server.""" 1321 for aircraftTypeInfo in aircraftTypes: 1322 clazz = getClass(aircraftTypeInfo.aircraftType) 1323 1324 clazz.dow = aircraftTypeInfo.dow 1325 clazz.dowCockpit = aircraftTypeInfo.dowCockpit 1326 clazz.dowCabin = aircraftTypeInfo.dowCabin 1327 1328 #--------------------------------------------------------------------------------------- 1329 1283 1330 if __name__ == "__main__": 1284 1331 value = SmoothedValue() -
src/mlx/checks.py
r896 r917 1021 1021 def isCondition(self, flight, aircraft, oldState, state): 1022 1022 """Check if the fault condition holds.""" 1023 isXPlane = (flight.aircraftType==const.AIRCRAFT_DH8D or 1024 flight.aircraftType==const.AIRCRAFT_B733) and \ 1025 (flight.fsType==const.SIM_XPLANE11 or 1026 flight.fsType==const.SIM_XPLANE10 or 1027 flight.fsType==const.SIM_XPLANE9) 1023 1028 if flight.stage==const.STAGE_CRUISE: 1024 isDH8DXplane = flight.aircraftType==const.AIRCRAFT_DH8D and \ 1025 (flight.fsType==const.SIM_XPLANE10 or 1026 flight.fsType==const.SIM_XPLANE9) 1027 bankLimit = 35 if isDH8DXplane else 30 1029 bankLimit = 40 if isXPlane else 30 1028 1030 elif flight.stage in [const.STAGE_TAKEOFF, const.STAGE_CLIMB, 1029 1031 const.STAGE_DESCENT, const.STAGE_LANDING]: 1030 bankLimit = 351032 bankLimit = 45 if isXPlane else 35 1031 1033 else: 1032 1034 return False -
src/mlx/checks.py
r912 r917 1415 1415 class PayloadChecker(SimpleFaultChecker): 1416 1416 """Check if the payload matches the specification.""" 1417 TOLERANCE=5 501417 TOLERANCE=50 1418 1418 1419 1419 @staticmethod -
src/mlx/const.py
r907 r917 49 49 ## Flight simulator type: Prepar3D 50 50 SIM_P3D = 5 51 52 ## Flight simulator type: X-Plane 11 53 SIM_XPLANE11 = 6 51 54 52 55 #------------------------------------------------------------------------------- -
src/mlx/const.py
r911 r917 12 12 13 13 ## The version of the program 14 VERSION="0. 39.6"14 VERSION="0.40.1" 15 15 16 16 #------------------------------------------------------------------------------- … … 108 108 ## Aircraft type: British Aerospace BAe-146 109 109 AIRCRAFT_B462 = 17 110 111 ## Aircraft type: British Aerospace BAe-146 112 AIRCRAFT_IL62 = 19 110 113 111 114 #------------------------------------------------------------------------------- … … 122 125 AIRCRAFT_T154, AIRCRAFT_T134, 123 126 AIRCRAFT_YK40, AIRCRAFT_DC3, 124 AIRCRAFT_B462 ]127 AIRCRAFT_B462, AIRCRAFT_IL62] 125 128 126 129 #------------------------------------------------------------------------------- … … 158 161 ## Aircraft type family: British Aerospace BAe-146 159 162 AIRCRAFT_FAMILY_B462 = 11 163 164 ## Aircraft type family: Ilyushin IL-62 165 AIRCRAFT_FAMILY_IL62 = 12 160 166 161 167 #------------------------------------------------------------------------------- … … 185 191 AIRCRAFT_FAMILY_YK40: [AIRCRAFT_YK40], 186 192 187 AIRCRAFT_FAMILY_B462: [AIRCRAFT_B462] 193 AIRCRAFT_FAMILY_B462: [AIRCRAFT_B462], 194 195 AIRCRAFT_FAMILY_IL62: [AIRCRAFT_IL62] 188 196 189 197 } … … 219 227 AIRCRAFT_T154 : "T154", 220 228 AIRCRAFT_YK40 : "YK40", 221 AIRCRAFT_B462 : "B462" } 229 AIRCRAFT_B462 : "B462", 230 AIRCRAFT_IL62 : "IL62" } 231 232 #------------------------------------------------------------------------------- 233 234 ## A mapping from ICAO codes to the corresponding aircraft types 235 icao2Type = { "B736" : AIRCRAFT_B736, 236 "B737" : AIRCRAFT_B737, 237 "B738" : AIRCRAFT_B738, 238 "B732" : AIRCRAFT_B732, 239 "B733" : AIRCRAFT_B733, 240 "B734" : AIRCRAFT_B734, 241 "B735" : AIRCRAFT_B735, 242 "DH8D" : AIRCRAFT_DH8D, 243 "B762" : AIRCRAFT_B762, 244 "B763" : AIRCRAFT_B763, 245 "CRJ2" : AIRCRAFT_CRJ2, 246 "F70" : AIRCRAFT_F70, 247 "DC3" : AIRCRAFT_DC3, 248 "T134" : AIRCRAFT_T134, 249 "T154" : AIRCRAFT_T154, 250 "YK40" : AIRCRAFT_YK40, 251 "B462" : AIRCRAFT_B462, 252 "IL62" : AIRCRAFT_IL62 } 222 253 223 254 #-------------------------------------------------------------------------------
Note:
See TracChangeset
for help on using the changeset viewer.