• 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 Fuel system trouble

Messages
218
Country
greece
Hello again!

I'm trying to code the fuel system for my aircraft and I'm running into an issue with fuel tank selection.
When selecting the external fuel tanks I'm doing a check. If either of the tanks has fuel in it, the engine should draw from the two external tanks (value return of 17). Else, it should switch to both (internal, value return of 16).

When the exteriors are empty, I get a proper result of 16 for my fuel selector.
When not, though, it keeps jumping between 16 and 17, which would yield unwanted results as the internal tanks would be consumed before the externals.

Code:
<!-- ENGINE FEED-->
     <!-- Feeding from external wing tanks -->
     (L:switch_wing_xfer_prs,bool) 1 == (A:GEAR HANDLE POSITION, Percent) 1 &lt; or (L:switch_ext_xfer,enum) 1 == &amp;&amp; if{
       (A:FUEL TANK EXTERNAL1 LEVEL, Percent) 0 == (A:FUEL TANK EXTERNAL2 LEVEL, Percent) 0 == &amp;&amp; if{
         (A:FUEL TANK SELECTOR:1, number) 16 != if{ 16 (&gt;K:FUEL_SELECTOR_SET) }
       }
       
       (A:FUEL TANK EXTERNAL1 LEVEL, Percent) 0 != (A:FUEL TANK EXTERNAL2 LEVEL, Percent) 0 != || if{
         (A:FUEL TANK SELECTOR:1, number) 17 != if{ 17 (&gt;K:FUEL_SELECTOR_SET) }
         } 
       }
 
I assume you may have another gauge forcing them to the internal tanks?
 
No, this is the only gauge.

I redid the code from scratch using a different method and it worked. I couldn't see why the above thing was jumpy.
 
Getting fuel systems to work right is a nightmare. Once more, on top of these issues, you have to deal with 'saved flights' from other planes, which will over-ride code driven fuel selection systems.
 
Back
Top