Changeset 642:c2d51278efcd for src/mlx


Ignore:
Timestamp:
06/21/15 08:35:09 (9 years ago)
Author:
István Váradi <ivaradi@…>
Branch:
default
Phase:
public
Message:

Using a different speed brake dataref for the FlyJSim Dash 8 (re #271)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/mlx/xplane.py

    r641 r642  
    17421742        return "X-Plane/FlyJSim Bombardier Dash 8-Q400"
    17431743
     1744    def addMonitoringData(self, data, fsType):
     1745        """Add the model-specific monitoring data to the given array."""
     1746        super(FJSDH8DModel, self).addMonitoringData(data, fsType)
     1747
     1748        self._speedBrakeIndex = len(data)
     1749        self._addDatarefWithIndexMember(data,
     1750                                        "sim/flightmodel2/wing/speedbrake1_deg",
     1751                                        (TYPE_FLOAT_ARRAY, 2))
     1752        self._addDatarefWithIndexMember(data,
     1753                                        "sim/flightmodel2/wing/speedbrake2_deg",
     1754                                        (TYPE_FLOAT_ARRAY, 2))
     1755
     1756
    17441757    def getAircraftState(self, aircraft, timestamp, data):
    17451758        """Get the aircraft state.
     
    17561769        # (maybe due to winds?)
    17571770        state.n1 = [0 if n1<2.0 else n1 for n1 in state.n1]
     1771
     1772        state.spoilersExtension = \
     1773            sum(data[self._speedBrakeIndex] + data[self._speedBrakeIndex+1])/4
    17581774
    17591775        return state
Note: See TracChangeset for help on using the changeset viewer.