Index: src/mlx/acft.py
===================================================================
--- src/mlx/acft.py	(revision 139)
+++ src/mlx/acft.py	(revision 140)
@@ -328,7 +328,9 @@
     The aircraft type-specific values in the aircraft state have the following
     structure:
-    - fuel: centre, left, right
+    - fuel: left, centre, right
     - n1: left, right
     - reverser: left, right"""
+    fuelTanks = [const.FUELTANK_LEFT, const.FUELTANK_CENTRE, const.FUELTANK_RIGHT]    
+    
     def __init__(self, flight):
         super(Boeing737, self).__init__(flight)
@@ -435,7 +437,9 @@
     The aircraft type-specific values in the aircraft state have the following
     structure:
-    - fuel: centre, left, right
+    - fuel: left, right
     - n1: left, right
     - reverser: left, right."""
+    fuelTanks = [const.FUELTANK_LEFT, const.FUELTANK_RIGHT]    
+
     def __init__(self, flight):
         super(DH8D, self).__init__(flight)
@@ -466,7 +470,9 @@
     The aircraft type-specific values in the aircraft state have the following
     structure:
-    - fuel: centre, left, right
+    - fuel: left, centre, right
     - n1: left, right
     - reverser: left, right"""
+    fuelTanks = [const.FUELTANK_LEFT, const.FUELTANK_CENTRE, const.FUELTANK_RIGHT]    
+
     def __init__(self, flight):
         super(Boeing767, self).__init__(flight)
@@ -518,7 +524,9 @@
     The aircraft type-specific values in the aircraft state have the following
     structure:
-    - fuel: centre, left, right
+    - fuel: left, centre, right
     - 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)
@@ -550,7 +558,9 @@
     The aircraft type-specific values in the aircraft state have the following
     structure:
-    - fuel: centre, left, right
+    - fuel: left, centre, right
     - 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)
@@ -583,7 +593,10 @@
     The aircraft type-specific values in the aircraft state have the following
     structure:
-    - fuel: left, right, left aux, right aux
+    - fuel: left aux, left, right, right aux
     - rpm: left, right
     - reverser: left, 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)
@@ -621,8 +634,13 @@
     The aircraft type-specific values in the aircraft state have the following
     structure:
-    - fuel: centre, left tip, left aux, right tip, right aux, external 1,
+    - fuel: left tip, left aux, centre, right aux, right tip, external 1,
     external 2
     - n1: left, right
     - reverser: left, right."""
+    fuelTanks = [const.FUELTANK_LEFT_TIP, const.FUELTANK_LEFT_AUX,
+                 const.FUELTANK_CENTRE,
+                 const.FUELTANK_RIGHT_AUX, const.FUELTANK_RIGHT_TIP,
+                 const.FUELTANK_EXTERNAL1, const.FUELTANK_EXTERNAL2]
+
     def __init__(self, flight):
         super(T134, self).__init__(flight)
@@ -655,7 +673,10 @@
     The aircraft type-specific values in the aircraft state have the following
     structure:
-    - fuel: centre, left, right, centre 2, left aux, right aux
+    - fuel: left aux, left, centre, centre 2, right, right aux
     - 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)
@@ -691,4 +712,6 @@
     - n1: left, right
     - reverser: left, right"""
+    fuelTanks = [const.FUELTANK_LEFT, const.FUELTANK_RIGHT]
+    
     def __init__(self, flight):
         super(YK40, self).__init__(flight)
Index: src/mlx/const.py
===================================================================
--- src/mlx/const.py	(revision 134)
+++ src/mlx/const.py	(revision 140)
@@ -297,4 +297,36 @@
 #-------------------------------------------------------------------------------
 
+# Fuel tank: centre
+FUELTANK_CENTRE = 1
+
+# Fuel tank: left
+FUELTANK_LEFT = 2
+
+# Fuel tank: right
+FUELTANK_RIGHT = 3
+
+# Fuel tank: left aux
+FUELTANK_LEFT_AUX = 4
+
+# Fuel tank: right aux
+FUELTANK_RIGHT_AUX = 5
+
+# Fuel tank: left tip
+FUELTANK_LEFT_TIP = 6
+
+# Fuel tank: right tip
+FUELTANK_RIGHT_TIP = 7
+
+# Fuel tank: external 1
+FUELTANK_EXTERNAL1 = 8
+
+# Fuel tank: external 2
+FUELTANK_EXTERNAL2 = 9
+
+# Fuel tank: centre2
+FUELTANK_CENTRE2 = 10
+
+#-------------------------------------------------------------------------------
+
 # The available gates at LHBP
 lhbpGateNumbers = []
Index: src/mlx/fsuipc.py
===================================================================
--- src/mlx/fsuipc.py	(revision 134)
+++ src/mlx/fsuipc.py	(revision 140)
@@ -6,4 +6,5 @@
 import const
 import util
+import acft
 
 import threading
@@ -18,4 +19,18 @@
 else:
     import pyuipc_sim as pyuipc
+
+#------------------------------------------------------------------------------
+
+# The mapping of tank types to FSUIPC offsets
+_tank2offset = { const.FUELTANK_CENTRE : 0x0b74,
+                 const.FUELTANK_LEFT : 0x0b7c,
+                 const.FUELTANK_RIGHT : 0x0b94,
+                 const.FUELTANK_LEFT_AUX : 0x0b84,
+                 const.FUELTANK_RIGHT_AUX : 0x0b9c,
+                 const.FUELTANK_LEFT_TIP : 0x0b8c,
+                 const.FUELTANK_RIGHT_TIP : 0x0ba4,
+                 const.FUELTANK_EXTERNAL1 : 0x1254,
+                 const.FUELTANK_EXTERNAL2 : 0x125c,
+                 const.FUELTANK_CENTRE2 : 0x1244 }
 
 #------------------------------------------------------------------------------
@@ -1014,5 +1029,6 @@
     """A generic aircraft model that can handle the fuel levels, the N1 or RPM
     values and some other common parameters in a generic way."""
-    def __init__(self, flapsNotches, fuelInfo, numEngines, isN1 = True):
+    
+    def __init__(self, flapsNotches, fuelTanks, numEngines, isN1 = True):
         """Construct the generic aircraft model with the given data.
 
