Index: src/mlx/acft.py
===================================================================
--- src/mlx/acft.py	(revision 273)
+++ src/mlx/acft.py	(revision 274)
@@ -174,26 +174,30 @@
         This is the function that the simulator calls directly with the new
         state."""
-        config = self._flight.config
-
-        self._smoothedIAS.add(config.realIASSmoothingLength, aircraftState.ias)
-        aircraftState.smoothedIAS = self._smoothedIAS.get()
-
-        self._smoothedVS.add(config.realVSSmoothingLength, aircraftState.vs)
-        aircraftState.smoothedVS = self._smoothedVS.get()
-        
-        for checker in self._checkers:
-            try:
-                checker.check(self._flight, self, self._flight.logger,
-                              self._aircraftState, aircraftState)
-            except:
-                print >> sys.stderr, "Checker", checker, "failed"
-                traceback.print_exc()
-
-        self._flight.handleState(self._aircraftState, aircraftState)
-
-        self._maxVS = max(self._maxVS, aircraftState.vs)
-        self._minVS = min(self._minVS, aircraftState.vs)
-
-        self._aircraftState = aircraftState
+        try:
+            config = self._flight.config
+
+            self._smoothedIAS.add(config.realIASSmoothingLength, aircraftState.ias)
+            aircraftState.smoothedIAS = self._smoothedIAS.get()
+
+            self._smoothedVS.add(config.realVSSmoothingLength, aircraftState.vs)
+            aircraftState.smoothedVS = self._smoothedVS.get()
+
+            for checker in self._checkers:
+                try:
+                    checker.check(self._flight, self, self._flight.logger,
+                                  self._aircraftState, aircraftState)
+                except:
+                    print >> sys.stderr, "Checker", checker, "failed"
+                    traceback.print_exc()
+
+            self._flight.handleState(self._aircraftState, aircraftState)
+
+            self._maxVS = max(self._maxVS, aircraftState.vs)
+            self._minVS = min(self._minVS, aircraftState.vs)
+        except:
+            print >> sys.stderr, "Failed to handle the state"
+            traceback.print_exc()
+        finally:
+            self._aircraftState = aircraftState
     
     def setStage(self, aircraftState, newStage):
@@ -203,5 +207,5 @@
             if newStage==const.STAGE_PUSHANDTAXI:
                 self.logger.message(aircraftState.timestamp, "Block time start")
-                self.logFuel(aircraftState)
+                self._flight.logFuel(aircraftState)
                 self.logger.message(aircraftState.timestamp, 
                                     "Zero-fuel weight: %.0f kg" % (aircraftState.zfw))
@@ -234,5 +238,5 @@
                                           force = True)
                 self.logger.message(aircraftState.timestamp, "Flight time end")
-                self.logFuel(aircraftState)
+                self._flight.logFuel(aircraftState)
                 self.logger.message(aircraftState.timestamp,
                                     "Landing weight: %.0f kg, MLW: %.0f" % \
@@ -409,7 +413,5 @@
     - fuel: left, centre, right
     - n1: left, right
-    - reverser: left, right"""
-    fuelTanks = [const.FUELTANK_LEFT, const.FUELTANK_CENTRE, const.FUELTANK_RIGHT]    
-    
+    - reverser: left, right"""    
     def __init__(self, flight):
         super(Boeing737, self).__init__(flight)
@@ -426,13 +428,4 @@
                                  40 : 162 }
 
-    def logFuel(self, aircraftState):
-        """Log the amount of fuel"""
-        self.logger.message(aircraftState.timestamp,
-                            "Fuel: left=%.0f kg - centre=%.0f kg - right=%.0f kg" % \
-                            (aircraftState.fuel[0], aircraftState.fuel[1],
-                             aircraftState.fuel[2]))
-        self.logger.message(aircraftState.timestamp,
-                            "Total fuel: %.0f kg" % (sum(aircraftState.fuel),))
-                            
 #---------------------------------------------------------------------------------------
 
@@ -519,5 +512,4 @@
     - n1: left, right
     - reverser: left, right."""
-    fuelTanks = [const.FUELTANK_LEFT, const.FUELTANK_RIGHT]    
 
     def __init__(self, flight):
@@ -533,12 +525,4 @@
                                  35 : 158 }
 
