Jump to content

Fuel center tanks usage first


Recommended Posts

Greetings!

 

This below is a FSX *.xml logic gauge which was made for aircraft that have one center fuel tank ("Center1") and runs in the background ensuring Center1 fuel tank is used first before using other fuel tanks:

 

(A:GENERAL ENG COMBUSTION:1,bool) (A:GENERAL ENG COMBUSTION:2,bool) + 2

if{ (A:FUEL CROSS FEED,enum) 1 == if{ quit } els{ 1 (>K:FUEL_SELECTOR_SET) 1 (>K:FUEL_SELECTOR_2_SET) } } els{ (A:FUEL TANK CENTER QUANTITY,gallons) 7 >

if{ 6 (>K:FUEL_SELECTOR_SET) 6 (>K:FUEL_SELECTOR_2_SET) } els{ 1 (>K:FUEL_SELECTOR_SET) 1 (>K:FUEL_SELECTOR_2_SET) } }

 

I didn't make it, I found it on the net and I want to customize it for my own personal use in aircraft that have 2 center tanks: Center1 and Center2. I want the gauge to ensure draining the fuel from both Center tanks before starting to use other fuel tanks.

I don't know what strings to modify because currently I have no skills in fuel gauge programming; can you please modify it so that I can use it on my aircraft that have Center1 and Center2 fuel tanks?

 

Many thanks

Link to comment
Share on other sites

Hello,

I will not create it for you but here is some help! This is an example of a Crossfeed selector switch that controls if the engines only get fuel from the center tank, from the wing tanks or from all tanks! Its from my 747 "City of Everett" mod wich has 2 Tank selectors and 1 Center tank entry in the aircraft.cfg!




(L:CENTER_VALVE,bool)









%((L:RM,number) 1 ==)%{if}Center Crossfeed valves: (Closed) Only right tanks in use (On)%{end}%((L:LRM,number) 1 ==)%{if}Center Crossfeed valves: (Closed) Only left and right tanks in use (On)%{end}%((L:ALL,number) 1 ==)%{if}Center Crossfeed valves: (Open) All tanks in use (On)%{end}%((L:CT,number) 1 ==)%{if}Center Crossfeed valves: (Open) Only center tank in use (On)%{end}%((L:LM,number) 1 ==)%{if}Center Crossfeed valves: (Closed) Only left tanks in use (On)%{end}


         (L:CENTER_VALVE, bool) ! (>L:CENTER_VALVE, bool) 1 (>L:LIGHT_COUNTER_START_CT,number) 1 (>L:ClickSound_Rotary,number)
         (L:CENTER_VALVE,bool) 1 == (L:LEFT_MAIN_VALVE, bool) 0 == (L:RIGHT_MAIN_VALVE, bool) 0 == && && if{ 6 (>K:FUEL_SELECTOR_SET, bool) 6 (>K:FUEL_SELECTOR_2_SET, bool) 1 (>L:CT,number) 0 (>L:RM, number) 0 (>L:ALL, number) 0 (>L:LM, number) 0 (>L:LRM, number) }
         (L:CENTER_VALVE,bool) 1 == (L:LEFT_MAIN_VALVE, bool) 1 == (L:RIGHT_MAIN_VALVE, bool) 1 == && && if{ 1 (>K:FUEL_SELECTOR_SET, bool) 1 (>K:FUEL_SELECTOR_2_SET, bool) 1 (>L:ALL, number) 0 (>L:LM, number) 0 (>L:RM, number) 0 (>L:LRM, number) 0 (>L:CT,number) }
         (L:CENTER_VALVE,bool) 0 == (L:LEFT_MAIN_VALVE, bool) 1 == (L:RIGHT_MAIN_VALVE, bool) 1 == && && if{ 3 (>K:FUEL_SELECTOR_SET, bool) 2 (>K:FUEL_SELECTOR_2_SET, bool) 0 (>L:ALL, number) 0 (>L:LM, number) 0 (>L:RM, number) 1 (>L:LRM, number) 0 (>L:CT,number) }
         (L:CENTER_VALVE,bool) 0 == (L:LEFT_MAIN_VALVE, bool) 1 == (L:RIGHT_MAIN_VALVE, bool) 0 == && && if{ 2 (>K:FUEL_SELECTOR_SET, bool) 2 (>K:FUEL_SELECTOR_2_SET, bool) 0 (>L:ALL, number) 1 (>L:LM, number) 0 (>L:RM, number) 0 (>L:LRM, number) 0 (>L:CT,number) }
         (L:CENTER_VALVE,bool) 0 == (L:LEFT_MAIN_VALVE, bool) 0 == (L:RIGHT_MAIN_VALVE, bool) 1 == && && if{ 3 (>K:FUEL_SELECTOR_SET, bool) 3 (>K:FUEL_SELECTOR_2_SET, bool) 0 (>L:ALL, number) 0 (>L:LM, number) 1 (>L:RM, number) 0 (>L:LRM, number) 0 (>L:CT,number) }


 

The L: variables in my switch script are selfmade Variables!

 

Example: (L:My_First_Var,number) 1 > if{ 0 (>L:My_First_Var,number) }

 

When Variable "My_First_Var" has a value of 1 AND GREATER then (from if) will be set this Variable back to "0"!

 

Another help are these links, which contains (mostly) all Key and variable commands for FSX:

 

Keys: ttps://docs.microsoft.com/en-us/previous-versions/microsoft-esp/cc526980%28v%3Dmsdn.10%29

Vars: ttps://docs.microsoft.com/en-us/previous-versions/microsoft-esp/cc526981(v=msdn.10)

 

(Add the "h" to the "ttps", then copy and paste it, dont know if the links working here correctly)

 

I can only recommend to learn xml and you will open a door for yourself with much more possibilities in FSX and other MS Flightsims!

 

Good luck and much fun!

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...