Changeset 274:b866c39279e8 for src/mlx/flight.py
- Timestamp:
- 07/05/12 17:51:58 (12 years ago)
- Branch:
- default
- Phase:
- public
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/mlx/flight.py
r262 r274 208 208 self._updateFlownDistance(currentState) 209 209 210 self.endFuel = sum(currentState.fuel)210 self.endFuel = currentState.totalFuel 211 211 if self.startFuel is None: 212 212 self.startFuel = self.endFuel … … 312 312 return "_knots" if self.speedInKnots else "_kmph" 313 313 314 def logFuel(self, aircraftState): 315 """Log the amount of fuel""" 316 fuelStr = "" 317 for (tank, amount) in aircraftState.fuel: 318 if fuelStr: fuelStr += " - " 319 fuelStr += "%s=%.0f kg" % (const.fuelTank2logString(tank), amount) 320 321 self.logger.message(aircraftState.timestamp, "Fuel: " + fuelStr) 322 self.logger.message(aircraftState.timestamp, 323 "Total fuel: %.0f kg" % (aircraftState.totalFuel,)) 324 314 325 def _updateFlownDistance(self, currentState): 315 326 """Update the flown distance."""
Note:
See TracChangeset
for help on using the changeset viewer.