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

FSX Maximum Allowable Fuel Help

Messages
52
Country
hongkong
Hi,

I am working on the digital display for Max Allowable Fuel on C172 for Saitek's Flight Instrument Panels.

I have no problem getting the gallon displays correctly using the followings:

Hundred
<Value Minimum="-9" Maximum="9">(A:FUEL TOTAL CAPACITY, gallons) 100 div % (A:FUEL TOTAL CAPACITY, gallons) 1000 div % 10 * -</Value>
Ten
<Value Minimum="-9" Maximum="9">(A:FUEL TOTAL CAPACITY, gallons) 10 div % (A:FUEL TOTAL CAPACITY, gallons) 100 div % 10 * -</Value>
Digit
<Value Minimum="-9" Maximum="9">(A:FUEL TOTAL CAPACITY, gallons) div % (A:FUEL TOTAL CAPACITY, gallons) 10 div % 10 * -</Value>

:confused: However, I am not able to convert the capacity from gallon into pound using the FUEL WEIGHT PER GALLON command.

Hundred
<Value Minimum="-9" Maximum="9">(A:FUEL TOTAL CAPACITY, gallons)(A:FUEL WEIGHT PER GALLON, pounds)* 100 div % (A:FUEL TOTAL CAPACITY, gallons)(A:FUEL WEIGHT PER GALLON, pounds)* 1000 div % 10 * -</Value>

Ten
<Value Minimum="-9" Maximum="9">(A:FUEL TOTAL CAPACITY, gallons)(A:FUEL WEIGHT PER GALLON, pounds) * 10 div % (A:FUEL TOTAL CAPACITY, gallons)(A:FUEL WEIGHT PER GALLON, pounds) * 100 div % 10 * -</Value>

Digit
<Value Minimum="-9" Maximum="9">(A:FUEL TOTAL CAPACITY, gallons)(A:FUEL WEIGHT PER GALLON, pounds) * div % (A:FUEL TOTAL CAPACITY, gallons)(A:FUEL WEIGHT PER GALLON, pounds) * 10 div % 10 * -</Value>

Any idea what mistake I have made? Suggestions and advices appreciated.
 
Last edited:
"Hundred
<Value Minimum="-9" Maximum="9">(A:FUEL TOTAL CAPACITY, gallons)(A:FUEL WEIGHT PER GALLON, pounds)* 100 div % (A:FUEL TOTAL CAPACITY, gallons)(A:FUEL WEIGHT PER GALLON, pounds)* 1000 div % 10 * -</Value>"

I see a missing Space after the first set of parens (...)* <------

Paul
 
Tom

For pounds weight of fuel .
Try ,

Hundred
<Value Minimum="-9" Maximum="9">(A:FUEL TOTAL CAPACITY, gallons) 6.02 * 100 div % (A:FUEL TOTAL CAPACITY, gallons) 6.02 * 1000 div % 10 * -</Value>

The above is based on :
1 US gallon = 6.02 lbs

Cheers
Karol

As far as I know the computer cannot tell what type of fuel is in use by your aircraft , you have to tell it .
That is done by the gallon to weight ratio ,
ie;
Avgas - 1 US gallon = 6.02 pounds ( the 6.02 might vary slightly depending on petrol grade used )
Avtur - 1 US gallon = 6.7 pounds

The weight per gallon will vary slightly depending on temperature , but compensating for temperature gets complex .
 
Last edited:
"Hundred
<Value Minimum="-9" Maximum="9">(A:FUEL TOTAL CAPACITY, gallons)(A:FUEL WEIGHT PER GALLON, pounds)* 100 div % (A:FUEL TOTAL CAPACITY, gallons)(A:FUEL WEIGHT PER GALLON, pounds)* 1000 div % 10 * -</Value>"

I see a missing Space after the first set of parens (...)* <------

Paul

Hi Paul,
The space doesn't affect the final result. Moreover, the space is not a must.
Thanks
 
