• 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 Dump Gauge Research

Messages
2
Country
us-pennsylvania
Hello, I have recently been doing long range flights and would really love a complex fuel dump gauge/panel for some of my aircraft that don't come with fuel dump panels. I have Chris Dub's excellent refuel gauge/Tanker side which simulates fuel dump, however it dumps fuel from all tanks simultaneously.

I would love to have a fuel dump capability that dumps from a select tank, say center first than other tanks - whatever I select. I downloaded Doug Dawson's fuel dump gauge which seems to just give info on what tanks are on the aircraft.

Does anyone know of a fuel dump gauge/panel that works for a select tank on an aircraft? This would be extremely useful for those long flights. If not, could some kind soul walk me into some of the basics on how to create a fuel dump gauge?


Alan Johnston
 
No tutoring and hand holding here as we're all very busy people.

Try to reverse-engineer existing gauges, read the SDK documentation on XML gauges* and FS2X' tutorial on XML gauges**. Or search the library on Avsim or Flightsim to see if there's another fuel dump gauge available.


*https://msdn.microsoft.com/en-us/library/cc526953.aspx
** http://www.fs2x.com/Tutorials.htm

Other useful resources:
- Simulation variable list for input: https://msdn.microsoft.com/en-us/library/cc526981.aspx
- Keystroke list for output: https://msdn.microsoft.com/en-us/library/cc526980.aspx


Your basic gauge logic would be to first select the tank you want to dump from and then tell Doug's fuel dump gauge to do so. But this will have to be tailored to the specific aircraft you're flying as fuel tank configuration varies from plane to plane.

How a fuel dump gauge is useful for transcons or transats, except in case of an emergency abort during the first stages, is beyond me though. You should be well below MLW after a long flight. If not, it's a fuel planning problem.
 
Here you have a basic example on how to dump/transfer fuel using XMLTools' SIMVARS class.

Code is verbosed to make it easier to understand.

