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.

Barometric Digital Display

Featured Replies

  • Moderator

I've been working on a 3d altimeter and have come to an odd problem with the barometric pressure digital display......most particularly the hundredths digit. Keyframed 0-9...This script should work, but it is precisely -0.01 unit off! When it should display 29.92, it is displaying 29.91... :(

  <PartInfo>	<Name>baro_hundths</Name>	<AnimLength>9</AnimLength>	<Animation>	  <Parameter>		<Code>(A:KOHLSMAN SETTING HG, inHg) abs 99 min 0 max 0.1 % 0.01 / flr</Code>	  </Parameter>	</Animation>	<MouseRect>	  <TooltipID>TOOLTIPTEXT_ALTIMETER_FEET_METERS_SPECIAL</TooltipID>	</MouseRect>  </PartInfo>

Since that translates to a nine foot error, it is unacceptable. Anyone have any ideas?

Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator
I've been working on a 3d altimeter and have come to an odd problem with the barometric pressure digital display......most particularly the hundredths digit. Keyframed 0-9...This script should work, but it is precisely -0.01 unit off! When it should display 29.92, it is displaying 29.91... :(
  <PartInfo>	<Name>baro_hundths</Name>	<AnimLength>9</AnimLength>	<Animation>	  <Parameter>		<Code>(A:KOHLSMAN SETTING HG, inHg) abs 99 min 0 max 0.1 % 0.01 / flr</Code>	  </Parameter>	</Animation>	<MouseRect>	  <TooltipID>TOOLTIPTEXT_ALTIMETER_FEET_METERS_SPECIAL</TooltipID>	</MouseRect>  </PartInfo>

Since that translates to a nine foot error, it is unacceptable. Anyone have any ideas?

Possibly it's a rounding error, arising from the actual value of (A:KOHLSMAN SETTING HG, inHg). If that actually returns 29.9199999 then your expression would give 1 instead of 2 for the last digit. The same effect could occur from rounding by the % and / operators.You might have to accept that, with only a 4-digit display, 29.92 actually represents a setting typically between 29.9150001 and 29.9249999.Incidentally, what is your reason for taking the absolute value and limiting it to between 0 and 99?

Gerry Howard

Hi Bill!It seems that Flght Simulator uses a value of 29.919 inHg to aproximate a Baro value of 29.92, if you calibrate it increasing the baro pressure it changes to 29.928 so the offset is now 0.008. Using the math of your claculation it will show 29.91 unless you calibrate the altimeter or use NEAR instead of FLR to show 29.92. I use the folowing code to display the Barometric setting:

<String>%((L:Standar Pressure, bool))%{if}% STD %{else}%((L:Baro Sel, bool))%{if}%((A:Kohlsman setting mb, Pa) 100 / flr)%!4.0f!%{else}%((A:Kohlsman setting hg, inHg) 0 max 99.99 min)%!5.2f!%{end}%{end}</String>

RegardsJavier

  • Author
  • Moderator
You might have to accept that, with only a 4-digit display, 29.92 actually represents a setting typically between 29.9150001 and 29.9249999.Incidentally, what is your reason for taking the absolute value and limiting it to between 0 and 99?
Gerry, the reason for the 0 - 99 limit is to keep the output scaled for 0 to 99 keyframes of animation in the 3d model.Changing "flr" to "near" seems to have solved the display issue. "ceil" would also work. The remaining 3d drums continue to have "flr" to prevent premature rollover from occurring.Thanks to everyone for their suggestions! :(

Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator

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.