Changeset 478:00d38a068da9


Ignore:
Timestamp:
03/16/13 12:02:03 (11 years ago)
Author:
István Váradi <ivaradi@…>
Branch:
xplane
Parents:
450:d009a75685e8 (diff), 477:5d5e70fe99e2 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Phase:
public
Message:

Merged from the default branch

Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/mlx/checks.py

    r450 r478  
    5656                aircraft.setStage(state, const.STAGE_PUSHANDTAXI)
    5757        elif stage==const.STAGE_PUSHANDTAXI or stage==const.STAGE_RTO:
    58             if state.strobeLightsOn:
     58            if state.strobeLightsOn or \
     59              (state.strobeLightsOn is None and state.xpdrC):
    5960                aircraft.setStage(state, const.STAGE_TAKEOFF)
    6061        elif stage==const.STAGE_TAKEOFF:
     
    6364                aircraft.setStage(state, const.STAGE_CLIMB)
    6465            elif not state.landingLightsOn and \
    65                  not state.strobeLightsOn and \
     66                 (state.strobeLightsOn is False or
     67                  (state.strobeLightsOn is None and not state.xpdrC)) and \
    6668                 state.onTheGround and \
    6769                 state.groundSpeed<50.0:
     
    940942            if n1>5: numEnginesRunning += 1
    941943
    942         if flight.stage==const.STAGE_PARKING:
     944        if flight.stage==const.STAGE_PARKING or \
     945           (flight.stage==const.STAGE_TAXIAFTERLAND and state.parking):
    943946            return numEnginesRunning<len(state.n1) \
    944947                   and state.antiCollisionLightsOn
     
    13571360    If, during the PUSHANDTAXI stage the speed exceeds 50 knots, the state as
    13581361    saved as a provisional takeoff state. If the speed then decreases below 50
    1359     knots, or the plane remains on the ground for more than 20 seconds, a taxi
     1362    knots, or the plane remains on the ground for more than 40 seconds, a taxi
    13601363    speed error is logged with the highest ground speed detected. This state is
    13611364    also stored in the flight object as a possible
    13621365
    1363     If the plane becomes airborne within 20 seconds, the stage becomes TAKEOFF,
     1366    If the plane becomes airborne within 40 seconds, the stage becomes TAKEOFF,
    13641367    and the previously saved takeoff state is logged.
    13651368
     
    13931396                    aircraft.setStage(self._takeoffState, const.STAGE_TAKEOFF)
    13941397                    self._takeoffState = None
    1395                 elif state.timestamp > (self._takeoffState.timestamp + 30):
     1398                elif state.timestamp > (self._takeoffState.timestamp + 40):
    13961399                    flight.setRTOState(self._highestSpeedState)
    13971400        elif self._takeoffState is not None:
  • src/mlx/checks.py

    r477 r478  
    957957        """Check if the fault condition holds."""
    958958        if flight.stage==const.STAGE_CRUISE:
    959             bankLimit = 30
     959            isDH8DXplane = flight.aircraftType==const.AIRCRAFT_DH8D and \
     960                           (flight.fsType==const.SIM_XPLANE10 or
     961                            flight.fsType==const.SIM_XPLANE9)
     962            bankLimit = 35 if isDH8DXplane else 30
    960963        elif flight.stage in [const.STAGE_TAKEOFF, const.STAGE_CLIMB,
    961964                              const.STAGE_DESCENT, const.STAGE_LANDING]:
     
    968971    def logFault(self, flight, aircraft, logger, oldState, state):
    969972        """Log the fault."""
     973        message = "Bank too steep (%.1f)" % (state.bank,)
    970974        flight.handleFault(BankChecker, state.timestamp,
    971                            FaultChecker._appendDuring(flight, "Bank too steep"),
     975                           FaultChecker._appendDuring(flight, message),
    972976                           2)
    973977
Note: See TracChangeset for help on using the changeset viewer.