-    def logFuel(self, aircraftState):
-        """Log the amount of fuel"""
-        self.logger.message(aircraftState.timestamp,
-                            "Fuel: left=%.0f kg - right=%.0f kg" % \
-                            (aircraftState.fuel[0], aircraftState.fuel[1]))
-        self.logger.message(aircraftState.timestamp,
-                            "Total fuel: %.0f kg" % (sum(aircraftState.fuel),))
-
 #---------------------------------------------------------------------------------------
 
@@ -551,5 +535,4 @@
     - n1: left, right
     - reverser: left, right"""
-    fuelTanks = [const.FUELTANK_LEFT, const.FUELTANK_CENTRE, const.FUELTANK_RIGHT]    
 
     def __init__(self, flight):
@@ -564,13 +547,4 @@
                                  30 : 175 }
 
-    def logFuel(self, aircraftState):
-        """Log the amount of fuel"""
-        self.logger.message(aircraftState.timestamp,
-                            "Fuel: left=%.0f kg - centre=%.0f kg - right=%.0f kg" % \
-                            (aircraftState.fuel[0], aircraftState.fuel[1],
-                             aircraftState.fuel[2]))
-        self.logger.message(aircraftState.timestamp,
-                            "Total fuel: %.0f kg" % (sum(aircraftState.fuel),))
-                            
 #---------------------------------------------------------------------------------------
 
@@ -605,6 +579,4 @@
     - n1: left, right
     - reverser: left, right."""
-    fuelTanks = [const.FUELTANK_LEFT, const.FUELTANK_CENTRE, const.FUELTANK_RIGHT]    
-
     def __init__(self, flight):
         super(CRJ2, self).__init__(flight)
@@ -620,13 +592,4 @@
                                  45 : 175 }
 
-    def logFuel(self, aircraftState):
-        """Log the amount of fuel"""
-        self.logger.message(aircraftState.timestamp,
-                            "Fuel: left=%.0f kg - centre=%.0f kg - right=%.0f kg" % \
-                            (aircraftState.fuel[0], aircraftState.fuel[1],
-                             aircraftState.fuel[2]))
-        self.logger.message(aircraftState.timestamp,
-                            "Total fuel: %.0f kg" % (sum(aircraftState.fuel),))
-                            
 #---------------------------------------------------------------------------------------
 
@@ -639,6 +602,4 @@
     - n1: left, right
     - reverser: left, right."""
-    fuelTanks = [const.FUELTANK_LEFT, const.FUELTANK_CENTRE, const.FUELTANK_RIGHT]    
-
     def __init__(self, flight):
         super(F70, self).__init__(flight)
@@ -655,13 +616,4 @@
                                  42 : 180 }
 
-    def logFuel(self, aircraftState):
-        """Log the amount of fuel"""
-        self.logger.message(aircraftState.timestamp,
-                            "Fuel: left=%.0f kg - centre=%.0f kg - right=%.0f kg" % \
-                            (aircraftState.fuel[0], aircraftState.fuel[1],
-                             aircraftState.fuel[2]))
-        self.logger.message(aircraftState.timestamp,
-                            "Total fuel: %.0f kg" % (sum(aircraftState.fuel),))
-                            
 #---------------------------------------------------------------------------------------
 
@@ -674,8 +626,4 @@
     - rpm: left, right
     - reverser: left, right."""
-    fuelTanks = [const.FUELTANK_LEFT, const.FUELTANK_CENTRE, const.FUELTANK_RIGHT]    
-    # fuelTanks = [const.FUELTANK_LEFT_AUX, const.FUELTANK_LEFT,
-    #              const.FUELTANK_RIGHT, const.FUELTANK_RIGHT_AUX]
-
     def __init__(self, flight):
         super(DC3, self).__init__(flight)
@@ -697,13 +645,4 @@
         return True
 
-    def logFuel(self, aircraftState):
-        """Log the amount of fuel"""
-        self.logger.message(aircraftState.timestamp,
-                            "Fuel: left aux=%.0f kg - left=%.0f kg - right=%.0f kg - right aux=%.0f kg" % \
-                            (aircraftState.fuel[0], aircraftState.fuel[1],
-                             aircraftState.fuel[2], aircraftState.fuel[3]))
-        self.logger.message(aircraftState.timestamp,
-                            "Total fuel: %.0f kg" % (sum(aircraftState.fuel),))
-                            
 #---------------------------------------------------------------------------------------
 
