Skip to content
View in the app

A better way to browse. Learn more.

The AVSIM Community

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Total Fuel Read-Out Gauge

Featured Replies

  • Commercial Member

No clue what I'm doing wrong here, the gauge is working but not actualyl showing me what I need to see, just some funky numbers, I'm looking for the total fuel in LBS.

<Gauge Name="Fuel Used-Remaining" Author="Engjell Berisha">   <Image Name="Transparent.bmp"/>    <Element>        <Visible>(A:Circuit general panel on, bool)</Visible>            <MaskImage Name="Numbers-Mask" Bright="Yes" ImageSizes="10,15">               <Axis X="0" Y="15"/>            </MaskImage>       <!-- Altitude 10000 -->	<Element>            <Position X="0" Y="0"/>            <Select>               <Value>(A:fuel total quantity,pounds) 0 max 100000 % 10000 / flr</Value>               <Case Value="0">                  <Image Name="0.bmp" Bright="Yes" ImageSizes="11,14"/>               </Case>               <Case Value="1">                  <Image Name="1.bmp" Bright="Yes" ImageSizes="11,14"/>               </Case>               <Case Value="2">                  <Image Name="2.bmp" Bright="Yes" ImageSizes="11,14"/>               </Case>               <Case Value="3">                  <Image Name="3.bmp" Bright="Yes" ImageSizes="11,14"/>               </Case>               <Case Value="4">                  <Image Name="4.bmp" Bright="Yes" ImageSizes="11,14"/>               </Case>               <Case Value="5">                  <Image Name="5.bmp" Bright="Yes" ImageSizes="11,14"/>               </Case>               <Case Value="6">                  <Image Name="6.bmp" Bright="Yes" ImageSizes="11,14"/>               </Case>               <Case Value="7">                  <Image Name="7.bmp" Bright="Yes" ImageSizes="11,14"/>               </Case>               <Case Value="8">                  <Image Name="8.bmp" Bright="Yes" ImageSizes="11,14"/>               </Case>               <Case Value="9">                  <Image Name="9.bmp" Bright="Yes" ImageSizes="11,14"/>               </Case>            </Select>         </Element>        <!-- Altitude 1000 -->        <Element>            <Position X="10" Y="0"/>            <Select>               <Value>(A:fuel total quantity,pounds) 0 max 10000 % 1000 / flr</Value>               <Case Value="0">                  <Image Name="0.bmp" Bright="Yes" ImageSizes="11,14"/>               </Case>               <Case Value="1">                  <Image Name="1.bmp" Bright="Yes" ImageSizes="11,14"/>               </Case>               <Case Value="2">                  <Image Name="2.bmp" Bright="Yes" ImageSizes="11,14"/>               </Case>               <Case Value="3">                  <Image Name="3.bmp" Bright="Yes" ImageSizes="11,14"/>               </Case>               <Case Value="4">                  <Image Name="4.bmp" Bright="Yes" ImageSizes="11,14"/>               </Case>               <Case Value="5">                  <Image Name="5.bmp" Bright="Yes" ImageSizes="11,14"/>               </Case>               <Case Value="6">                  <Image Name="6.bmp" Bright="Yes" ImageSizes="11,14"/>               </Case>               <Case Value="7">                  <Image Name="7.bmp" Bright="Yes" ImageSizes="11,14"/>               </Case>               <Case Value="8">                  <Image Name="8.bmp" Bright="Yes" ImageSizes="11,14"/>               </Case>               <Case Value="9">                  <Image Name="9.bmp" Bright="Yes" ImageSizes="11,14"/>               </Case>            </Select>         </Element>        <!-- Altitude 100 -->        <Element>            <Position X="20" Y="0"/>            <Select>               <Value>(A:fuel total quantity,pounds) 0 max 1000 % 100 / flr</Value>               <Case Value="0">                  <Image Name="0.bmp" Bright="Yes" ImageSizes="11,14"/>               </Case>               <Case Value="1">                  <Image Name="1.bmp" Bright="Yes" ImageSizes="11,14"/>               </Case>               <Case Value="2">                  <Image Name="2.bmp" Bright="Yes" ImageSizes="11,14"/>               </Case>               <Case Value="3">                  <Image Name="3.bmp" Bright="Yes" ImageSizes="11,14"/>               </Case>               <Case Value="4">                  <Image Name="4.bmp" Bright="Yes" ImageSizes="11,14"/>               </Case>               <Case Value="5">                  <Image Name="5.bmp" Bright="Yes" ImageSizes="11,14"/>               </Case>               <Case Value="6">                  <Image Name="6.bmp" Bright="Yes" ImageSizes="11,14"/>               </Case>               <Case Value="7">                  <Image Name="7.bmp" Bright="Yes" ImageSizes="11,14"/>               </Case>               <Case Value="8">                  <Image Name="8.bmp" Bright="Yes" ImageSizes="11,14"/>               </Case>               <Case Value="9">                  <Image Name="9.bmp" Bright="Yes" ImageSizes="11,14"/>               </Case>            </Select>         </Element>        <!-- Altitude 10 -->        <Element>            <Position X="30" Y="0"/>            <Select>               <Value>(A:fuel total quantity,pounds) 0 max 100 % 10 / flr</Value>               <Case Value="0">                  <Image Name="0.bmp" Bright="Yes" ImageSizes="11,14"/>               </Case>               <Case Value="1">                  <Image Name="1.bmp" Bright="Yes" ImageSizes="11,14"/>               </Case>               <Case Value="2">                  <Image Name="2.bmp" Bright="Yes" ImageSizes="11,14"/>               </Case>               <Case Value="3">                  <Image Name="3.bmp" Bright="Yes" ImageSizes="11,14"/>               </Case>               <Case Value="4">                  <Image Name="4.bmp" Bright="Yes" ImageSizes="11,14"/>               </Case>               <Case Value="5">                  <Image Name="5.bmp" Bright="Yes" ImageSizes="11,14"/>               </Case>               <Case Value="6">                  <Image Name="6.bmp" Bright="Yes" ImageSizes="11,14"/>               </Case>               <Case Value="7">                  <Image Name="7.bmp" Bright="Yes" ImageSizes="11,14"/>               </Case>               <Case Value="8">                  <Image Name="8.bmp" Bright="Yes" ImageSizes="11,14"/>               </Case>               <Case Value="9">                  <Image Name="9.bmp" Bright="Yes" ImageSizes="11,14"/>               </Case>            </Select>         </Element>        <!-- Altitude 1 -->        <Element>            <Position X="40" Y="0"/>            <Select>               <Value>(A:fuel total quantity,pounds) 0 max 10 % 1 / flr</Value>               <Case Value="0">                  <Image Name="0.bmp" Bright="Yes" ImageSizes="11,14"/>               </Case>               <Case Value="1">                  <Image Name="1.bmp" Bright="Yes" ImageSizes="11,14"/>               </Case>               <Case Value="2">                  <Image Name="2.bmp" Bright="Yes" ImageSizes="11,14"/>               </Case>               <Case Value="3">                  <Image Name="3.bmp" Bright="Yes" ImageSizes="11,14"/>               </Case>               <Case Value="4">                  <Image Name="4.bmp" Bright="Yes" ImageSizes="11,14"/>               </Case>               <Case Value="5">                  <Image Name="5.bmp" Bright="Yes" ImageSizes="11,14"/>               </Case>               <Case Value="6">                  <Image Name="6.bmp" Bright="Yes" ImageSizes="11,14"/>               </Case>               <Case Value="7">                  <Image Name="7.bmp" Bright="Yes" ImageSizes="11,14"/>               </Case>               <Case Value="8">                  <Image Name="8.bmp" Bright="Yes" ImageSizes="11,14"/>               </Case>               <Case Value="9">                  <Image Name="9.bmp" Bright="Yes" ImageSizes="11,14"/>               </Case>            </Select>         </Element>	</Element>   <copyright>©2009 Engjell Berisha</copyright></Gauge>

