- Messages
- 1,468
- Country

Now that everything is working in terms of fuel uplift and jettison I turned my twisted mind to trying to solve an anomaly in Doug's fuel dump gauge. The input values in his gauge range from 1 to 15. Bearing in mind that 1 is equivalent to 800 kilos per minute 2 or 3 would be the most one would ever require for a realistic dump rate. 15 would therefore be something like 40 tonnes per minute!!!
Therefore using his gauge to transfer fuel between tanks would on the face of it seem unrealistic. Especially in my case as I have three different rates of transfer. 1 is ok to transfer from the centre tank to all main wing tanks. But for transferring from the fin tank to the centre tank that's way too much. For that there are two transfer rates: one is a gravity feed and the other is transfer pump assisted. The gravity feed is about 40kpm whereas the transfer pump assisted rate is about 140kpm. The only solution I can think of is a start/stop timer based on Doug's minimum rate of 1.
So I've ended up with this code below. Most of these conditions relate to what switches and valves must be open or closed for the transfer to take place, the amount of fuel in each tank and the position of the yellow pointer either to fill up to or drain down to. The first code is the gravity feed and the second is the pump assisted.
I can't think of any other way of doing this. If there is I'd like to know.
Therefore using his gauge to transfer fuel between tanks would on the face of it seem unrealistic. Especially in my case as I have three different rates of transfer. 1 is ok to transfer from the centre tank to all main wing tanks. But for transferring from the fin tank to the centre tank that's way too much. For that there are two transfer rates: one is a gravity feed and the other is transfer pump assisted. The gravity feed is about 40kpm whereas the transfer pump assisted rate is about 140kpm. The only solution I can think of is a start/stop timer based on Doug's minimum rate of 1.
So I've ended up with this code below. Most of these conditions relate to what switches and valves must be open or closed for the transfer to take place, the amount of fuel in each tank and the position of the yellow pointer either to fill up to or drain down to. The first code is the gravity feed and the second is the pump assisted.
Code:
<Value>(L:fin_valve_1,bool) 1 == (L:FIN_ISOL,bool) 1 == and (L:jett_valve,bool) 0 == and (L:jett,bool) 0 == and (L:fuelc2_in_kilos,number) 0 > and
(L:fuelc2_in_kilos,number) (L:Int_TC2,number) > and (L:fuelc_in_kilos,number) (L:Int_TC,number) < and (P:Absolute time,seconds) 5 % 0.5 2.6 * > ! and <--- the on/off timer
if{ (L:Rate_of_transfer,pounds per hour) 3.239115731 * (>L:RATE_TANK_CENTER2,number) < --- the number is there because of the difference in tank sizes
(L:Rate_of_transfer,pounds per hour) /-/ (>L:RATE_TANK_CENTER,number) 1 (>L:top_up,bool) } </Value>
<Value>(L:fin_valve_2,bool) 1 == (L:fin_valve_3,bool) 1 == | (L:fin_valve_1,bool) 0 == and (L:FIN_ISOL,bool) 1 == and (L:jett_valve,bool) 0 == and
(L:jett,bool) 0 == and (L:fuelc2_in_kilos,number) 0 > and (L:CT_CT2_trans_Pumps, bool) 1 == and
(L:fuelc2_in_kilos,number) (L:Int_TC2,number) > and (L:fuelc_in_kilos,number) (L:Int_TC,number) < and (P:Absolute time,seconds) 4 % 0.5 7 * > ! and
if{ (L:Rate_of_transfer,pounds per hour) 3.239115731 * (>L:RATE_TANK_CENTER2,number) (L:Rate_of_transfer,pounds per hour) /-/ (>L:RATE_TANK_CENTER,number) 1 (>L:top_up,bool) } </Value>