Changeset 601:16ff9fcc527c for src/mlx
- Timestamp:
- 02/22/15 09:38:21 (10 years ago)
- Branch:
- default
- Phase:
- public
- Location:
- src/mlx
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
src/mlx/acft.py
r598 r601 148 148 149 149 self._checkers.append(checks.GearsLogger()) 150 self._checkers.append(checks.InitialClimbSpeedLogger()) 150 151 self._checkers.append(checks.CruiseSpeedLogger()) 151 152 self._checkers.append(checks.SpoilerLogger()) -
src/mlx/checks.py
r600 r601 169 169 #--------------------------------------------------------------------------------------- 170 170 171 class InitialClimbSpeedLogger(StateChecker): 172 """Logger for the initial climb speed.""" 173 def __init__(self): 174 """Construct the logger.""" 175 self._logged = False 176 177 def check(self, flight, aircraft, logger, oldState, state): 178 """Log the initial climb speed if the altitude is reached.""" 179 if not self._logged and \ 180 state.radioAltitude>=aircraft.initialClimbSpeedAltitude and \ 181 flight.stage in [const.STAGE_TAKEOFF, const.STAGE_CLIMB]: 182 logger.message(state.timestamp, 183 "Initial climb speed: %.0f %s - %.0f ft AGL" % \ 184 (flight.speedFromKnots(state.ias), 185 flight.getEnglishSpeedUnit(), 186 state.radioAltitude)) 187 self._logged = True 188 189 #--------------------------------------------------------------------------------------- 190 171 191 class CruiseSpeedLogger(StateChecker): 172 192 """Logger for the cruise speed."""
Note:
See TracChangeset
for help on using the changeset viewer.