Ignore:
Timestamp:
05/27/12 11:15:19 (12 years ago)
Author:
István Váradi <ivaradi@…>
Branch:
default
Phase:
public
Message:

Added support for smoothed IAS and VS values

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/mlx/checks.py

    r192 r197  
    619619        """Check if the fault condition holds."""
    620620        speedLimit = aircraft.getFlapsSpeedLimit(state.flapsSet)
    621         return speedLimit is not None and state.ias>speedLimit
     621        return speedLimit is not None and state.smoothedIAS>speedLimit
    622622
    623623    def logFault(self, flight, aircraft, logger, oldState, state):
     
    649649    def isCondition(self, flight, aircraft, oldState, state):
    650650        """Check if the fault condition holds."""
    651         return state.gearsDown and state.ias>aircraft.gearSpeedLimit
     651        return state.gearsDown and state.smoothedIAS>aircraft.gearSpeedLimit
    652652
    653653    def logFault(self, flight, aircraft, logger, oldState, state):
     
    803803class OverspeedChecker(PatientFaultChecker):
    804804    """Check if Vne has been exceeded."""
    805     def __init__(self):
     805    def __init__(self, timeout = 5.0):
    806806        """Construct the checker."""
    807         super(OverspeedChecker, self).__init__(timeout = 5.0)
     807        super(OverspeedChecker, self).__init__(timeout = timeout)
    808808
    809809    def isCondition(self, flight, aircraft, oldState, state):
     
    974974    def isCondition(self, flight, aircraft, oldState, state):
    975975        """Check if the fault condition holds."""
    976         vs = state.vs
     976        vs = state.smoothedVS
    977977        altitude = state.altitude
    978978        return vs < -8000 or vs > 8000 or \
     
    988988    def logFault(self, flight, aircraft, logger, oldState, state):
    989989        """Log the fault."""
    990         vs = state.vs
     990        vs = state.smoothedVS
    991991
    992992        message = "Vertical speed was %.0f feet/min" % (vs,)
Note: See TracChangeset for help on using the changeset viewer.