Changeset 348:50659419e5d8 for src/mlx
- Timestamp:
- 12/10/12 16:01:32 (12 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/mlx/flight.py
r346 r348 20 20 class Flight(object): 21 21 """The object with the global flight state. 22 22 23 23 It is also the hub for the other main objects participating in the handling of 24 24 the flight.""" … … 233 233 """Handle a new state information.""" 234 234 self._updateFlownDistance(currentState) 235 235 236 236 self.endFuel = currentState.totalFuel 237 237 if self.startFuel is None: 238 238 self.startFuel = self.endFuel 239 239 240 240 self._soundScheduler.schedule(currentState, 241 241 self._pilotHotkeyPressed) … … 293 293 def flareFinished(self, flareEnd, flareEndFS, tdRate): 294 294 """Called when the flare time has ended. 295 295 296 296 Return a tuple of the following items: 297 297 - a boolean indicating if FS time is used … … 329 329 def speedToKnots(self, speed): 330 330 """Convert the given speed expressed in the flight's speed unit into 331 knots.""" 331 knots.""" 332 332 return speed if self.speedInKnots else speed * const.KMPHTOKNOTS 333 333 … … 346 346 if fuelStr: fuelStr += " - " 347 347 fuelStr += "%s=%.0f kg" % (const.fuelTank2logString(tank), amount) 348 348 349 349 self.logger.message(aircraftState.timestamp, "Fuel: " + fuelStr) 350 350 self.logger.message(aircraftState.timestamp, 351 "Total fuel: %.0f kg" % (aircraftState.totalFuel,)) 351 "Total fuel: %.0f kg" % (aircraftState.totalFuel,)) 352 352 353 353 def cruiseLevelChanged(self): … … 380 380 self._previousLongitude is not None: 381 381 self.flownDistance += self._getDistance(currentState) 382 382 383 383 self._lastDistanceTime = None 384 384
Note:
See TracChangeset
for help on using the changeset viewer.