Here are two examples of fuel tank selection for airplanes where Center tanks are used first, followed by AUX then wing etc.
The F-4 requires selection of the external centerline external tank first, followed by external wing tanks, then Internal fuel which consists of internal wing and fuselage tanks.
I used the following:
[fuel]
LeftMain=0.000, -6.000, 0.000,315.000, 0.000// 315Left Internal Wing
RightMain=0.000, 6.000, 0.000, 315.000, 0.000// 315Right Internal Wing
Center1=0.000, 0.000, 0.000, 1225.000, 0.000// 1225 Fuselage Tanks 1 to 6
Center3=0.000, 0.000, -4.100, 600.000, 0.000// Ext centerline 600
Leftaux=0.000, -11.000, -3.7500, 370.000, 0.000// Left drop 370
Rightaux=0.000, 11.000, -3.750, 370.000, 0.000//Right Drop 370
Since it has two engines I used FUEL_SELECTOR for the left and FUEL_SELECTOR2 for the right.
My sequence was Center3 for both engines until 1 gal remaining,then Leftaux for the left engine and Rightaux for the right engine, again until 1 gal remaining then ALL for both, which fed the LeftMain and Right Main (internal wings) and ended up with Center1 (fuselage tanks) plus the rmaining 1 gal in the external center and wing (aux) tanks. A three position CENTER, OUTBD and INT WING switch was linked to the code to show the sequence.
Code:
<!-- ====Transfer Centerline first then left and right aux then select All when empty===================== -->
<Element>
<Select>
<Value>(A:fuel tank center3 quantity,gallons) 1 > if{ 8 (>K:FUEL_SELECTOR_SET) 8 (>K:FUEL_SELECTOR_2_SET) } els{ (A:fuel tank left aux quantity,gallons) 1 > if{ 1 (>K:FUEL_SELECTOR_LEFT_AUX) } els{ 1 (>K:FUEL_SELECTOR_ALL) } (A:fuel tank right aux quantity,gallons) 1 > if{ 1 (>K:FUEL_SELECTOR_2_RIGHT_AUX) } els{ 1 (>K:FUEL_SELECTOR_2_ALL) } }</Value>
</Select>
</Element>
A second example is for a Hunter with four external wing tanks and an internal fuel tank that has to feed first until it is down to 79%. This airplane has a fuel proportioner system which attempts to feed fuel equally from the left and right external tanks and left and right internal tanks through, essentially, one fuel selector. If an inbalance occurs it can be corrected by turning off the fuel pump for the high side.(which will not work in FS) To model this system I had to select left and right fuel in a sequence where left was selected until the total fuel on the left was just lower than on the right, wherupon fuel was selected from the right side. This happens until the internal wings are empty and ALL is selected to finish off the fuselage plus dribbles remaining elsewhere.
[fuel]
center1=0,0,0,294.4,0 // fuselage tanks
LeftMain=0,-2,0,81.67,0 // internal wing left
RightMain=0,2,0,81.67,0 // internal wing right
Leftaux = 0.000, -9.600, -2.600, 268.33, 0.000 //Inboard external left 230 Imp gal
Rightaux = 0.000, 9.600, -2.600, 268.33, 0.000 //Inboard external right 230 Imp gal
Lefttip = -4.7500, -13.500, -2.500, 116.67, 0.000 //Outboard external left 100 Imp gal
Righttip = -4.7500, 13.500, -2.500, 116.67, 0.000 //Outboard external right 100 Imp gal
number_of_tank_selectors = 1
There was earlier code that calculated the Left_side,gallons and Right_side,gallons, but the main code was as follows:
Code:
<!-- ====Feed from center (fuselage) until 79% (or as desired) Then as long as the percent fuel in the left and right mains is greater than 1%, balance the fuel flow by switching to left or right, whichever is higher. Once the fuel in either left or right main is less than 1%, switch to ALL TANKS to drain residual external fuel and feed from the fuselage.===================== -->
<Element>
<Select>
<Value>(A:fuel tank center level,percent) 79 > if{ 6 (>K:FUEL_SELECTOR_SET) } els{ (A:fuel tank left main level, percent) 1 > s0 (A:fuel tank right main level, percent) 1 > l0 && if{ (L:Left_side,gallons) (L:Right_side,gallons) / 0.995 < if{ 3 (>K:FUEL_SELECTOR_SET) } els{ 2 (>K:FUEL_SELECTOR_SET) } } els{ 1 (>K:FUEL_SELECTOR_SET) } }</Value>
</Select>
</Element>
In the F-4 the Center tank was forced to feed first followed by the Aux tanks then ALL reverted the situation back to the FS default.
In the Hunter part of the center tank was forced to feed first and the left side or right side fuel was selected depending on which was higher. A sort of automatic crossfeed. The flow sequence essentially followed FS default except for the center being first.
Roy