@@ -1020,7 +1036,6 @@
         notches mean.
 
-        fuelInfo is an array of FSUIPC offsets for the levels of the fuel
-        tanks. It is assumed to be a 4-byte value, followed by another 4-byte
-        value, which is the fuel tank capacity.
+        fuelTanks is an array of const.FUELTANK_XXX constants about the
+        aircraft's fuel tanks. They will be converted to offsets.
 
         numEngines is the number of engines the aircraft has.
@@ -1030,5 +1045,5 @@
         super(GenericAircraftModel, self).__init__(flapsNotches = flapsNotches)
 
-        self._fuelInfo = fuelInfo
+        self._fuelTanks = fuelTanks
         self._fuelStartIndex = None
         self._numEngines = numEngines
@@ -1049,5 +1064,6 @@
 
         self._fuelStartIndex = len(data)
-        for offset in self._fuelInfo:
+        for tank in self._fuelTanks:
+            offset = _tank2offset[tank]
             self._addOffsetWithIndexMember(data, offset, "u")    # tank level
             self._addOffsetWithIndexMember(data, offset+4, "u")  # tank capacity
@@ -1071,5 +1087,5 @@
         state.fuel = []
         for i in range(self._fuelStartIndex, 
-                       self._fuelStartIndex + 2*len(self._fuelInfo), 2):
+                       self._fuelStartIndex + 2*len(self._fuelTanks), 2):
             fuel = data[i+1]*data[i]*fuelWeight*const.LBSTOKG/128.0/65536.0
             state.fuel.append(fuel)
@@ -1092,5 +1108,5 @@
         super(GenericModel, self). \
             __init__(flapsNotches = [0, 10, 20, 30],
-                     fuelInfo = [0x0b74, 0x0b7c, 0xb94], 
+                     fuelTanks = [const.FUELTANK_LEFT, const.FUELTANK_RIGHT],
                      numEngines = 2)
 
@@ -1108,5 +1124,5 @@
         super(B737Model, self). \
             __init__(flapsNotches = [0, 1, 2, 5, 10, 15, 25, 30, 40],
-                     fuelInfo = [0x0b74, 0x0b7c, 0xb94], 
+                     fuelTanks = acft.Boeing737.fuelTanks,
                      numEngines = 2)
 
@@ -1165,5 +1181,5 @@
         super(B767Model, self). \
             __init__(flapsNotches = [0, 1, 5, 15, 20, 25, 30],
-                     fuelInfo = [0x0b74, 0x0b7c, 0xb94], 
+                     fuelTanks = acft.Boeing767.fuelTanks,
                      numEngines = 2)
 
@@ -1181,5 +1197,5 @@
         super(DH8DModel, self). \
             __init__(flapsNotches = [0, 5, 10, 15, 35],
-                     fuelInfo = [0x0b74, 0x0b7c, 0xb94], 
+                     fuelTanks = acft.DH8D.fuelTanks,
                      numEngines = 2)
 
@@ -1226,5 +1242,5 @@
         super(CRJ2Model, self). \
             __init__(flapsNotches = [0, 8, 20, 30, 45],
-                     fuelInfo = [0x0b74, 0x0b7c, 0xb94], 
+                     fuelTanks = acft.CRJ2.fuelTanks,
                      numEngines = 2)
 
@@ -1242,5 +1258,5 @@
         super(F70Model, self). \
             __init__(flapsNotches = [0, 8, 15, 25, 42],
-                     fuelInfo = [0x0b74, 0x0b7c, 0xb94], 
+                     fuelTanks = acft.F70.fuelTanks,
                      numEngines = 2)
 
@@ -1258,5 +1274,5 @@
         super(DC3Model, self). \
             __init__(flapsNotches = [0, 15, 30, 45],
-                     fuelInfo = [0x0b7c, 0x0b84, 0x0b94, 0x0b9c], 
+                     fuelTanks = acft.DC3.fuelTanks,
                      numEngines = 2)
 
@@ -1274,8 +1290,5 @@
         super(T134Model, self). \
             __init__(flapsNotches = [0, 10, 20, 30],
-                     fuelInfo = [0x0b74, 
-                                 0x0b8c, 0x0b84, 
-                                 0x0ba4, 0x0b9c,
-                                 0x1254, 0x125c], 
+                     fuelTanks = acft.T134.fuelTanks,
                      numEngines = 2)
 
@@ -1293,6 +1306,5 @@
         super(T154Model, self). \
             __init__(flapsNotches = [0, 15, 28, 45],
-                     fuelInfo = [0x0b74, 0x0b7c, 0x0b94, 
-                                 0x1244, 0x0b84, 0x0b9c],
+                     fuelTanks = acft.T154.fuelTanks,
                      numEngines = 3)
 
@@ -1318,5 +1330,5 @@
         super(YK40Model, self). \
             __init__(flapsNotches = [0, 20, 35],
-                     fuelInfo = [0x0b7c, 0x0b94],
+                     fuelTanks = acft.YK40.fuelTanks,
                      numEngines = 2)
 
