Sign in to follow this  
phjvh

Newbie XML Fuel Question

Recommended Posts

Hey All,I've been trying to learn how to build XML gauges. So far I've been succesful making basic switches that turn stuff off and on and some electrical voltage gauges. I've looked at the 2002 gauge and panel SDK and Arne Bartels' XML guide, but I've reached an impass with my latest attempt and would like some assistance. What I'm trying to do is create a "simulated" cross-feed switch that has only two positions "off" and "on" for a 737 panel. With the switch "off" I would like the #1 engine to draw from the left main and center tanks, and the #2 engine to draw from the right main and center tanks. (This is the default condition for the MS 734) When the switch is "on", I would like both engines to draw from whichever main tank has the most fuel. I realize this isn't a true cross feed system, but it would be a fairly good simulation IMO. I've been fiddling with various FUEL_TANK_SELECTOR settings with no luck. It seems that the enum value of 13 gives me the "on" function I want (I think), but what value would I use to return the system to its original condition where each engine is drawing from its own "side". I did a search in the forum. Unfortunately, the attachments in those threads are no longer available. Your assistance would be greatly appreciated. Thanks.Dave

Share this post


Link to post
Share on other sites
Help AVSIM continue to serve you!
Please donate today!

Open the gauges.h of the Panel SDK and search for the enum definition of FUEL_SELECT. In XML you have to use the numeric vallues together with the K:FUEL_SELECTORX_SET command.typedef enum FUEL_SELECT{ FUEL_TANK_SELECTOR_OFF = 0, FUEL_TANK_SELECTOR_ALL = 1, FUEL_TANK_SELECTOR_LEFT = 2, FUEL_TANK_SELECTOR_RIGHT = 3, FUEL_TANK_SELECTOR_LEFT_AUX = 4, FUEL_TANK_SELECTOR_RIGHT_AUX = 5, FUEL_TANK_SELECTOR_CENTER = 6, FUEL_TANK_SELECTOR_CENTER2 = 7, FUEL_TANK_SELECTOR_CENTER3 = 8, FUEL_TANK_SELECTOR_EXTERNAL1 = 9, FUEL_TANK_SELECTOR_EXTERNAL2 = 10, FUEL_TANK_SELECTOR_RIGHT_TIP = 11, FUEL_TANK_SELECTOR_LEFT_TIP = 12, FUEL_TANK_SELECTOR_CROSSFEED = 13, FUEL_TANK_SELECTOR_CROSSFEED_L2R = 14, FUEL_TANK_SELECTOR_CROSSFEED_R2L = 15, FUEL_TANK_SELECTOR_BOTH = 16, FUEL_TANK_SELECTOR_EXTERNAL_ALL = 17, FUEL_TANK_MAXIMUM} FUEL_SELECT, *PFUEL_SELECT, **PPFUEL_SELECT;Arne Bartels

Share this post


Link to post
Share on other sites

Hi,1. Use 2 fuel selectors, so edit aircraft.cfg.2. With the other events you can feed the engine by whatever tank you want. (it is possible to automate the proces completely like in real life)3. In your case, with "one" switch, you could try to give the next command in that switch: (L:Crossfeed,bool) ! (>L:Crossfeed,bool)With result:Switch "off": (L:Crossfeed,bool) 0 == if{ 2 (>K:FUEL_SELECTOR_SET) 3 (>K:FUEL_SELECTOR_2_SET) }Means: L Main Tank feeds L Engine and R to R, normal situation.Switch "on": (L:Crossfeed,bool) 1 == if{ (A:FUEL TANK LEFT MAIN LEVEL,percent) (A:FUEL TANK RIGHT MAIN LEVEL,percent) > if{ 2 (>K:FUEL_SELECTOR_SET) 2 (>K:FUEL_SELECTOR_2_SET) } els{ 2 (>K:FUEL_SELECTOR_SET) 3 (>K:FUEL_SELECTOR_2_SET) }This means: when more fuel in left tank, both engines take fuel from that tank if the crossfeed switch is on.You can add the same code to that value in case there is more fuel in the right tankYou can build this further with the other tanks and determine values for the percentages etc.E.g. (A:FUEL TANK LEFT MAIN LEVEL,percent) (A:FUEL TANK RIGHT MAIN LEVEL,percent) - 1.5 >This means that "crossfeed" only is possible when there is more than 1.5% diff. between the tanks.Normally you empty first the center tank(s)More info:http://www.b737.org.uk/Succes!Btw. Not tested!!Jan"Beatus ille procul negotiis ...."

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this