I'd appreciate any help!

Good Day,

Engjell Berisha

 

Angel-Simulations-Small.png

No clue what I'm doing wrong here, the gauge is working but not actualyl showing me what I need to see, just some funky numbers, I'm looking for the total fuel in LBS.
				<Value>(A:fuel total quantity,pounds) 0 max 10 % 1 / flr</Value>

I think you're using the wrong parameter. I do the same thing (but without specifying min or max) using this code, displaying in formatted text:

<String>%((A:FUEL TOTAL QUANTITY WEIGHT, pounds))%!06d!</String>

"Fuel total quantity" would want to be displayed in units of volume (gallons/litres), whereas "fuel total quantity weight" would want to be displayed in units of weight (pounds/kg). Make sense?

  • Moderator
<String>%((A:FUEL TOTAL QUANTITY, gallons))%!06d!</String>

-or-

<Value>(A:FUEL TOTAL QUANTITY WEIGHT,pounds) 0 max 10 % 1 / flr</Value>

Don't try to mix-and-match the A:variables! ;)

Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator
  • Author
  • Commercial Member

Hey guys thanks loads!!! Got it working right away.I'd be working with a lot of similar gauges and I copied it over wrong, after looking it over for almost a month I did see that never happened before so I overlooked it, shows how stupid I can be at times. :( I was looking at that and trying to make the same sort of gauge with a different value, I'm wanting to do the same but just display the weight of the fuel in lbs of each individual tank, below is the value of one of the gauges.

<Value>((A:FUEL TANK LEFT AUX QUANTITY, gallons) (A:Fuel weight per gallon, pounds per gallon) * flr) 0 max 10 % 1 / flr</Value>

I can get it to display the gallons but that's of no use to me, I've tried the changing the value to a few things such as:

<Value>(A:FUEL TANK LEFT AUX QUANTITY WEIGHT, pounds) 0 max 10 % 1 / flr</Value>

I'm assuming that this can't be done, because I've taken every approach I know.Really appreciate your help so far guys! :(

Good Day,

Engjell Berisha

 

Angel-Simulations-Small.png

I don't believe there is such an "AUX QUANTITY WEIGHT" variable (have a look at fs2x.com's Internal variable list, for a list of valid outputs).You could probably fake it though, by using the "AUX QUANTITY, gallons" variables and simply multiplying them by 6.7. Just like FS does itself to convert the gallons into pounds.

  • Author
  • Commercial Member

I've tried that too, with no avail.I've got the gauge working with string and text but I want it to use my images to display the value instead of a font. Here's how I got it to show with just string and text.

<Gauge Name="Fuel Quantity" Author="Engjell Berisha"> <Image Name="Fuel Window.bmp"/>   <Element>	 <Position X="2" Y="0"/>	<Visible>(A:Circuit general panel on, bool)</Visible>	<Text X="70" Y="13" Bright="NO" Length="5" Font="IRS" Color="#00FF00" Adjust="Center" VerticalAdjust="Center" Fixed="Yes">	   <String>%((A:FUEL TANK LEFT AUX QUANTITY, gallons) (A:Fuel weight per gallon, pounds per gallon) * flr)%!5d!%</String> 	  </Text>   </Element>   <copyright>(c)2009 Engjell Berisha</copyright></Gauge>

I've done this with all the other tanks it works just fine this way, but I'd like to do it using images which isn't working out like I'd hoped. If it's not possible I guess I'd just have to do with what I've got now.

Good Day,

Engjell Berisha

 

Angel-Simulations-Small.png

  • Moderator

Do you have any of the FS SDKs installed? If you don't, you really, really need to do so...You cannot simply make up your own A;variableNames,units and expect them to work... :( Both the FS9 and FSX SDKs contain lists & descriptions of every token_variable and key_event used in the sim. Don't stay home without them! :(

Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator
  • Author
  • Commercial Member

Believe it or not I've got all the FS9 SDK's installed, and I find them very useful. But my point is that I've exhausted all that, and I was trying to use working variables and see what results I could fetch with them, I agree the logic in some of the codes I posted isn't logic at all but I wasn't trying to make any sense. The code is a product of shear frustration, I hoped that something might give me an indication toward the right direction.I have the list from the SDK's and the ones from FS2x although they're the same thing.It seems my question wasn't understood, what I am asking is if anyone knows of a way to manipulate the variables to give me the value I was trying to derive; Left Aux Tank Quantity, weight in pounds.

Good Day,

Engjell Berisha

 

Angel-Simulations-Small.png

  • Author
  • Commercial Member

Such as ((A:FUEL TANK LEFT AUX QUANTITY, gallons) * 6.7) and that would give me the fuel in lbs, tried it but it didn't work. :(

Good Day,

Engjell Berisha

 

Angel-Simulations-Small.png

  • Moderator

Try:

<!-- Constants --><Macro Name="LAuxTW">(A:FUEL TANK LEFT AUX QUANTITY, gallons) (A:Fuel weight per gallon, pounds per gallon) *</Macro><!-- 1's digit --><Value Minimum="0" Maximum="9.999">@LAuxTW 10 %</Value><!-- 10's digit --><Value Minimum="0" Maximum="9.999">			@LAuxTW 100 % 10 / s1 d flr - s2 0.9 <=			if{ l1 flr } 			els{ l1 flr l2 10 * 9.999 - + }</Value><!-- 100's digit --><Value Minimum="0.0" Maximum="9.99">			@LAuxTW abs 1000 % 100 / s1 l1 flr - s2 0.9 <=			if{ l1 flr } 			els{ l1 flr l2 10 * 8 - 2 / + }</Value><!-- 1000's digit --><Value Minimum="0.0" Maximum="9.99">			@LAuxTW abs 10000 % 1000 / s1 l1 flr - s2 0.98 <=			if{ l1 flr } 			els{ l1 flr l2 100 * 98 - 2 / + }</Value><!-- 10,000's digit --><Value Minimum="0.0" Maximum="9.99">			@LAuxTW abs 100000 % 10000 / s1 l1 flr - s2 0.998 <=			if{ l1 flr } 			els{ l1 flr l2 1000 * 998 - 2 / + }</Value>

Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator
  • 2 weeks later...
Such as ((A:FUEL TANK LEFT AUX QUANTITY, gallons) * 6.7) and that would give me the fuel in lbs, tried it but it didn't work. :(
Hi,then maybe you should try:(A:FUEL TANK LEFT AUX QUANTITY, gallons) 6.7 *This is xml bro! Read it backwards, upside down and inside out then maybe it will work for you... :( grtWillem

Create an account or sign in to comment

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.