@@ -717,10 +656,4 @@
     - n1: left, right
     - reverser: left, right."""
-    fuelTanks = [const.FUELTANK_LEFT_TIP, const.FUELTANK_EXTERNAL1,
-                 const.FUELTANK_LEFT_AUX,
-                 const.FUELTANK_CENTRE,
-                 const.FUELTANK_RIGHT_AUX,
-                 const.FUELTANK_EXTERNAL2, const.FUELTANK_RIGHT_TIP]
-
     def __init__(self, flight):
         super(T134, self).__init__(flight)
@@ -740,15 +673,4 @@
         return False
     
-    def logFuel(self, aircraftState):
-        """Log the amount of fuel"""
-        self.logger.message(aircraftState.timestamp,
-                            "Fuel: left tip=%.0f kg - external 1=%.0f kg - left aux=%.0f kg - centre= %.0f kg - right aux=%.0f kg - external 2=%.0f kg - right tip=%.0f kg" % \
-                            (aircraftState.fuel[0], aircraftState.fuel[1],
-                             aircraftState.fuel[2], 
-                             aircraftState.fuel[3], aircraftState.fuel[4],
-                             aircraftState.fuel[5], aircraftState.fuel[6]))
-        self.logger.message(aircraftState.timestamp,
-                            "Total fuel: %.0f kg" % (sum(aircraftState.fuel),))
-                            
     def _appendLightsLoggers(self):
         """Append the loggers needed for the lights."""
@@ -773,7 +695,4 @@
     - n1: left, centre, right
     - reverser: left, right"""
-    fuelTanks = [const.FUELTANK_LEFT_AUX, const.FUELTANK_LEFT,
-                 const.FUELTANK_CENTRE, const.FUELTANK_CENTRE2,
-                 const.FUELTANK_RIGHT, const.FUELTANK_RIGHT_AUX]
     def __init__(self, flight):
         super(T154, self).__init__(flight)
@@ -793,14 +712,4 @@
         return False
     
-    def logFuel(self, aircraftState):
-        """Log the amount of fuel"""
-        self.logger.message(aircraftState.timestamp,
-                            "Fuel: left aux=%.0f kg - left=%.0f kg - centre=%.0f kg - centre 2=%.0f kg - right=%.0f kg - right aux=%.0f kg" % \
-                            (aircraftState.fuel[0], aircraftState.fuel[1],
-                             aircraftState.fuel[2], aircraftState.fuel[3], 
-                             aircraftState.fuel[4], aircraftState.fuel[5]))
-        self.logger.message(aircraftState.timestamp,
-                            "Total fuel: %.0f kg" % (sum(aircraftState.fuel),))
-
     def _appendLightsLoggers(self):
         """Append the loggers needed for the lights."""
