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.

Gauge Help Please

Featured Replies

I have a gauge I am trying to get working in FSX to display the barometric pressure in my plane. The partial code is: <Element> <Position X="33" Y="85"/> <Text X="60" Y="12" Length="8" Fixed="Yes" Font="Arial" FontHeight="0" FontWeight="400" Charset="Default" Attributes="Normal" Adjust="Center" VerticalAdjust="Center" Multiline="No" Color="#C0C0C0" BackgroundColor="transparent" Bright="Yes" UseTransparency="Yes"> <String>%((A:BAROMETRIC PRESSURE))%!4d!mbar</String> <Failures> <SYSTEM_ELECTRICAL_PANELS Action="Freeze"/> </Failures> </Text> </Element> It only displays 0 mbar. What am I doing wrong?Thanks, regards, Bob.

You need to specify units Bob.

<String>%((A:BAROMETRIC PRESSURE, mbar))%!4d!mbar</String>

Doug

  • Author
You need to specify units Bob.
<String>%((A:BAROMETRIC PRESSURE, mbar))%!4d!mbar</String>

Doug

Hi Doug. OK. Thanks a lot. As you can see I am an XML neophyte. Regards, Bob.
You need to specify units Bob.
<String>%((A:BAROMETRIC PRESSURE, mbar))%!4d!mbar</String>

Doug

Forgetting to specify the Units for a variable is probably THE most common mistake when coding in XML.That is: for me it is ...happy.png Cheers, Rob
  • Author
Forgetting to specify the Units for a variable is probably THE most common mistake when coding in XML.That is: for me it is ...happy.pngbullet_toggle_plus.png Manage Topic Poll Cheers, Rob
Thanks Rob and Doug. I made the above change but it still said 0 mbar. I looked at what I think is the list of FSX "A" variables in the Gauges SDK and saw a BAROMETER PRESSURE, not BAROMETRIC PRESSURE. Could that be the problem? I also changed it to:<String>%((A:BAROMETRIC PRESSURE, inHg))%!4d!inHg</String> and I got a reading of 24 inHg which is not correct. I can't find any barometer or barometric gauge for FSX. I did find an old FS98 gauge but it won't work in FSX. Any help sure would be appreciated. Best regards, Bob. P.S. I just tried:<String>%((A:BAROMETER PRESSURE, mbar))%!4d!mbar</String> and got 807 mbar which is also not correct.
  • Moderator

Use !n.df! for decimal numbers (where n is expected whole digits, d is required decimal digitsUse !d! for whole numbers Formatting for decimals is critical for inHg:

 <String>%((A:AMBIENT PRESSURE, inHg))%!2.2f!inHg</String><String>%((A:BAROMETER PRESSURE, inHg))%!2.2f!inHg</String>

For millibars, use the !d! format:

 <String>%((A:AMBIENT PRESSURE, mbar))%!d!hPa</String><String>%((A:BAROMETER PRESSURE, mbar))%!d!hPa</String>

Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator
  • Author
I believe the value you want is AMBIENT PRESSURE.
Hi Ed. Thanks. I'll try that instead. Regards, Bob.
Use !n.df! for decimal numbers (where n is expected whole digits, d is required decimal digitsUse !d! for whole numbers Formatting for decimals is critical for inHg:
<String>%((A:AMBIENT PRESSURE, inHg))%!2.2f!inHg</String><String>%((A:BAROMETER PRESSURE, inHg))%!2.2f!inHg</String>

For millibars, use the !d! format:

<String>%((A:AMBIENT PRESSURE, mbar))%!d!hPa</String><String>%((A:BAROMETER PRESSURE, mbar))%!d!hPa</String>

Hi Bill. Thanks a lot. I'll try those suggestions. I appreciate the all the help from everyone. Regards, Bob.
  • Author

OK guys now that I have the number formatting correct, thanks to all of you, I have another problem. Before, when I was using the incorrect number formatting, I was getting 24 inHg. Now I get 23.84 inHg sitting on the tarmac at KCYS with an altimeter setting of 29.92 per the ATIS. I also had 807 mbar before which is the same as 23.84 inHg. I used the AMBIENT PRESSURE for the A parameter. My question is why don't I get 29.92 inHg? Sorry for all the problems. Regards, Bob.

  • Moderator

You need to be very specific when asking for what you actually want, Bob. :) If you wish to see what the altimeter is reporting, then you need to use the variables for the altimeter:

 (A:KOHLSMAN SETTING MB,mbar)(A:KOHLSMAN SETTING HG,inHg)

Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator
  • Author
You need to be very specific when asking for what you actually want, Bob. :) If you wish to see what the altimeter is reporting, then you need to use the variables for the altimeter:
(A:KOHLSMAN SETTING MB,mbar)(A:KOHLSMAN SETTING HG,inHg)

Hi Bill. Thanks. I found that too. That works right and gives me 29.92 or close to it on the ground at any airport. What I want is the ambient barometric pressure at the airport on a clear day. I don't know why I get 23.84 inHg and not 29.92 in Hg. on the ground. I want to be able to display the actual outside pressure in inHG at altitude and on the ground. Does FSX model the lower ambient pressure when in stormy conditions? I appreciate the help. Regards, Bob.
  • Commercial Member
Hi Bill. Thanks. I found that too. That works right and gives me 29.92 or close to it on the ground at any airport. What I want is the ambient barometric pressure at the airport on a clear day. I don't know why I get 23.84 inHg and not 29.92 in Hg. on the ground. I want to be able to display the actual outside pressure in inHG at altitude and on the ground. Does FSX model the lower ambient pressure when in stormy conditions? I appreciate the help. Regards, Bob.
The variable I mentioned is indeed the ambient barometric pressure. the 29.92 is the Kollsman setting and is a 'calibration' value for the altimeter, but is not necessarily the ambient pressure (though it should be set to that).

Ed Wilson

Mindstar Aviation
My Playland - I69

  • Author

Thanks to all who have answered the post I finally have a working ambient pressure gauge and have learned how to format the value. What I stupidly forgot is that the weather report atmospheric pressure is Mean Sea Level Pressure not the actual atmospheric pressure at the location. I happened to choose KCYS for the testing, and is at 6,156 ft. elevation already. The 807 mbar was right all along for the actual atmospheric pressure, as was the 23.84 inHg. The whole thing started out because I had the wrong formatting for the readout and the decimal places. I was so concerned about the function of the gauge I completely forgot the "real world" situation. Regards, Bob.

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.