August 1, 201114 yr 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.
August 1, 201114 yr You need to specify units Bob. <String>%((A:BAROMETRIC PRESSURE, mbar))%!4d!mbar</String> Doug
August 1, 201114 yr 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.
August 1, 201114 yr 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 ... Cheers, Rob
August 2, 201114 yr 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 ... 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.
August 2, 201114 yr Commercial Member I believe the value you want is AMBIENT PRESSURE. Ed Wilson Mindstar AviationMy Playland - I69
August 2, 201114 yr 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
August 2, 201114 yr 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.
August 2, 201114 yr 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.
August 3, 201114 yr 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
August 3, 201114 yr 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.
August 4, 201114 yr 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 AviationMy Playland - I69
August 4, 201114 yr 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