@@ -826,6 +735,4 @@
     - n1: left, right
     - reverser: left, right"""
-    fuelTanks = [const.FUELTANK_LEFT, const.FUELTANK_RIGHT]
-    
     def __init__(self, flight):
         super(YK40, self).__init__(flight)
@@ -844,12 +751,4 @@
         return False
     
-    def logFuel(self, aircraftState):
-        """Log the amount of fuel"""
-        self.logger.message(aircraftState.timestamp,
-                            "Fuel: left=%.0f kg - right=%.0f kg" % \
-                            (aircraftState.fuel[0], aircraftState.fuel[1]))
-        self.logger.message(aircraftState.timestamp,
-                            "Total fuel: %.0f kg" % (sum(aircraftState.fuel),))
-
     def _appendLightsLoggers(self):
         """Append the loggers needed for the lights."""
@@ -866,5 +765,9 @@
 #---------------------------------------------------------------------------------------
 
-MostFuelTankAircraft = T134
+mostFuelTanks = [const.FUELTANK_LEFT_TIP, const.FUELTANK_EXTERNAL1,
+                 const.FUELTANK_LEFT_AUX,
+                 const.FUELTANK_CENTRE,
+                 const.FUELTANK_RIGHT_AUX,
+                 const.FUELTANK_EXTERNAL2, const.FUELTANK_RIGHT_TIP]
 
 #---------------------------------------------------------------------------------------
Index: src/mlx/const.py
===================================================================
--- src/mlx/const.py	(revision 252)
+++ src/mlx/const.py	(revision 274)
@@ -468,4 +468,22 @@
 #-------------------------------------------------------------------------------
 
+_fuelTankLogStrings = { FUELTANK_CENTRE : "centre",
+                        FUELTANK_LEFT : "left",
+                        FUELTANK_RIGHT : "right",
+                        FUELTANK_LEFT_AUX : "left aux",
+                        FUELTANK_RIGHT_AUX : "right aux",
+                        FUELTANK_LEFT_TIP : "left tip",
+                        FUELTANK_RIGHT_TIP : "right tip",
+                        FUELTANK_EXTERNAL1 : "external 1",
+                        FUELTANK_EXTERNAL2 : "external 2",
+                        FUELTANK_CENTRE2 : "centre 2" }
+
+def fuelTank2logString(fuelTank):
+    """Get the log string equivalent of the given fuelTank."""
+    return _fuelTankLogStrings[fuelTank] \
+        if fuelTank in _fuelTankLogStrings else "unknown"
+
+#-------------------------------------------------------------------------------
+
 # The available gates at LHBP
 lhbpGateNumbers = []
Index: src/mlx/flight.py
===================================================================
--- src/mlx/flight.py	(revision 262)
+++ src/mlx/flight.py	(revision 274)
@@ -208,5 +208,5 @@
         self._updateFlownDistance(currentState)
         
-        self.endFuel = sum(currentState.fuel)
+        self.endFuel = currentState.totalFuel
         if self.startFuel is None:
             self.startFuel = self.endFuel
@@ -312,4 +312,15 @@
         return "_knots" if self.speedInKnots else "_kmph"
 
+    def logFuel(self, aircraftState):
+        """Log the amount of fuel"""
+        fuelStr = ""
+        for (tank, amount) in aircraftState.fuel:
+            if fuelStr: fuelStr += " - "
+            fuelStr += "%s=%.0f kg" % (const.fuelTank2logString(tank), amount)
+            
+        self.logger.message(aircraftState.timestamp, "Fuel: " + fuelStr)
+        self.logger.message(aircraftState.timestamp,
+                            "Total fuel: %.0f kg" % (aircraftState.totalFuel,))                            
+
     def _updateFlownDistance(self, currentState):
         """Update the flown distance."""
Index: src/mlx/fs.py
===================================================================
--- src/mlx/fs.py	(revision 263)
+++ src/mlx/fs.py	(revision 274)
@@ -184,6 +184,8 @@
     - flapsSet: the selected degrees of the flaps (float)
     - flaps: the actual degrees of the flaps (float)
-    - fuelWeight[]: the fuel weights in the different tanks in kgs (array of
-    floats of as many items as the number fuel tanks)
+    - fuel[]: the fuel information. It is a list of tuples with items:
+    the fuel tank identifier and the amount of fuel in that tank in
+    kgs
+    - totalFuel: the total amount of fuel in kg
     - n1[]: the N1 values of the turbine engines (array of floats
     of as many items as the number of engines, present only for aircraft with
Index: src/mlx/fsuipc.py
===================================================================
--- src/mlx/fsuipc.py	(revision 263)
+++ src/mlx/fsuipc.py	(revision 274)
@@ -658,19 +658,16 @@
                                    extra = _disconnect)
 
-    def getFuel(self, tanks, callback):
-        """Get the fuel from the given tanks.
-
-        The callback will be called with a list of two-tuples, where the tuples
-        have the following items:
+    def getFuel(self, callback):
+        """Get the fuel information for the current model.
+
+        The callback will be called with a list of triplets with the following
+        items:
+        - the fuel tank identifier
         - the current weight of the fuel in the tank (in kgs)
         - the current total capacity of the tank (in kgs)."""
-        data = [(0x0af4, "H")]     # Fuel weight
-        for tank in tanks:
-            offset = _tank2offset[tank]
-            data.append( (offset, "u") )     # tank level
-            data.append( (offset+4, "u") )   # tank capacity
-
-        self._handler.requestRead(data, self._handleFuelRetrieved,
-                                  extra = callback)
+        if self._aircraftModel is None:
+            callback([])
+        else:
+            self._aircraftModel.getFuel(self._handler, callback)
 
     def setFuelLevel(self, levels):
