Changeset 197:93f89e9049be for src/mlx/checks.py
- Timestamp:
- 05/27/12 11:15:19 (12 years ago)
- Branch:
- default
- hg-Phase:
- (<MercurialRepository 1 'hg:/home/ivaradi/mlx/hg' '/'>, 'public')
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/mlx/checks.py
r192 r197 619 619 """Check if the fault condition holds.""" 620 620 speedLimit = aircraft.getFlapsSpeedLimit(state.flapsSet) 621 return speedLimit is not None and state. ias>speedLimit621 return speedLimit is not None and state.smoothedIAS>speedLimit 622 622 623 623 def logFault(self, flight, aircraft, logger, oldState, state): … … 649 649 def isCondition(self, flight, aircraft, oldState, state): 650 650 """Check if the fault condition holds.""" 651 return state.gearsDown and state. ias>aircraft.gearSpeedLimit651 return state.gearsDown and state.smoothedIAS>aircraft.gearSpeedLimit 652 652 653 653 def logFault(self, flight, aircraft, logger, oldState, state): … … 803 803 class OverspeedChecker(PatientFaultChecker): 804 804 """Check if Vne has been exceeded.""" 805 def __init__(self ):805 def __init__(self, timeout = 5.0): 806 806 """Construct the checker.""" 807 super(OverspeedChecker, self).__init__(timeout = 5.0)807 super(OverspeedChecker, self).__init__(timeout = timeout) 808 808 809 809 def isCondition(self, flight, aircraft, oldState, state): … … 974 974 def isCondition(self, flight, aircraft, oldState, state): 975 975 """Check if the fault condition holds.""" 976 vs = state. vs976 vs = state.smoothedVS 977 977 altitude = state.altitude 978 978 return vs < -8000 or vs > 8000 or \ … … 988 988 def logFault(self, flight, aircraft, logger, oldState, state): 989 989 """Log the fault.""" 990 vs = state. vs990 vs = state.smoothedVS 991 991 992 992 message = "Vertical speed was %.0f feet/min" % (vs,)
Note:
See TracChangeset
for help on using the changeset viewer.