Changeset 349:41c486c8a0b4 for src/mlx/checks.py
- Timestamp:
- 12/10/12 19:28:32 (11 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
r346 r349 1285 1285 """Check if the speed is in the prescribed limits.""" 1286 1286 @staticmethod 1287 def logSpeedFault(flight, state ):1287 def logSpeedFault(flight, state, stage = None, updateID = None): 1288 1288 """Log the speed fault.""" 1289 1289 message = "Taxi speed over %.0f %s" % \ 1290 1290 (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) 1296 1298 1297 1299 def isCondition(self, flight, aircraft, oldState, state): … … 1314 1316 saved as a provisional takeoff state. If the speed then decreases below 50 1315 1317 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 1317 1320 1318 1321 If the plane becomes airborne within 20 seconds, the stage becomes TAKEOFF, … … 1345 1348 1346 1349 if state.timestamp > (self._takeoffState.timestamp + 20): 1347 SpeedChecker.logSpeedFault(flight,self._highestSpeedState)1350 flight.setRTOState(self._highestSpeedState) 1348 1351 elif not state.onTheGround: 1349 1352 aircraft.setStage(self._takeoffState, const.STAGE_TAKEOFF) 1350 1353 self._takeoffState = None 1351 1354 elif self._takeoffState is not None: 1352 SpeedChecker.logSpeedFault(flight,self._highestSpeedState)1355 flight.setRTOState(self._highestSpeedState) 1353 1356 self._takeoffState = None 1354 1357
Note:
See TracChangeset
for help on using the changeset viewer.