@@ -682,10 +679,6 @@
         - the requested level of the fuel as a floating-point value between 0.0
         and 1.0."""
-        data = []
-        for (tank, level) in levels:
-            offset = _tank2offset[tank]
-            value = long(level * 128.0 * 65536.0)
-            data.append( (offset, "u", value) )
-        self._handler.requestWrite(data, self._handleFuelWritten)
+        if self._aircraftModel is not None:
+            self._aircraftModel.setFuelLevel(self._handler, levels)
 
     def enableTimeSync(self):
@@ -999,19 +992,4 @@
         if disconnect:
             self._handler.disconnect()
-
-    def _handleFuelRetrieved(self, data, callback):
-        """Callback for a fuel retrieval request."""
-        fuelWeight = data[0] / 256.0
-        result = []
-        for i in range(1, len(data), 2):
-            capacity = data[i+1] * fuelWeight * const.LBSTOKG
-            amount = data[i] * capacity / 128.0 / 65536.0
-            result.append( (amount, capacity) )
-
-        callback(result)
-                                                  
-    def _handleFuelWritten(self, success, extra):
-        """Callback for a fuel setting request."""
-        pass
 
     def _handleNumHotkeys(self, data, (id, generation)):
@@ -1380,11 +1358,5 @@
         super(GenericAircraftModel, self).addMonitoringData(data, fsType)
         
-        self._addOffsetWithIndexMember(data, 0x0af4, "H", "_monidx_fuelWeight")
-
-        self._fuelStartIndex = len(data)
-        for tank in self._fuelTanks:
-            offset = _tank2offset[tank]
-            self._addOffsetWithIndexMember(data, offset, "u")    # tank level
-            self._addOffsetWithIndexMember(data, offset+4, "u")  # tank capacity
+        self._fuelStartIndex = self._addFuelOffsets(data, "_monidx_fuelWeight")
 
         self._engineStartIndex = len(data)
@@ -1406,11 +1378,6 @@
                                                                    data)
 
-        fuelWeight = data[self._monidx_fuelWeight]/256.0
-        state.fuel = []
-        for i in range(self._fuelStartIndex, 
-                       self._fuelStartIndex + 2*len(self._fuelTanks), 2):
-            fuel = data[i+1]*data[i]*fuelWeight*const.LBSTOKG/128.0/65536.0
-            state.fuel.append(fuel)
-
+        (state.fuel, state.totalFuel) = \
+            self._convertFuelData(data, index = self._monidx_fuelWeight)
 
         state.n1 = [] if self._isN1 else None
@@ -1431,4 +1398,80 @@
         return state
 
+    def getFuel(self, handler, callback):
+        """Get the fuel information for this model.
+
+        See Simulator.getFuel for more information. This
+        implementation simply queries the fuel tanks given to the
+        constructor."""
+        data = []
+        self._addFuelOffsets(data)
+
+        handler.requestRead(data, self._handleFuelRetrieved,
+                            extra = callback)
+
+    def setFuelLevel(self, handler, levels):
+        """Set the fuel level.
+
+        See the description of Simulator.setFuelLevel. This
+        implementation simply sets the fuel tanks as given."""
+        data = []
+        for (tank, level) in levels:
+            offset = _tank2offset[tank]
+            value = long(level * 128.0 * 65536.0)
+            data.append( (offset, "u", value) )
+
+        handler.requestWrite(data, self._handleFuelWritten)
+
+    def _addFuelOffsets(self, data, weightIndexName = None):
+        """Add the fuel offsets to the given data array.
+
+        If weightIndexName is not None, it will be the name of the
+        fuel weight index.
+
+        Returns the index of the first fuel tank's data."""
+        self._addOffsetWithIndexMember(data, 0x0af4, "H", weightIndexName)
+
+        fuelStartIndex = len(data)
+        for tank in self._fuelTanks:
+            offset = _tank2offset[tank]
+            self._addOffsetWithIndexMember(data, offset, "u")    # tank level
+            self._addOffsetWithIndexMember(data, offset+4, "u")  # tank capacity
+        
+        return fuelStartIndex
+
+    def _convertFuelData(self, data, index = 0, addCapacities = False):
+        """Convert the given data into a fuel info list.
+
+        The list consists of two or three-tuples of the following
+        items:
+        - the fuel tank ID,
+        - the amount of the fuel in kg,
+        - if addCapacities is True, the total capacity of the tank."""
+        fuelWeight = data[index] / 256.0
+        index += 1
+
+        result = []
+        totalFuel = 0
+        for fuelTank in self._fuelTanks:
+            capacity = data[index+1] * fuelWeight * const.LBSTOKG
+            amount = data[index] * capacity / 128.0 / 65536.0
+            index += 2
+            
+            result.append( (fuelTank, amount, capacity) if addCapacities 
+                           else (fuelTank, amount))
+            totalFuel += amount
+
+        return (result, totalFuel)        
+
+    def _handleFuelRetrieved(self, data, callback):
+        """Callback for a fuel retrieval request."""
+        (fuelData, _totalFuel) = self._convertFuelData(data, 
+                                                       addCapacities = True)
+        callback(fuelData)
+                                                          
+    def _handleFuelWritten(self, success, extra):
+        """Callback for a fuel setting request."""
+        pass
+
 #------------------------------------------------------------------------------
 
