• 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 General eng fuel used since start

Zeiten

Resource contributor
Messages
444
Country
norway
Code:
(A:GENERAL ENG FUEL USED SINCE START, Pounds)

Anyone got this variable to work and how??
 
Messages
1,564
Country
thailand
Code:
(A:GENERAL ENG FUEL USED SINCE START, Pounds)

Anyone got this variable to work and how??

No luck either. Just tested in FSX on a piston engine and also included engine indexes, but returns zero. This is the syntax I tried - (A:GENERAL ENG1 FUEL USED SINCE START, Pounds). Also tried without 'GENERAL'

Fortunately, (A:ENG1 FUEL FLOW PPH, pounds per hour) works

Bob
 

Zeiten

Resource contributor
Messages
444
Country
norway
No success here either.

Returns zero no matter what.

A engine thats runs on love and air..
 

n4gix

Resource contributor
Messages
11,674
Country
unitedstates
Frankly, I'd never even noticed this so-called variable since I never had any occasion to need something like it.

I do notice however that it is not an "indexed" variable, nor is it engine specific. This implies that it is nothing more than a 'totalizer' that is supposed to keep track of all fuel used, irrespective of tank or engine(s).
 

Zeiten

Resource contributor
Messages
444
Country
norway
I'm doing a simple gauge that either reads fuel consumed or remaining fuel.
So it does not do anything that the variable is not engine specific.

Funny story.

Never got the readout for remaining fuel to be correct.
Gallons showed correct, but anytime I wanted to know the value in pounds the value got way off.

After some hairpulling it hit me.
Originaly I used:

(A:FUEL TOTAL QUANTITY, pounds)

No way the reading was wrong as pounds is not volume, but weight.

(A:FUEL TOTAL QUANTITY WEIGHT, pounds) worked much better :D


Now how do I get to know the value of fuel consumed?
 

Attachments

  • Consumed.jpg
    Consumed.jpg
    219.7 KB · Views: 377
  • Remaining.jpg
    Remaining.jpg
    225.7 KB · Views: 312
Last edited:

Zeiten

Resource contributor
Messages
444
Country
norway
Thanks Doug, but now I will ask a very stupid question maybe.

Values cannon be stored in XML so this gauge needs to be written in C?
Or am I way off now?
 

tgibson

Resource contributor
Messages
11,343
Country
us-california
Values can be stored in L: variables for the length of time a plane is loaded into the sim. And if you want to keep adding to these variables between FS sessions you can use Doug's XML config gauge to save and reload these values.
 

Zeiten

Resource contributor
Messages
444
Country
norway
Got it to work now.

Thanks for the help :)
 

Attachments

  • Consumed.jpg
    Consumed.jpg
    108.3 KB · Views: 413
Messages
76
Country
netherlands
Track it incrementally - fuel flow multiplied by change in elapsed time will give change in fuel used.

Doug
You can also save the amount of fuel at startup.
Then you subtract the current amount from the stored amount to get the amount consumed.
 

Zeiten

Resource contributor
Messages
444
Country
norway
It's what I did.

Searched the forum and come across a code that I modified a little.

Code:
<PartInfo>
  <Name>Fuel_Used_Logic</Name>
  <Visibility>
    <Parameter>
      <Code>
        (L:Init_Fuel_Start,bool) 0 == 
          if{ 
            (A:FUEL TANK LEFT MAIN QUANTITY, liters) 
            (A:FUEL TANK RIGHT MAIN QUANTITY, liters) + 
            (A:FUEL TANK CENTER QUANTITY, liters) + 
            (&gt;L:Fuel_Total_Initial, liters) 
            1 (&gt;L:Init_Fuel_Start,bool) 
            }

        (A:FUEL TANK LEFT MAIN QUANTITY, liters) 
        (A:FUEL TANK RIGHT MAIN QUANTITY, liters) + 
        (A:FUEL TANK CENTER QUANTITY, liters) + 
        (&gt;L:Fuel_Total_Current, liters)

        (L:Fuel_Total_Initial, liters) 
        (L:Fuel_Total_Current, liters) - 
        (&gt;L:Fuel_Total_Consumed, liters)
      </Code>
    </Parameter>
  </Visibility>
</PartInfo>
 
Messages
16
This variable does work but its wrongly documented. It is actually indexed to the engine number so if you use (A:General Eng Fuel Used Since Start:1, pounds) this will give you the fuel usage for engine 1.
 

taguilo

Resource contributor
Messages
1,585
Country
argentina
It's what I did.

Searched the forum and come across a code that I modified a little.

I'm afraid it should be a little complex than that.

Because, if after loading a flight and before start the user decides to change fuel quantities, your gauge will display wrong values.

Perhaps you might think of a solution for that ;)

Tom
 
Last edited:
Top