Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/mlx/acft.py

    r905 r917  
    9797class Aircraft(object):
    9898    """Base class for aircraft."""
     99    dowCockpit = 2
     100    dowCabin = 3
     101
    99102    @staticmethod
    100103    def create(flight, bookedFlight):
     
    125128        self._landingAntiIceLineID = None
    126129
    127         self.humanWeight = 82.0
     130        self.cockpitCrewWeight = 85.0
     131        self.cabinCrewWeight = 75.0
     132        self.humanWeight = 84.0
    128133
    129134        self.initialClimbSpeedAltitude = 1500
     
    829834class B734(Boeing737CL):
    830835    """Boeing 737-400 aircraft."""
     836    dow = 35100
     837
    831838    def __init__(self, flight):
    832839        super(B734, self).__init__(flight)
    833         self.dow = 35100
    834840        self.mtow = 62822
    835841        self.mlw = 54885
     
    12431249        """Get the derate type for this type."""
    12441250        return DERATE_B462
     1251
     1252#---------------------------------------------------------------------------------------
     1253
     1254class 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
    12451279
    12461280#---------------------------------------------------------------------------------------
     
    12711305             const.AIRCRAFT_T154  : T154,
    12721306             const.AIRCRAFT_YK40  : YK40,
    1273              const.AIRCRAFT_B462  : B462 }
     1307             const.AIRCRAFT_B462  : B462,
     1308             const.AIRCRAFT_IL62  : IL62 }
    12741309
    12751310#---------------------------------------------------------------------------------------
     
    12811316#---------------------------------------------------------------------------------------
    12821317
     1318def 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
    12831330if __name__ == "__main__":
    12841331    value = SmoothedValue()
Note: See TracChangeset for help on using the changeset viewer.