@@ -1451,9 +1494,11 @@
 class B737Model(GenericAircraftModel):
     """Generic model for the Boeing 737 Classing and NG aircraft."""
+    fuelTanks = [const.FUELTANK_LEFT, const.FUELTANK_CENTRE, const.FUELTANK_RIGHT]    
+    
     def __init__(self):
         """Construct the model."""
         super(B737Model, self). \
             __init__(flapsNotches = [0, 1, 2, 5, 10, 15, 25, 30, 40],
-                     fuelTanks = acft.Boeing737.fuelTanks,
+                     fuelTanks = B737Model.fuelTanks,
                      numEngines = 2)
 
@@ -1519,9 +1564,11 @@
 class B767Model(GenericAircraftModel):
     """Generic model for the Boeing 767 aircraft."""
+    fuelTanks = [const.FUELTANK_LEFT, const.FUELTANK_CENTRE, const.FUELTANK_RIGHT]    
+
     def __init__(self):
         """Construct the model."""
         super(B767Model, self). \
             __init__(flapsNotches = [0, 1, 5, 15, 20, 25, 30],
-                     fuelTanks = acft.Boeing767.fuelTanks,
+                     fuelTanks = Boeing767Model.fuelTanks,
                      numEngines = 2)
 
@@ -1535,9 +1582,11 @@
 class DH8DModel(GenericAircraftModel):
     """Generic model for the Bombardier  Dash 8-Q400 aircraft."""
+    fuelTanks = [const.FUELTANK_LEFT, const.FUELTANK_RIGHT]    
+    
     def __init__(self):
         """Construct the model."""
         super(DH8DModel, self). \
             __init__(flapsNotches = [0, 5, 10, 15, 35],
-                     fuelTanks = acft.DH8D.fuelTanks,
+                     fuelTanks = DH8DModel.fuelTanks,
                      numEngines = 2)
 
@@ -1580,9 +1629,11 @@
 class CRJ2Model(GenericAircraftModel):
     """Generic model for the Bombardier CRJ-200 aircraft."""
+    fuelTanks = [const.FUELTANK_LEFT, const.FUELTANK_CENTRE, const.FUELTANK_RIGHT]    
+
     def __init__(self):
         """Construct the model."""
         super(CRJ2Model, self). \
             __init__(flapsNotches = [0, 8, 20, 30, 45],
-                     fuelTanks = acft.CRJ2.fuelTanks,
+                     fuelTanks = CRJ2Model.fuelTanks,
                      numEngines = 2)
 
@@ -1596,9 +1647,11 @@
 class F70Model(GenericAircraftModel):
     """Generic model for the Fokker F70 aircraft."""
+    fuelTanks = [const.FUELTANK_LEFT, const.FUELTANK_CENTRE, const.FUELTANK_RIGHT]    
+
     def __init__(self):
         """Construct the model."""
         super(F70Model, self). \
             __init__(flapsNotches = [0, 8, 15, 25, 42],
-                     fuelTanks = acft.F70.fuelTanks,
+                     fuelTanks = F70Model.fuelTanks,
                      numEngines = 2)
 
