Changeset 25:d3bf7580e98e
- Timestamp:
- 02/16/12 18:41:00 (13 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/checks.py
r22 r25 22 22 class StageChecker(StateChecker): 23 23 """Check the flight stage transitions.""" 24 def __init__(self): 25 """Construct the stage checker.""" 26 self._flareStarted = False 27 24 28 def check(self, flight, aircraft, logger, oldState, state): 25 29 """Check the stage of the aircraft.""" … … 63 67 elif not state.gearsDown: 64 68 aircraft.setStage(state, const.STAGE_GOAROUND) 65 elif state.radioAltitude>200 :69 elif state.radioAltitude>200 and self._flareStarted: 66 70 aircraft.cancelFlare() 67 elif state.radioAltitude<150 and not state.onTheGround: 71 self._flareStarted = False 72 elif state.radioAltitude<150 and not state.onTheGround and \ 73 not self._flareStarted: 74 self._flareStarted = True 68 75 aircraft.prepareFlare() 69 76 elif stage==const.STAGE_TAXIAFTERLAND: … … 572 579 def logFault(self, flight, aircraft, logger, oldState, state): 573 580 """Log the fault.""" 574 logger.fault(GearSpeedLi nmitChecker, state.timestamp,581 logger.fault(GearSpeedLimitChecker, state.timestamp, 575 582 FaultChecker._appendDuring(flight, "Gear speed limit fault"), 576 583 5) … … 780 787 return flight.stage in [const.STAGE_DESCENT, const.STAGE_LANDING, 781 788 const.STAGE_TAXIAFTERLAND] and \ 782 state.groundSpeed< 80 and max(state.reverser)789 state.groundSpeed<60 and max(state.reverser) 783 790 784 791 def logFault(self, flight, aircraft, logger, oldState, state): … … 858 865 """Log the fault.""" 859 866 print state.n1 860 logger.fault( LandingLightsChecker, state.timestamp,867 logger.fault(ThrustChecker, state.timestamp, 861 868 FaultChecker._appendDuring(flight, "Thrust setting was too high (>97%)"), 862 869 FaultChecker._getLinearScore(97, 110, 0, 10, max(state.n1)))
Note:
See TracChangeset
for help on using the changeset viewer.