- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
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()
Note:
See TracChangeset
for help on using the changeset viewer.