Tom

For pounds weight of fuel .
Try ,

Hundred
<Value Minimum="-9" Maximum="9">(A:FUEL TOTAL CAPACITY, gallons) 6.02 * 100 div % (A:FUEL TOTAL CAPACITY, gallons) 6.02 * 1000 div % 10 * -</Value>

The above is based on :
1 US gallon = 6.02 lbs

Cheers
Karol

As far as I know the computer cannot tell what type of fuel is in use by your aircraft , you have to tell it .
That is done by the gallon to weight ratio ,
ie;
Avgas - 1 US gallon = 6.02 pounds ( the 6.02 might vary slightly depending on petrol grade used )
Avtur - 1 US gallon = 6.7 pounds

The weight per gallon will vary slightly depending on temperature , but compensating for temperature gets complex .

Hi Karol,

Have tried that already but no success. :o
 
Hi Paul,
The space doesn't affect the final result. Moreover, the space is not a must.
Thanks

Hi Paul,

You are right that space is important. It does affect the correctness of the formula.

After reformatting the three scripts properly as follows, they are now generating the correct results:

Hundred
<Value Minimum="-9" Maximum="9">(A:FUEL TOTAL CAPACITY, gallons) (A: FUEL WEIGHT PER GALLON, pounds) * 100 div</Value>
Ten
<Value Minimum="-9" Maximum="9">(A:FUEL TOTAL CAPACITY, gallons) (A: FUEL WEIGHT PER GALLON, pounds) * 10 div % (A:FUEL TOTAL CAPACITY, gallons) (A: FUEL WEIGHT PER GALLON, pounds) * 100 div 10 * -</Value>
Digit
<Value Minimum="-9" Maximum="9">(A:FUEL TOTAL CAPACITY, gallons) (A: FUEL WEIGHT PER GALLON, pounds) * div % (A:FUEL TOTAL CAPACITY, gallons) (A: FUEL WEIGHT PER GALLON, pounds) * 10 div % 10 * -</Value>

Thank you very much.

Also, thanks to Karol for all the suggestions.

At the moment, just need to figure out how to calculate "The Total Payload on C172".
 
Indeed SAITEK's script interpreter is very particular.

I wonder why they didn't follow exactly the same operator's functioning as in FS. For example:

Code:
(A:FUEL TOTAL CAPACITY, gallons) (A: FUEL WEIGHT PER GALLON, pounds) * 10 div %

Obviously won't work the same in FS...:eek:

Tom
 
Sorry Taguilo, don't quite understand what you are asking.

The way I put them in three lines is to put the result in digital display. Is that what you are asking?
 
I am not asking, just stating a difference between SAITEK and FS :)

What you put surely works in SAITEK modules, but won't work within a true FS gauge.

Tom
 
I see.
However, I believe the basis is the same to FS except that the way of putting them for different platform has to be adjusted.
I tried plotting a fuelflow gauge from FIP to FS. Not much changes required as long as it functions in the first place.
Rgds,
Tom
 
And a little warning about the Fuel Weight per Gallon variable - FS2004 and FSX use different units, so you have to sense the sim in use (i.e. if that variable is giving you a number or 0), and then switch units if necessary.
 
Hi,

Glad to help. I have a Macro near the top of any gauge that uses that variable to do that, and then use the Macro name for all my calculations in the gauge proper.

Code:
	<!--  Determine fuel density for FS2004 (pounds per gallon) or FSX (pounds) -->
	<Macro Name="Fuel_Weight"> (A:Fuel weight per gallon, pounds per gallon) 6 == (A:Fuel weight per gallon, pounds per gallon)  10 * near 10 / 6.7 == || if{ (A:Fuel weight per gallon, pounds per gallon) } els{ (A:Fuel weight per gallon, pounds)  } </Macro>
 
Hi Tgibson,
Even though Saitek's FIP doesn't compatible with macros, your codes surely serve some good reference for my future development.
Thanks
 
Back
Top