• 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.

Fuel Selector Sequence

Messages
4
Country
unitedkingdom
Hi all...

I could really do with some help in getting my fuel tank selectors to work as I would like. My twin-engined Lightning T5 burns both No1 Engine & No2 Engines jointly take from a Ventral Tank (cfg:Center1), No1 then burns from the Left Trailing Edge Tank in the flap (LeftAux) before finally taking from the main Left Wing Tank (LeftMain) - No2 Engine likewise does: Ventral (Center1) - Right T/E (RightAux) - Right Wing (RightMain).

In my logic - the No1 engine coding would look something like:
Code:
   <PartInfo>
        <Name>fuel_cock_01</Name>
        <AnimLength>50</AnimLength>
        <Animation>
            <Parameter>
                <Sim>
                   <Variable>GENERAL ENG FUEL VALVE:1</Variable>
                   <Units>bool</Units>
                   <Scale>50</Scale>
                   <Lag>200</Lag>
                </Sim>
            </Parameter>
        </Animation>
        <MouseRect>
            <Cursor>Hand</Cursor>
            <TooltipText>No1 Engine Fuel Cock</TooltipText>
            <EventID>TOGGLE_FUEL_VALVE_ENG1</EventID>
          <CallbackCode>
            (A:GENERAL ENG FUEL VALVE:1, bool) 0 == if{ 0 (>K:FUEL_SELECTOR_SET) } els{ 6 (>K:FUEL_SELECTOR_SET)
            (A:FUEL TANK CENTER QUANTITY, gallons) 1 &lt; if { 4 (>K:FUEL_SELECTOR_SET)
            (A:FUEL TANK LEFT AUX QUANTITY, gallons) 1 &lt; if{ 2 (>K:FUEL_SELECTOR_SET) } } }
          </CallbackCode>
        </MouseRect>
    </PartInfo>

But I'm totally lost at how I need to implement this code into the modeldef - as a CallbackCode? (which is one of the methods I've tried above, endeavouring to tie it to a Fuel Cock)... or do need to put it as a separate code by itself? Whichever way I try it P3D/FSX just seems to take fuel from which Tanks it wants, rather than in the sequence I want. Argggh! what am I doing wrong or missing?

Many thanks

Mike
 
Last edited:
Might be answering my own question - but posting just in case my solution helps anyone out else etc...

Did some experimenting and looks like FSX/P3D does indeed want to draw from the tanks in its own default sequence for some reason(?) and setting (>K:WORK_AS_I_WANT) on the fuel selector has no effect (unless I'm missing something here?). As a workaround, I've got around the default sequence by dropping the Left/RightMain tanks altogether (and the Center one too just to make sure!) and altering cfg to:
Code:
external1 = (My Ventral)
leftaux = (My Left Wing)
rightaux = (My Right Wing)
lefttip= (My Left T/E)
righttip = (My Right T/E)

I also dropped the sequencing as a <CallbackCode> (it was locking my Fuel Cock's bool movement) and have instead entered the code in the modeldef as:
Code:
    <PartInfo>
        <Name>fuel_selector_01</Name>
          <Parameter>
            <Code>
              (A:GENERAL ENG FUEL VALVE:1, bool) 0 == if{ 0 (>K:FUEL_SELECTOR_2_SET) } els{ 9 (>K:FUEL_SELECTOR_SET)
              (A:FUEL TANK EXTERNAL1 QUANTITY, gallons) 1 &lt; if { 12 (>K:FUEL_SELECTOR_SET)
              (A:FUEL TANK LEFT TIP QUANTITY, gallons) 1 &lt; if{ 4 (>K:FUEL_SELECTOR_SET) } } }
            </Code>
          </Parameter>
    </PartInfo>

    <PartInfo>
        <Name>fuel_selector_02</Name>
          <Parameter>
            <Code>
              (A:GENERAL ENG FUEL VALVE:2, bool) 0 == if{ 0 (>K:FUEL_SELECTOR_2_SET) } els{ 9 (>K:FUEL_SELECTOR_2_SET)
              (A:FUEL TANK EXTERNAL1 QUANTITY, gallons) 1 &lt; if { 11 (>K:FUEL_SELECTOR_2_SET)
              (A:FUEL TANK RIGHT TIP QUANTITY, gallons) 1 &lt; if{ 5 (>K:FUEL_SELECTOR_2_SET) } } }
            </Code>
          </Parameter>
    </PartInfo>

After a couple of tests, all seems well... fingers crossed it stays like that!

Regards

Mike
 
Last edited:
I was out of time yesterday, but I was going to point out that you cannot use both <EventID> and <CallbackCode> in the same mouse section anyway...

I'm delighted to read that you've figured out a solution that does work. :wave:
 
Back
Top