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

Back for some more help, please

Messages
1,084
Country
us-northcarolina
Below is the code I have written in XML for one of four digital gauges I need for the overhead panel of my C-17 Globemaster. Before I go any further, I would like to thank you all for your help with making the ramp panel a success. It is included on my panel which I have shared with the others in my vANG who also fly C-17s. Now to my new problem.

I created the gauge below by modifying a fuel percent gauge which is on the main panel. On the overhead are the actual quantities of fuel for the left auxiliary, left main, right main and right auxiliary fuel tanks. I checked to make sure that these were the names of the actual fuel tanks in the aircraft cfg and they are. I can get the gauge to appear, but the text in both the left auxiliary and left main I have created so faer both show zero though there is actually 100% fuel when I start the FS9. Please help again. What did I leave out or type wrong. I have tried going through both the XML tutorials and even the FS9 Panel SDK I have but no help. My gauges both read zero.

Code:
<Gauge Name="fuel_left_main" Version="1.0">

<Image Name="fuel.bmp"/>
<Image sizes= "30,15"/>

<Select>
<Value> (A:Fuel tank left main quantity, pounds)
</Value>
</Select>


<Element>

<Text X="190" Y="112" Length="19" Fixed="no" Font="Arial" Attributes="Bold" Adjust="center" VerticalAdjust="center" Color="#FFFFFF" Bright="Yes">

<String>%((A:fuel tank left main qty, pounds))%!5d! </String>
</Text>
</Element>



</Gauge>
 
Well, of course it will show zero...

The A:var you chose is non-existent!

Code:
<String>%((A:FUEL TANK LEFT MAIN QUANTITY, pounds))%!5d! </String>
 
Two things;
qty is spelt quantity and the units are gallons.

Edit:
You were quick there Bill!
 
Last edited:
You can specify pounds; XML will politely convert it for you. You could also specify quarts if you were of a mind to... :laughing:
 
But not Volts...

arrgh..


<-- continues to build his electric plane with fuel cells camoflauged as electric batteries.....
 
Thank you...but why

Bill, thanks for the help again. I changed the code from the lower case to all caps as you showed and both the left and right main gauges are posting a quantity. Question? If the fuel quantity in the main tanks in 84,600 why is the gauge showing 105 in the window? Secondly, I capped the auxiliary gauges but they still show "0" quantity. From an existing gauge I copied the string

Code:
<Gauge Name="fuel_left_aux" Version="1.0">

<Image Name="fuel_laux.bmp"/>
<Image sizes= "30,15"/>

<Select>
<Value> (A:FUEL TANK LEFT AUX QUANTITY, pounds)
</Value>
</Select>


<Element>

<Text X="190" Y="82" Length="29" Fixed="no" Font="Arial" 

Attributes="Bold" Adjust="center" 

VerticalAdjust="center" Color="#FFFFFF" Bright="Yes">

<String>%((A:FUEL TANK LEFT AUX QUANTITY, pounds))%!5d! 

</String>
</Text>
</Element>



</Gauge>

I looked through all my docs but can't find ref to aux tanks just center or wing or fuselage etc.

Appreciate your help. Its nice to have someplace to ask.
 
You can specify pounds; XML will politely convert it for you. You could also specify quarts if you were of a mind to... :laughing:
Quarts, yes, litres, yes, Pounds .... no. You need the 6.7 conversion factor.
You can use;
(A:FUEL TOTAL QUANTITY WEIGHT,Pounds)
&
(A:FUEL WEIGHT PER GALLON,Pounds)
but that gives a value of 6.00!

I looked through all my docs but can't find ref to aux tanks just center or wing or fuselage etc.
Do your docs include the SDK?
There are two;
(A:FUEL TANK LEFT AUX QUANTITY,Gallons)
&
(A:FUEL TANK RIGHT AUX QUANTITY,Gallons)
 
SDKs

I have searched the Panel SDK thoroughly and yes those are both included but they only return the zero value. I HAVE been able to get the main gauges working by using an SDK string below:

Code:
<String>%((A:FUEL RIGHT QUANTITY, gallons) (A:FUEL WEIGHT PER 

GALLON, pounds per gallon) *)%!d!

