Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/mlx/fsuipc.py

    r412 r456  
    17401740        return "FSUIPC/Dreamwings Bombardier Dash 8-Q400"
    17411741
     1742    def addMonitoringData(self, data, fsType):
     1743        """Add the model-specific monitoring data to the given array."""
     1744        super(DreamwingsDH8DModel, self).addMonitoringData(data, fsType)
     1745
     1746        self._addOffsetWithIndexMember(data, 0x132c, "d", "_dwdh8d_navgps")
     1747
    17421748    def getAircraftState(self, aircraft, timestamp, data):
    17431749        """Get the aircraft state.
     
    17471753                                                                  timestamp,
    17481754                                                                  data)
    1749         state.pitotHeatOn = not state.pitotHeatOn
     1755        if data[self._dwdh8d_navgps]==1:
     1756            state.apHeading = None
    17501757
    17511758        return state
     
    20432050#------------------------------------------------------------------------------
    20442051
     2052class B462Model(GenericAircraftModel):
     2053    """Generic model for the British Aerospace BAe 146-200 aircraft."""
     2054    fuelTanks = [const.FUELTANK_LEFT, const.FUELTANK_CENTRE,
     2055                 const.FUELTANK_RIGHT]
     2056
     2057    def __init__(self):
     2058        """Construct the model."""
     2059        super(B462Model, self). \
     2060            __init__(flapsNotches = [0, 18, 24, 30, 33],
     2061                     fuelTanks = B462Model.fuelTanks,
     2062                     numEngines = 4)
     2063
     2064    @property
     2065    def name(self):
     2066        """Get the name for this aircraft model."""
     2067        return "FSUIPC/Generic British Aerospace 146"
     2068
     2069    def getAircraftState(self, aircraft, timestamp, data):
     2070        """Get an aircraft state object for the given monitoring data.
     2071
     2072        This removes the reverser value for the middle engine."""
     2073        state = super(B462Model, self).getAircraftState(aircraft, timestamp, data)
     2074        state.reverser = []
     2075        return state
     2076
     2077#------------------------------------------------------------------------------
     2078
    20452079_genericModels = { const.AIRCRAFT_B736  : B737Model,
    20462080                   const.AIRCRAFT_B737  : B737Model,
     
    20582092                   const.AIRCRAFT_T134  : T134Model,
    20592093                   const.AIRCRAFT_T154  : T154Model,
    2060                    const.AIRCRAFT_YK40  : YK40Model }
     2094                   const.AIRCRAFT_YK40  : YK40Model,
     2095                   const.AIRCRAFT_B462  : B462Model }
    20612096
    20622097#------------------------------------------------------------------------------
Note: See TracChangeset for help on using the changeset viewer.