Changeset 598:85f4667214b4 for src


Ignore:
Timestamp:
02/22/15 09:33:51 (10 years ago)
Author:
István Váradi <ivaradi@…>
Branch:
default
Phase:
public
Message:

The reverser use is logged and is checked against IAS with a lower limit of 50 kts (re #242)

Location:
src/mlx
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • src/mlx/acft.py

    r597 r598  
    114114        self.humanWeight = 82.0
    115115
    116         self.reverseMinSpeed = 60
     116        self.initialClimbSpeedAltitude = 1500
     117        self.reverseMinSpeed = 50
    117118
    118119        self.needNoStrobeSpeedCheck = False
     
    194195        self._checkers.append(checks.PitotChecker())
    195196
     197        self._checkers.append(checks.ReverserLogger())
    196198        self._checkers.append(checks.ReverserChecker())
    197199
  • src/mlx/checks.py

    r594 r598  
    13241324#---------------------------------------------------------------------------------------
    13251325
     1326class ReverserLogger(StateChecker):
     1327    """Logger for the reverser."""
     1328    def check(self, flight, aircraft, logger, oldState, state):
     1329        """Log the cruise speed if necessary."""
     1330        if oldState is not None and state.reverser != oldState.reverser:
     1331            reverser = max(state.reverser)
     1332            logger.message(state.timestamp,
     1333                           "Reverser " + ("unlocked" if reverser else "closed") +
     1334                           (" - %.0f %s" % (flight.speedFromKnots(state.ias),
     1335                                            flight.getEnglishSpeedUnit())))
     1336
     1337#---------------------------------------------------------------------------------------
     1338
    13261339class ReverserChecker(SimpleFaultChecker):
    13271340    """Check if the reverser is not used below the speed prescribed for the
     
    13321345                                const.STAGE_TAXIAFTERLAND] and \
    13331346            state.reverser and \
    1334             state.groundSpeed<aircraft.reverseMinSpeed and max(state.reverser)
     1347            state.ias<aircraft.reverseMinSpeed and max(state.reverser)
    13351348
    13361349    def logFault(self, flight, aircraft, logger, oldState, state):
    13371350        """Log the fault."""
    13381351        message = "Reverser used below %.0f %s" % \
    1339                   (flight.speedFromKnots(60), flight.getEnglishSpeedUnit())
     1352                  (flight.speedFromKnots(aircraft.reverseMinSpeed), flight.getEnglishSpeedUnit())
    13401353        flight.handleFault(ReverserChecker, state.timestamp,
    13411354                           FaultChecker._appendDuring(flight, message),
Note: See TracChangeset for help on using the changeset viewer.