Changeset 631:5801fb8d2d03 for src


Ignore:
Timestamp:
04/16/15 15:40:15 (10 years ago)
Author:
István Váradi <ivaradi@…>
Branch:
default
Phase:
public
Message:

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

Location:
src/mlx
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/mlx/acft.py

    r624 r631  
    993993        """Append the checkers needed for the lights."""
    994994        self._checkers.append(checks.TupolevAntiCollisionLightsChecker())
     995        self._checkers.append(checks.TupolevLandingLightsChecker())
    995996        self._checkers.append(checks.LandingLightsChecker())
    996997        self._checkers.append(checks.NavLightsChecker())
     
    10401041        """Append the checkers needed for the lights."""
    10411042        self._checkers.append(checks.AntiCollisionLightsChecker())
     1043        self._checkers.append(checks.TupolevLandingLightsChecker())
    10421044        self._checkers.append(checks.LandingLightsChecker())
    10431045        self._checkers.append(checks.NavLightsChecker())
  • 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.