Changeset 1121:4bcf266c8ff4 for src/mlx


Ignore:
Timestamp:
11/28/23 15:32:54 (12 months ago)
Author:
István Váradi <ivaradi@…>
Branch:
python3
Phase:
public
Message:

Support for the FlightFactor and StepToSky Boeing 767 model on X-Plane.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/mlx/xplane.py

    r1109 r1121  
    19531953#------------------------------------------------------------------------------
    19541954
     1955class FFSTSB767Model(B767Model):
     1956    """Model handler for the FlighFactor and StepToSky Boeing 767 aircraft."""
     1957    @staticmethod
     1958    def doesHandle(aircraft, data):
     1959        """Determine if this model handler handles the aircraft with the given
     1960        name."""
     1961        (tailnum, author, description, notes, icao, liveryPath) = data
     1962        return (aircraft.type==const.AIRCRAFT_B762 and
     1963                tailnum=="FFSTS" and icao=="B762") or \
     1964               (aircraft.type==const.AIRCRAFT_B763 and
     1965                tailnum=="FFSTS" and icao=="B763")
     1966
     1967    @property
     1968    def name(self):
     1969        """Get the name for this aircraft model."""
     1970        return "X-Plane/FlightFactor and StepToSky Boeing 767"
     1971
     1972    def getAircraftState(self, aircraft, timestamp, data):
     1973        """Get the aircraft state.
     1974
     1975        Get it from the parent, and then invert the pitot heat state."""
     1976        state = super(FFSTSB767Model, self).getAircraftState(aircraft,
     1977                                                             timestamp,
     1978                                                             data)
     1979        if state.spoilersExtension<40:
     1980            state.spoilersExtension = 0.0
     1981
     1982        return state
     1983
     1984#------------------------------------------------------------------------------
     1985
    19551986class DH8DModel(GenericAircraftModel):
    19561987    """Generic model for the Bombardier  Dash 8-Q400 aircraft."""
     
    23322363AircraftModel.registerSpecial(LevelUpB737Model)
    23332364AircraftModel.registerSpecial(LevelUpB738Model)
     2365AircraftModel.registerSpecial(FFSTSB767Model)
    23342366AircraftModel.registerSpecial(FJSDH8DModel)
    23352367AircraftModel.registerSpecial(FJSDH8DXPModel)
Note: See TracChangeset for help on using the changeset viewer.