Ignore:
Timestamp:
04/16/15 15:40:15 (9 years ago)
Author:
István Váradi <ivaradi@…>
Branch:
default
hg-Phase:
(<MercurialRepository 1 'hg:/home/ivaradi/mlx/hg' '/'>, 'public')
Message:

Added the landing lights checker for Tupolevs (re #263)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/mlx/checks.py

    r623 r631  
    998998#---------------------------------------------------------------------------------------
    999999
     1000class TupolevLandingLightsChecker(PatientFaultChecker):
     1001    """Check if the landing light is not switched on above an IAS of 340 km/h."""
     1002    def isCondition(self, flight, aircraft, oldState, state):
     1003        """Check if the fault condition holds."""
     1004        return state.landingLightsOn and state.ias>(340.0*const.KMPHTOKNOTS)
     1005
     1006    def logFault(self, flight, aircraft, logger, oldState, state):
     1007        """Log the fault."""
     1008        flight.handleFault(TupolevLandingLightsChecker, state.timestamp,
     1009                           "The landing lights were on above an IAS of 340 km/h",
     1010                           1)
     1011
     1012#---------------------------------------------------------------------------------------
     1013
    10001014class BankChecker(SimpleFaultChecker):
    10011015    """Check for the bank is within limits."""
Note: See TracChangeset for help on using the changeset viewer.