Ignore:
Timestamp:
12/10/12 19:28:32 (11 years ago)
Author:
István Váradi <ivaradi@…>
Branch:
default
hg-Phase:
(<MercurialRepository 1 'hg:/home/ivaradi/mlx/hg' '/'>, 'public')
Message:

The basic strobe-less RTO handling logic works (#143)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/mlx/checks.py

    r346 r349  
    12851285    """Check if the speed is in the prescribed limits."""
    12861286    @staticmethod
    1287     def logSpeedFault(flight, state):
     1287    def logSpeedFault(flight, state, stage = None, updateID = None):
    12881288        """Log the speed fault."""
    12891289        message = "Taxi speed over %.0f %s" % \
    12901290                  (flight.speedFromKnots(50), flight.getEnglishSpeedUnit())
    1291         flight.handleFault((SpeedChecker, flight.stage), state.timestamp,
    1292                            FaultChecker._appendDuring(flight, message),
    1293                            FaultChecker._getLinearScore(50, 80, 10, 15,
    1294                                                         state.groundSpeed),
    1295                            updatePrevious = True)
     1291        if stage is None:
     1292            stage = flight.stage
     1293        score = FaultChecker._getLinearScore(50, 80, 10, 15, state.groundSpeed)
     1294        return flight.handleFault((SpeedChecker, stage), state.timestamp,
     1295                                  FaultChecker._appendDuring(flight, message),
     1296                                  score, updatePrevious = updateID is None,
     1297                                  updateID = updateID)
    12961298
    12971299    def isCondition(self, flight, aircraft, oldState, state):
     
    13141316    saved as a provisional takeoff state. If the speed then decreases below 50
    13151317    knots, or the plane remains on the ground for more than 20 seconds, a taxi
    1316     speed error is logged with the highest ground speed detected.
     1318    speed error is logged with the highest ground speed detected. This state is
     1319    also stored in the flight object as a possible
    13171320
    13181321    If the plane becomes airborne within 20 seconds, the stage becomes TAKEOFF,
     
    13451348
    13461349                if state.timestamp > (self._takeoffState.timestamp + 20):
    1347                     SpeedChecker.logSpeedFault(flight, self._highestSpeedState)
     1350                    flight.setRTOState(self._highestSpeedState)
    13481351                elif not state.onTheGround:
    13491352                    aircraft.setStage(self._takeoffState, const.STAGE_TAKEOFF)
    13501353                    self._takeoffState = None
    13511354        elif self._takeoffState is not None:
    1352             SpeedChecker.logSpeedFault(flight, self._highestSpeedState)
     1355            flight.setRTOState(self._highestSpeedState)
    13531356            self._takeoffState = None
    13541357
Note: See TracChangeset for help on using the changeset viewer.