Changeset 1122:84d0a094eb3f


Ignore:
Timestamp:
11/28/23 18:23:58 (13 months ago)
Author:
István Váradi <ivaradi@…>
Branch:
python3
Phase:
public
Message:

Correct spoiler handling for the Felis Tu-154B2

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/mlx/xplane.py

    r1121 r1122  
    23042304                                        (TYPE_FLOAT_ARRAY, 2, 8))
    23052305
     2306        self._spoilersIndex = len(data)
     2307        self._addDatarefWithIndexMember(data,
     2308                                        "sim/flightmodel2/wing/spoiler1_deg",
     2309                                        (TYPE_FLOAT_ARRAY, 2, 0))
     2310        self._addDatarefWithIndexMember(data,
     2311                                        "sim/flightmodel2/wing/spoiler2_deg",
     2312                                        (TYPE_FLOAT_ARRAY, 2, 2))
     2313
    23062314    def getAircraftState(self, aircraft, timestamp, data):
    23072315        """Get the aircraft state.
     
    23162324        state.flapsSet = data[self._flapsControlIndex]
    23172325        state.flaps = data[self._flapsIndex][0]
     2326
     2327        state.spoilersExtension = max(
     2328            max(data[self._spoilersIndex])*100.0/50.0,
     2329            max(data[self._spoilersIndex+1])*100.0/45.0)
     2330        if state.spoilersExtension<=10.0:
     2331            state.spoilersExtension = 0.0
    23182332
    23192333        return state
Note: See TracChangeset for help on using the changeset viewer.