Problem is though that this only returns the TOTAL LEFT OR RIGHT FUEL VALUES not MAIN tanks and AUX are still giving me "0"s.

When I add MAIN like (A: FUEL RIGHT MAIN QUANTITY, gallons etc. it is obviously an incorrect string as Bill said above for the var. because a value of "0" is returned in the gauge. likewise, your suggestion above was not correct because when I input it in IT returned a "0" value. Thank you for your help, hope Bill can help with this dilemma cause it is frustrating. I really appreciate everyone who is trying to help, thank you.
 
Last edited:
Bill, thanks for the help again. I changed the code from the lower case to all caps as you showed and both the left and right main gauges are posting a quantity.

Just to be clear, the case is unimportant. What is important is the precise spelling and yes, proper units... :o

"Quantity" must always be a "liquid measure" and "Weight" of course must always be -well- a "weight measure."

The "tanks" that will return any values at all are wholly dependent on what tanks you have configured in your aircraft.cfg file. Obviously you cannot get anything but zero from an undefined tank...

So, let's see your tank configuration from the aircraft.cfg file, then we can go from there!
 
OK here they are from the C-17 aircraft.cfg

Thanks, Bill

Here is the fuel segment from the .cfg:

Code:
[fuel]
fuel_type 		 =  2
number_of_tank_selectors =  4
electric_pump 		 =  1
manual_transfer_pump     =  1
fuel_dump_rate           =  0.002


Leftaux  =  -3.00, -15.00,  6.50,   5660.30, 0.00	//5660.30
Leftmain = -10.00, -35.00,  9.50,   12638.61, 0.00	//12638.61
Rightmain= -10.00,  35.00,  9.50,   12638.61, 0.00	
Rightaux =  -3.00,  15.00,  6.50,   5660.30, 0.00

Looking for your reply and again thank you.
 
Code:
[fuel]
fuel_type 		 =  2
number_of_tank_selectors =  4
electric_pump 		 =  1
manual_transfer_pump     =  1
fuel_dump_rate           =  0.002


Leftaux  =  -3.00, -15.00,  6.50,   5660.30, 0.00	//5660.30
Leftmain = -10.00, -35.00,  9.50,   12638.61, 0.00	//12638.61
Rightmain= -10.00,  35.00,  9.50,   12638.61, 0.00	
Rightaux =  -3.00,  15.00,  6.50,   5660.30, 0.00

Looking for your reply and again thank you.
These should work for you:

Code:
<String>%((A:FUEL TANK LEFT AUX QUANTITY,gallons)
 (A:FUEL WEIGHT PER GALLON, pounds per gallon) *)%!d!</String>

<String>%((A:FUEL TANK LEFT MAIN QUANTITY,gallons)
 (A:FUEL WEIGHT PER GALLON, pounds per gallon) *)%!d!</String>

<String>%((A:FUEL TANK RIGHT MAIN QUANTITY,gallons)
 (A:FUEL WEIGHT PER GALLON, pounds per gallon) *)%!d!</String>

<String>%((A:FUEL TANK RIGHT AUX QUANTITY,gallons)
 (A:FUEL WEIGHT PER GALLON, pounds per gallon) *)%!d!</String>
 
When I add MAIN like (A: FUEL RIGHT MAIN QUANTITY, gallons etc. it is obviously an incorrect string as Bill said above for the var. because a value of "0" is returned in the gauge. likewise, your suggestion above was not correct because when I input it in IT returned a "0" value. Thank you for your help, hope Bill can help with this dilemma cause it is frustrating. I really appreciate everyone who is trying to help, thank you.

Once again, spelling!

Try;

(A:FUEL TANK RIGHT MAIN QUANTITY,Gallons)

Edit:
Bill! Someone phones and you're in there!
 
Fixed

thank you Chris and Bill for all your help. All four gauges are working perfectly and are co-ordinated with the Total fuel Percent Gauge on the main panel. I am now going to tackle the APU and EXternal Power digital voltmeters with as much success I hope keeping in mind what I have learned here. Thanks again to you both.
 
Back
Top