Changeset 241:dea155dd3ac0 for src/mlx/flight.py
- Timestamp:
- 06/10/12 12:32:09 (12 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/mlx/flight.py
r215 r241 116 116 """Get the touchdown rate if known, None otherwise.""" 117 117 return self._tdRate 118 119 @property 120 def speedInKnots(self): 121 """Determine if the speeds for the flight are to be expressed in 122 knots.""" 123 return self.aircraft.speedInKnots if self.aircraft is not None \ 124 else True 118 125 119 126 def handleState(self, oldState, currentState): … … 207 214 self._checklistHotkeyPressed = True 208 215 216 def speedFromKnots(self, knots): 217 """Convert the given speed value expressed in knots into the flight's 218 speed unit.""" 219 return knots if self.speedInKnots else knots * const.KNOTSTOKMPH 220 221 def speedToKnots(self, speed): 222 """Convert the given speed expressed in the flight's speed unit into 223 knots.""" 224 return speed if self.speedInKnots else speed * const.KMPHTOKNOTS 225 226 def getEnglishSpeedUnit(self): 227 """Get the English name of the speed unit used by the flight.""" 228 return "knots" if self.speedInKnots else "km/h" 229 230 def getI18NSpeedUnit(self): 231 """Get the speed unit suffix for i18n message identifiers.""" 232 return "_knots" if self.speedInKnots else "_kmph" 233 209 234 def _updateFlownDistance(self, currentState): 210 235 """Update the flown distance."""
Note:
See TracChangeset
for help on using the changeset viewer.