• Which the release of FS2020 we see an explosition of activity on the forun and of course we are very happy to see this. But having all questions about FS2020 in one forum becomes a bit messy. So therefore we would like to ask you all to use the following guidelines when posting your questions:

    • Tag FS2020 specific questions with the MSFS2020 tag.
    • Questions about making 3D assets can be posted in the 3D asset design forum. Either post them in the subforum of the modelling tool you use or in the general forum if they are general.
    • Questions about aircraft design can be posted in the Aircraft design forum
    • Questions about airport design can be posted in the FS2020 airport design forum. Once airport development tools have been updated for FS2020 you can post tool speciifc questions in the subforums of those tools as well of course.
    • Questions about terrain design can be posted in the FS2020 terrain design forum.
    • Questions about SimConnect can be posted in the SimConnect forum.

    Any other question that is not specific to an aspect of development or tool can be posted in the General chat forum.

    By following these guidelines we make sure that the forums remain easy to read for everybody and also that the right people can find your post to answer it.

FSXA Another Fuel Logic query......

Messages
2
Country
unitedkingdom
Hi all,

Longtime lurker, first time poster.

Now, I'm trying to add some more complexity to a particular add on aircraft, that uses a simple left tanks/right tanks setup to feed three engines.

The actual aircraft had two tanks per wing, an inner and outer tank. The Inner tanks feed Engines 1 & 3 respectively, and the outer tanks feed Engine 2 through a proportioner unit to maintain lateral balance.

I'm not too fussed about coding a proportioner because I cant see there being an event that would cause a lateral imbalance - there are two boost pumps per tank but if they fail then the engines run on suction feed via a pump bypass valve and the Engine mounted Low Pressure pump.

I know about the awkwardness of the FS9/FSX Fuel Selector mechanism - my question is this:

Aircraft.cfg:

Code:
[fuel]
LeftAux= 2.000, 15.000, 0.000, 1622.000, 0.000
RightAux= 2.000, -15.000, 0.000, 1622.000, 0.000
LeftTip= 0.000, 30.000, 0.000, 660.000, 0.000
RightTip= 0.000, -30.000, 0.000, 660.000, 0.000
fuel_type=2.000000
number_of_tank_selectors=3
electric_pump=1

When loading fuel before the flight the tanks need to be loaded in a 2:1 ratio, so if I code on initialisation K:FUEL_SELECTOR_LEFT_AUX and K:FUEL_SELECTOR_3_RIGHT_AUX this will
force Engine 1 to feed from the Port Inner Tank and Engine 3 to feed from the Starboard Inner Tank (noted here as Aux). However, There doesn't appear to be an Event ID for Tip tanks, but if I set K:FUEL_SELECTOR_2_ALL then will this give me a simultaneous feed from both Outer (Tip) tanks to Engine 2 as the first to be used according to default logic?

Secondly, If I then code the crossfeed valve to set all selectors to ALL then this will allow all tanks to feed all 3 engines, even if the tip tanks have been exhausted?