@@ -1612,9 +1665,13 @@
 class DC3Model(GenericAircraftModel):
     """Generic model for the Lisunov Li-2 (DC-3) aircraft."""
+    fuelTanks = [const.FUELTANK_LEFT, const.FUELTANK_CENTRE, const.FUELTANK_RIGHT]    
+    # fuelTanks = [const.FUELTANK_LEFT_AUX, const.FUELTANK_LEFT,
+    #              const.FUELTANK_RIGHT, const.FUELTANK_RIGHT_AUX]
+
     def __init__(self):
         """Construct the model."""
         super(DC3Model, self). \
             __init__(flapsNotches = [0, 15, 30, 45],
-                     fuelTanks = acft.DC3.fuelTanks,
+                     fuelTanks = DC3Model.fuelTanks,
                      numEngines = 2, isN1 = False)
 
@@ -1624,13 +1681,71 @@
         return "FSUIPC/Generic Lisunov Li-2 (DC-3)"
 
+    def _convertFuelData(self, data, index = 0, addCapacities = False):
+        """Convert the given data into a fuel info list.
+
+        It assumes to receive the 3 fuel tanks as seen above (left,
+        centre and right) and converts it to left aux, left, right,
+        and right aux. The amount in the left tank goes into left aux,
+        the amount of the right tank goes into right aux and the
+        amount of the centre tank goes into the left and right tanks
+        evenly distributed."""
+        (rawFuelData, totalFuel) = \
+            super(DC3Model, self)._convertFuelData(data, index, addCapacities)
+
+        centreAmount = rawFuelData[1][1]
+        if addCapacities:
+            centreCapacity = rawFuelData[1][2]
+            fuelData = [(const.FUELTANK_LEFT_AUX, 
+                         rawFuelData[0][1], rawFuelData[0][2]),
+                        (const.FUELTANK_LEFT,
+                         centreAmount/2.0, centreCapacity/2.0),
+                        (const.FUELTANK_RIGHT,
+                         centreAmount/2.0, centreCapacity/2.0),
+                        (const.FUELTANK_RIGHT_AUX,
+                         rawFuelData[2][1], rawFuelData[2][2])]
+        else:
+            fuelData = [(const.FUELTANK_LEFT_AUX, rawFuelData[0][1]),
+                        (const.FUELTANK_LEFT, centreAmount/2.0),
+                        (const.FUELTANK_RIGHT, centreAmount/2.0),
+                        (const.FUELTANK_RIGHT_AUX, rawFuelData[2][1])]
+
+        return (fuelData, totalFuel)
+
+    def setFuelLevel(self, handler, levels):
+        """Set the fuel level.
+
+        See the description of Simulator.setFuelLevel. This
+        implementation assumes to get the four-tank representation,
+        as returned by getFuel()."""
+        leftLevel = 0.0
+        centreLevel = 0.0
+        rightLevel = 0.0
+        
+        for (tank, level) in levels:
+            if tank==const.FUELTANK_LEFT_AUX: leftLevel += level
+            elif tank==const.FUELTANK_LEFT or  tank==const.FUELTANK_RIGHT: 
+                centreLevel += level
+            elif tank==const.FUELTANK_RIGHT_AUX: rightLevel += level
+
+        super(DC3Model, self).setFuelLevel([(const.FUELTANK_LEFT, leftLevel),
+                                            (const.FUELTANK_CENTRE,
+                                            centreLevel),
+                                            (const.FUELTANK_RIGHT, rightLevel)])
+
 #------------------------------------------------------------------------------
 
 class T134Model(GenericAircraftModel):
     """Generic model for the Tupolev Tu-134 aircraft."""
+    fuelTanks = [const.FUELTANK_LEFT_TIP, const.FUELTANK_EXTERNAL1,
+                 const.FUELTANK_LEFT_AUX,
+                 const.FUELTANK_CENTRE,
+                 const.FUELTANK_RIGHT_AUX,
+                 const.FUELTANK_EXTERNAL2, const.FUELTANK_RIGHT_TIP]
+
     def __init__(self):
         """Construct the model."""
         super(T134Model, self). \
             __init__(flapsNotches = [0, 10, 20, 30],
-                     fuelTanks = acft.T134.fuelTanks,
+                     fuelTanks = T134Model.fuelTanks,
                      numEngines = 2)
 
