Changeset 478:00d38a068da9
- Timestamp:
- 03/16/13 12:02:03 (12 years ago)
- Branch:
- xplane
- Parents:
-
450:d009a75685e8 (diff), 477:5d5e70fe99e2 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent. - Phase:
- public
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/mlx/checks.py
r450 r478 56 56 aircraft.setStage(state, const.STAGE_PUSHANDTAXI) 57 57 elif stage==const.STAGE_PUSHANDTAXI or stage==const.STAGE_RTO: 58 if state.strobeLightsOn: 58 if state.strobeLightsOn or \ 59 (state.strobeLightsOn is None and state.xpdrC): 59 60 aircraft.setStage(state, const.STAGE_TAKEOFF) 60 61 elif stage==const.STAGE_TAKEOFF: … … 63 64 aircraft.setStage(state, const.STAGE_CLIMB) 64 65 elif not state.landingLightsOn and \ 65 not state.strobeLightsOn and \ 66 (state.strobeLightsOn is False or 67 (state.strobeLightsOn is None and not state.xpdrC)) and \ 66 68 state.onTheGround and \ 67 69 state.groundSpeed<50.0: … … 940 942 if n1>5: numEnginesRunning += 1 941 943 942 if flight.stage==const.STAGE_PARKING: 944 if flight.stage==const.STAGE_PARKING or \ 945 (flight.stage==const.STAGE_TAXIAFTERLAND and state.parking): 943 946 return numEnginesRunning<len(state.n1) \ 944 947 and state.antiCollisionLightsOn … … 1357 1360 If, during the PUSHANDTAXI stage the speed exceeds 50 knots, the state as 1358 1361 saved as a provisional takeoff state. If the speed then decreases below 50 1359 knots, or the plane remains on the ground for more than 20 seconds, a taxi1362 knots, or the plane remains on the ground for more than 40 seconds, a taxi 1360 1363 speed error is logged with the highest ground speed detected. This state is 1361 1364 also stored in the flight object as a possible 1362 1365 1363 If the plane becomes airborne within 20 seconds, the stage becomes TAKEOFF,1366 If the plane becomes airborne within 40 seconds, the stage becomes TAKEOFF, 1364 1367 and the previously saved takeoff state is logged. 1365 1368 … … 1393 1396 aircraft.setStage(self._takeoffState, const.STAGE_TAKEOFF) 1394 1397 self._takeoffState = None 1395 elif state.timestamp > (self._takeoffState.timestamp + 30):1398 elif state.timestamp > (self._takeoffState.timestamp + 40): 1396 1399 flight.setRTOState(self._highestSpeedState) 1397 1400 elif self._takeoffState is not None: -
src/mlx/checks.py
r477 r478 957 957 """Check if the fault condition holds.""" 958 958 if flight.stage==const.STAGE_CRUISE: 959 bankLimit = 30 959 isDH8DXplane = flight.aircraftType==const.AIRCRAFT_DH8D and \ 960 (flight.fsType==const.SIM_XPLANE10 or 961 flight.fsType==const.SIM_XPLANE9) 962 bankLimit = 35 if isDH8DXplane else 30 960 963 elif flight.stage in [const.STAGE_TAKEOFF, const.STAGE_CLIMB, 961 964 const.STAGE_DESCENT, const.STAGE_LANDING]: … … 968 971 def logFault(self, flight, aircraft, logger, oldState, state): 969 972 """Log the fault.""" 973 message = "Bank too steep (%.1f)" % (state.bank,) 970 974 flight.handleFault(BankChecker, state.timestamp, 971 FaultChecker._appendDuring(flight, "Bank too steep"),975 FaultChecker._appendDuring(flight, message), 972 976 2) 973 977
Note:
See TracChangeset
for help on using the changeset viewer.