Code:
    <!--
      Fuel figures
        ===============
      
        Dump Rate 500 pounds per minute from wing tanks
        Transfer Rate 300 pounds per minute from center tank to both wing tanks
        Tank Qtys are updated every second, the same rate FS updates tanks AVars.
    
    -->

    (L:DumpElapsed,seconds) 0 == if{ (P:Absolute time,seconds) (>L:DumpElapsed,seconds) }
    (L:TransferElapsed,seconds) 0 == if{ (P:Absolute time,seconds) (>L:TransferElapsed,seconds) }
  
    (L:DumpEnabled,bool)
    if{
            (P:Absolute time,seconds) (L:DumpElapsed,seconds) - 1.00 >
            if{
               500 (P:Absolute time,minutes) (L:DumpElapsed,minutes) - * (A:FUEL WEIGHT PER GALLON, pounds) / (>L:FuelDumpQty,Gallons)
               (A:FUEL TANK LEFT MAIN QUANTITY,Gallons) (L:FuelDumpQty,Gallons) 2 / - (>C:SIMVARS:FUEL TANK LEFT MAIN QUANTITY,Gallons)
               (A:FUEL TANK RIGHT MAIN QUANTITY,Gallons) (L:FuelDumpQty,Gallons) 2 / - (>C:SIMVARS:FUEL TANK RIGHT MAIN QUANTITY,Gallons)
               (P:Absolute time,seconds) (>L:DumpElapsed,seconds)
                }
            els{
                 (A:FUEL TANK LEFT MAIN QUANTITY,Gallons) (>C:SIMVARS:FUEL TANK LEFT MAIN QUANTITY,Gallons)
                 (A:FUEL TANK RIGHT MAIN QUANTITY,Gallons) (>C:SIMVARS:FUEL TANK RIGHT MAIN QUANTITY,Gallons)
               }
            }
    els{
        (A:FUEL TANK LEFT MAIN QUANTITY,Gallons) (>C:SIMVARS:FUEL TANK LEFT MAIN QUANTITY,Gallons)
        (A:FUEL TANK RIGHT MAIN QUANTITY,Gallons) (>C:SIMVARS:FUEL TANK RIGHT MAIN QUANTITY,Gallons)
        (P:Absolute time,seconds) (>L:DumpElapsed,seconds)
         }              

    (L:TransferEnabled,bool)
    if{
            (P:Absolute time,seconds) (L:TransferElapsed,seconds) - 1.00 >
            if{
               300 (P:Absolute time,minutes) (L:TransferElapsed,minutes) - * (A:FUEL WEIGHT PER GALLON, pounds) / (>L:FuelTransferQty,Gallons)
               (A:FUEL TANK CENTER QUANTITY,Gallons) (L:FuelTransferQty,Gallons) - (>C:SIMVARS:FUEL TANK CENTER QUANTITY,Gallons)
               (A:FUEL TANK LEFT MAIN QUANTITY,Gallons) (L:FuelTransferQty,Gallons) 2 / + (>C:SIMVARS:FUEL TANK LEFT MAIN QUANTITY,Gallons)
               (A:FUEL TANK RIGHT MAIN QUANTITY,Gallons) (L:FuelTransferQty,Gallons) 2 / + (>C:SIMVARS:FUEL TANK RIGHT MAIN QUANTITY,Gallons)
               (P:Absolute time,seconds) (>L:TransferElapsed,seconds)
                }
            els{
              (A:FUEL TANK CENTER QUANTITY,Gallons) (>C:SIMVARS:FUEL TANK CENTER QUANTITY,Gallons)
              (A:FUEL TANK LEFT MAIN QUANTITY,Gallons) (>C:SIMVARS:FUEL TANK LEFT MAIN QUANTITY,Gallons)
              (A:FUEL TANK RIGHT MAIN QUANTITY,Gallons) (>C:SIMVARS:FUEL TANK RIGHT MAIN QUANTITY,Gallons)
               }
            }
    els{
        (A:FUEL TANK CENTER QUANTITY,Gallons) (>C:SIMVARS:FUEL TANK CENTER QUANTITY,Gallons)
        (A:FUEL TANK LEFT MAIN QUANTITY,Gallons) (>C:SIMVARS:FUEL TANK LEFT MAIN QUANTITY,Gallons)
        (A:FUEL TANK RIGHT MAIN QUANTITY,Gallons) (>C:SIMVARS:FUEL TANK RIGHT MAIN QUANTITY,Gallons)
        (P:Absolute time,seconds) (>L:TransferElapsed,seconds)
         }  

    <!--
      Fuel Qty Readings
        ==================
      
        For 2D gauges, it is possible to read the SIMVARS directly to avoid flickering.
      
        Example:
        <String>%((C:SIMVARS:FUEL TANK LEFT MAIN QUANTITY,Gallons))%!6d!<String>
      
        For 3D gauges (in modeldef), LVars must be used instead.
      
        Then in the code above, write at the bottom
        (C:SIMVARS:FUEL TANK LEFT MAIN QUANTITY,Gallons) (>L:FUEL TANK LEFT MAIN QUANTITY,Gallons)
        (C:SIMVARS:FUEL TANK RIGHT MAIN QUANTITY,Gallons) (>L:FUEL TANK RIGHT MAIN QUANTITY,Gallons)
        (C:SIMVARS:FUEL TANK CENTER QUANTITY,Gallons) (>L:FUEL TANK CENTER QUANTITY,Gallons)
      
        And use these Lvars in the Modeldef file
      
        Also convert to pounds if necessary.
      
        Example:
        (C:SIMVARS:FUEL TANK LEFT MAIN QUANTITY,Gallons) (A:FUEL WEIGHT PER GALLON, pounds) (>L:FUEL TANK LEFT MAIN QUANTITY,Pounds)
           
    -->


Please check names and logic. The code is extracted and customized for this example, and is not tested.

Tom
 
Back
Top