EDIT: This is the code I've put together, be nice for someone to have a quick scoot as I won't be able to test it till Sunday :(

Crossfeed Valve Control Logic:
Code:
<Gauge Name="Crossfeed Cock Position Indicator" Version="1.0">
   <Element>
      <Select>
         <Value>(L:CROSSFEED_COCK_OPEN,bool)</Value>
         <Case Value="1">
            <Image Name="CROSSFEED_EYE_OPEN.bmp" ImageSizes="23,23"/>
         </Case>
         <Case Value="0">
            <Image Name="CROSSFEED_EYE_SHUT.bmp" ImageSizes="23,23"/>
         </Case>
      </Select>
   </Element>
   <Mouse>
    <Area Top="0" Left="0" Right="23" Bottom="23">
         <Tooltip>Crossfeed Cock %((L:CROSSFEED_COCK_OPEN,bool))%{if}Open%{else}Closed%{end}</Tooltip>
         <Cursor Type="Hand"/>
         <Click>(L:CROSSFEED_COCK_OPEN,bool) ! (&gt;L:CROSSFEED_COCK_OPEN,bool)</Click>
     </Area>
   </Mouse>
</Gauge>

Fuel Distribution Logic:
Code:
<Gauge Name="Fuel Distribution Logic" Version="1.0">
<Update>
(L:CROSSFEED_COCK_OPEN,bool) ! if{
(A:FUEL TANK SELECTOR:1,enum) 4 != if{ 4 (&gt;K:FUEL_SELECTOR_SET)}
(A:FUEL TANK SELECTOR:2,enum) 1 != if{ 1 (&gt;K:FUEL_SELECTOR_2_SET)}
(A:FUEL TANK SELECTOR:3,enum) 5 != if{ 5 (&gt;K:FUEL_SELECTOR_3_SET)}}
els{ 1 (&gt;K:FUEL_SELECTOR_SET) 1 (&gt;K:FUEL_SELECTOR_2_SET) 1 (&gt;K:FUEL_SELECTOR_3_SET)}
</Update>
</Gauge>

Thanks for any help or guidance you can provide.

Tom
 
Last edited:
According to the SDK, ALL will probably drain tip, aux, and main in that order. But there's only one way to be sure - try it. And yes, setting ALL for all three selectors should use tip, aux, and main tanks, in that order. If one is exhausted, it will use another. Whether it will use the right aux after the right tip but not the left tip is exhausted is something I don't know, but in symmetric situations it should work OK.

A problem I see with your crossfeed logic is that you are continuously sending Events to the sim. This will slow it down, and prevent multi key commands (like Shift E 2) from working. While you do test for that when the cock is closed, you do not when it is open. The code there needs to mimic that when the cock is closed.
 
Thanks Tom - so if nest in an if{} logic check for Cock Open before the key events that will prevent key events being constantly sent? Or would it be better to rewrite it as <Element><Value> type coding?
 
Hi,

You use this kind of code in the closed situation:

Code:
(A:FUEL TANK SELECTOR:1,enum) 4 != if{ 4 (&gt;K:FUEL_SELECTOR_SET)}

So when open you would need to test for those variables not being equal to 1 *before* setting them to 1.
 
I have had a slightly different problem. The VC10 has three tanks in each wing, a centre tank and a Fin Tank for the Super. It was originally set up for "All" but the problem with that is that the Centre tank only feeds the wings and the fin tank only feeds the centre tank. Adding to the problem is that the wings tanks are modelled as two tanks. So the correct crossfeed, transfer and jettison procedures took a while to get right. Because it's an Engineer's panel depending on what switches are thrown dictates the rate of fuel transfer so that the FOB remains static. Also I had to insert a cut off for the centre tank so that when it drains the engines don't die. Another problem was refuelling. By using the under wing refuelling point only. Here is a taste of some of the code
Code:
<Gauge Name="Fuel Selector Update" Version="1.0">
  <Size X="5" Y="5" />

<Update>
<!-- IF ALL TANKS ARE SELECTED Resets default "All" tanks at startup-->

(A:FUEL TANK SELECTOR 1,ENUM) 1 == (A:FUEL TANK SELECTOR 2,ENUM) 1 == and
(A:FUEL TANK SELECTOR 3,ENUM) 1 == and (A:FUEL TANK SELECTOR 4,ENUM) 1 == and
if{ 1 (&gt;K:FUEL_SELECTOR_LEFT_AUX) 0 (&gt;K:FUEL_SELECTOR_2_LEFT_AUX)
0 (&gt;K:FUEL_SELECTOR_3_RIGHT_AUX) 1 (&gt;K:FUEL_SELECTOR_4_RIGHT_AUX) }
  </Update>

</Gauge>



  <!-- Fuel Conversion and Fin Transfer -->   
  
   <Element>
      <Select>
         <Value>(A:FUEL TANK CENTER QUANTITY, meter cubed) (A:FUEL LEFT QUANTITY, meter cubed) + (A:FUEL TANK CENTER2 QUANTITY, meter cubed) + (A:FUEL RIGHT QUANTITY, meter cubed) + 802.84 * (>L:fuel_in_kilos,number)</Value>
      </Select>
   </Element>

   <Element>
      <Select>
         <Value>(A:FUEL TANK CENTER QUANTITY, meter cubed) 802.84 * (>L:fuelc_in_kilos,number) (A:FUEL TANK CENTER2 QUANTITY, meter cubed) 802.84 * (>L:fuelc2_in_kilos,number) (A:FUEL LEFT QUANTITY, meter cubed) 802.84 * (>L:fuelL_in_kilos,number) (A:FUEL RIGHT QUANTITY, meter cubed) 802.84 * (>L:fuelR_in_kilos,number)</Value>
      </Select>
   </Element>

   <Element>
      <Select>
         <Value>(L:fin_valve_2,bool) 1 == (L:fin_valve_3,bool) 0 == and
if{ 1.00 (>L:Rate_of_transfer, pounds per hour) }</Value>
      </Select>
   </Element>

   <Element>
      <Select>
         <Value>(L:fin_valve_2,bool) 0 == (L:fin_valve_3,bool) 1 == and
if{ 1.00 (>L:Rate_of_transfer, pounds per hour) }</Value>
      </Select>
   </Element>

   <Element>
      <Select>
         <Value>(L:fin_valve_1,bool) 1 == (L:fin_valve_2,bool) 0 == and (L:fin_valve_3,bool) 0 == and
if{ 1.00 (>L:Rate_of_transfer, pounds per hour) }</Value>
      </Select>
   </Element>

   <Element>
      <Select>
         <Value>(L:CT_CT2_trans_Pumps, bool) 1 == if{ 1.00 (>L:Rate_of_transfer, pounds per hour) }</Value>
      </Select>
   </Element>

    <!-- Jettison Minutes Remaining-->
      <Element>
      <Select>
         <Value>(A:SIM ON GROUND, bool) 0 == (A:TOTAL WEIGHT,kilogram) 107500 &gt; and (L:jett_valve,bool) 1 == and (L:jett,bool) 1 == and
         if{ (A:TOTAL WEIGHT,kilogram) 107500 - (>L:jtot,number) (L:jtot,number) 1200 / (>L:jett_mins,number) }</Value>
      </Select>
   </Element>


<Gauge Name="fin tfr - jettison" Version="1.0">
   <Element>
      <Select>
         <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 &gt; and
(L:fuelc2_in_kilos,number) (L:Int_TC2,number) &gt; and (L:fuelc_in_kilos,number) (L:Int_TC,number) &lt; and (P:Absolute time,seconds) 1.25 % 0.5 0.65 * > ! 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>
      </Select>
   </Element>

<Element>
      <Select>
         <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 &gt; and (L:CT_CT2_trans_Pumps, bool) 1 == and
(L:fuelc2_in_kilos,number) (L:Int_TC2,number) &gt; and (L:fuelc_in_kilos,number) (L:Int_TC,number) &lt; and (P:Absolute time,seconds) 1 % 0.5 1.75 * > ! 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>
      </Select>
   </Element>

<Element>
      <Select>
<Value>(L:fuelc2_in_kilos,number) (L:Int_TC2,number) &lt; (L:top_up,bool) 1 == and (L:fuelc_in_kilos,number) (L:Int_TC,number) &gt; (L:top_up,bool) 1 == and |
if{ 1 (>L:trim_alert,bool) }</Value>
</Select>
   </Element>

<Element>
      <Select>
<Value>(L:fuelc2_in_kilos,number) 0 == (L:Int_TC2,number) 0 == and (L:top_up,bool) 1 == and if{ 1 (>L:trim_alert,bool) }</Value>
</Select>
   </Element>

<Element>
      <Select>
<Value>(L:jett_valve,bool) 1 == (L:jett,bool) 1 == | (L:FIN_ISOL,bool) 0 == | (L:trim_alert,bool) 1 == and if{ 0 (>L:trim_alert,bool) 0 (>L:top_up,bool) }</Value>
</Select>
   </Element>

   <Element>
      <Select>
         <Value>(L:jett_valve,bool) 0 == if{ 0 (>L:jett_LR_MI,number) 0 (>L:jett_FIN_MI,number) }</Value>
      </Select>
   </Element>
  
   <Element>
      <Select>
         <Value>(L:jett_valve,bool) 1 == if{ 1 (>L:jett_LR_MI,number) 1 (>L:jett_FIN_MI,number) }</Value>
      </Select>
   </Element>
  
   <Element>
      <Select>
         <Value>(L:jett,bool) 1 == (L:jett_valve,bool) 1 == and if{ 2 (>L:jett_LR_MI,number) 1 (>L:jett_FIN_MI,number) }</Value>
      </Select>
   </Element>
  
   <Element>
      <Select>
         <Value>(L:jett,bool) 1 == (L:jett_valve,bool) 1 == and (L:FIN_ISOL,bool) 1 == and (L:fin_valve_2,bool) 1 == (L:fin_valve_3,bool) 1 == | and if{ 2 (>L:jett_FIN_MI,number) }</Value>
      </Select>
   </Element>
  
   <Element>
      <Select>
         <Value>(L:jett,bool) 1 == (L:jett_valve,bool) 1 == and (L:jett_LR_MI,number) 2 == and if{ 3 (>L:RATE_TANK_CENTER,number) 2 (&gt;L:RATE_TANK_AUX_LEFT,number) 2 (&gt;L:RATE_TANK_AUX_RIGHT,number) }
   </Value>
      </Select>
   </Element>
  
   <Element>
      <Select>
         <Value>(L:jett,bool) 1 == (L:jett_valve,bool) 1 == and (L:FIN_ISOL,bool) 1 == and (L:fin_valve_2,bool) 1 == (L:fin_valve_3,bool) 1 == | and (L:jett_FIN_MI,number) 2 == and
if{ 3 (>L:RATE_TANK_CENTER2,number) }
   </Value>
      </Select>
   </Element>

   <Element>
      <Select>
         <Value>(L:jett,bool) 1 == (L:jett_valve,bool) 1 == and (L:fuelL_in_kilos,number) 50.00 * 100 / 2358 &lt; and
if{ 0 (&gt;L:RATE_TANK_AUX_LEFT,number) 0 (&gt;L:RATE_TANK_AUX_RIGHT,number) }
   </Value>
      </Select>
   </Element>
  
   <Element>
      <Select>
         <Value>(L:CT_CT2_trans_Pumps, bool) 1 == (L:DM FUEL CROSSFEED,number) 1 == and
(L:fuelc_in_kilos,number) 0 &gt; and (L:left_sel,bool) 1 == and (L:right_sel,bool) 0 == and
if{ (L:Rate_of_transfer,pounds per hour) 1.5525135 * (>L:RATE_TANK_CENTER,number) (L:Rate_of_transfer,pounds per hour) /-/ (>L:RATE_TANK_AUX_LEFT,number) }</Value>
      </Select>
   </Element>
  
   <Element>
      <Select>
      <Value>(L:CT_CT2_trans_Pumps, bool) 1 == (L:DM FUEL CROSSFEED,number) 1 == and
(L:fuelc_in_kilos,number) 0 &gt; and (L:left_sel,bool) 0 == and (L:right_sel,bool) 1 == and
if{ (L:Rate_of_transfer,pounds per hour) 1.5525135 * (>L:RATE_TANK_CENTER,number) (L:Rate_of_transfer,pounds per hour) /-/ (>L:RATE_TANK_AUX_RIGHT,number) }</Value>
      </Select>
   </Element>
     
     <Element>
      <Select>
      <Value>(L:CT_CT2_trans_Pumps, bool) 1 == (L:DM FUEL CROSSFEED,number) 1 == and
(L:fuelc_in_kilos,number) 0 &gt; and (L:left_sel,bool) 1 == and (L:right_sel,bool) 1 == and
if{ (L:Rate_of_transfer,pounds per hour) 3.105027 * (>L:RATE_TANK_CENTER,number) (L:Rate_of_transfer,pounds per hour) /-/ (>L:RATE_TANK_AUX_LEFT,number) (L:Rate_of_transfer,pounds per hour) /-/ (>L:RATE_TANK_AUX_RIGHT,number) }</Value>
      </Select>
   </Element>
  
   <Element>
      <Select>
      <Value>(L:left_sel,bool) 1 == (L:right_sel,bool) 1 == | (L:fuelc_in_kilos,number) 0.49 &lt; and
if{ 1 (&gt;K:FUEL_SELECTOR_LEFT_AUX) 1 (&gt;K:FUEL_SELECTOR_2_LEFT_AUX) 1 (&gt;K:FUEL_SELECTOR_3_RIGHT_AUX) 1 (&gt;K:FUEL_SELECTOR_4_RIGHT_AUX) 0 (>L:left_sel,bool) 0 (>L:right_sel,bool) }</Value>
      </Select>
   </Element>   
  
   <Element>
      <Select>
         <Value>(L:fuelL_in_kilos,number) (L:fuelR_in_kilos,number) + (>L:fuel_test)</Value>
      </Select>
   </Element>
  
  
   </Gauge>
refuel.jpg
 
Back
Top