@@ -1644,9 +1759,13 @@
 class T154Model(GenericAircraftModel):
     """Generic model for the Tupolev Tu-134 aircraft."""
+    fuelTanks = [const.FUELTANK_LEFT_AUX, const.FUELTANK_LEFT,
+                 const.FUELTANK_CENTRE, const.FUELTANK_CENTRE2,
+                 const.FUELTANK_RIGHT, const.FUELTANK_RIGHT_AUX]
+
     def __init__(self):
         """Construct the model."""
         super(T154Model, self). \
             __init__(flapsNotches = [0, 15, 28, 45],
-                     fuelTanks = acft.T154.fuelTanks,
+                     fuelTanks = T154Model.fuelTanks,
                      numEngines = 3)
 
@@ -1668,9 +1787,11 @@
 class YK40Model(GenericAircraftModel):
     """Generic model for the Yakovlev Yak-40 aircraft."""
+    fuelTanks = [const.FUELTANK_LEFT, const.FUELTANK_RIGHT]
+    
     def __init__(self):
         """Construct the model."""
         super(YK40Model, self). \
             __init__(flapsNotches = [0, 20, 35],
-                     fuelTanks = acft.YK40.fuelTanks,
+                     fuelTanks = YK40Model.fuelTanks,
                      numEngines = 2)
 
Index: src/mlx/gui/flight.py
===================================================================
--- src/mlx/gui/flight.py	(revision 262)
+++ src/mlx/gui/flight.py	(revision 274)
@@ -1163,6 +1163,5 @@
             gui.beginBusy(xstr("fuel_get_busy"))
             
-            gui.simulator.getFuel(gui.flight.aircraft.fuelTanks,
-                                  self._handleFuel)
+            gui.simulator.getFuel(self._handleFuel)
         else:
             self._wizard.nextPage()
@@ -1374,7 +1373,6 @@
         self.setMainWidget(self._fuelAlignment)
 
-        tanks = acft.MostFuelTankAircraft.fuelTanks
-        tankData = ((2500, 3900),) * len(tanks)
-        self._setupTanks(tanks, tankData)
+        tankData = [(tank, 2500, 3900) for tank in acft.mostFuelTanks]
+        self._setupTanks(tankData)
 
         self.addCancelFlightButton()
@@ -1387,8 +1385,5 @@
     def activate(self):
         """Activate the page."""
-        gui = self._wizard.gui
-
-        self._setupTanks(gui.flight.aircraft.fuelTanks,
-                         self._wizard._fuelData)
+        self._setupTanks(self._wizard._fuelData)
 
     def finalize(self):
@@ -1410,7 +1405,7 @@
             self._wizard.nextPage()        
 
-    def _setupTanks(self, tanks, tankData):
+    def _setupTanks(self, tankData):
         """Setup the tanks for the given data."""
-        numTanks = len(tanks)
+        numTanks = len(tankData)
         if self._fuelTable is not None:
             self._fuelAlignment.remove(self._fuelTable)
@@ -1419,14 +1414,13 @@
         self._fuelTable = gtk.Table(numTanks, 1)
         self._fuelTable.set_col_spacings(16)
-        for i in range(0, numTanks):
-            tank = tanks[i]
-            (current, capacity) = tankData[i]
-
+        index = 0
+        for (tank, current, capacity) in tankData:
             fuelTank = FuelTank(tank,
                                 xstr("fuel_tank_" +
                                      const.fuelTank2string(tank)),
                                 capacity, current)
-            self._fuelTable.attach(fuelTank, i, i+1, 0, 1)
+            self._fuelTable.attach(fuelTank, index, index+1, 0, 1)
             self._fuelTanks.append(fuelTank)
+            index += 1
             
         self._fuelAlignment.add(self._fuelTable)
Index: src/mlx/gui/monitor.py
===================================================================
--- src/mlx/gui/monitor.py	(revision 263)
+++ src/mlx/gui/monitor.py	(revision 274)
@@ -281,5 +281,5 @@
 
             fuelStr = ""
-            for fuel in aircraftState.fuel:
+            for (_tank, fuel) in aircraftState.fuel:
                 if fuelStr: fuelStr += ", "
                 fuelStr += "%.0f" % (fuel,)                
