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.

Environmental "light" value

Featured Replies

The SDK discusses a byte value (0..255) that represents the current environment lighting (adjusted for time of day, sun elevation, moonlight). This value is used to colorize or tint the panels as a scale factor.Does anybody have any idea as to where this value can be found?

  • Moderator

The only entries that I'm aware of that will affect the panels in this manner are these from the panel.cfg:Day=255,255,255 <= affects 2d panel color, brightness (daytime)Night=32,32,32 <= affects 2d panel color, brightness (dusk/night/dawn)Luminous=190,190,190 <= affects gauge color, brightnessIf there's anything else, I'm don't know of it... ???

Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator

Good point.The section in the panel.cfg determines what color is used for the highlight, but I wanted to get the scale factor FS currently applies to the non_luminous parts.From the SDK, tint = night + (day

  • Moderator

Arne's post re: sun, was to compute the angle of the sun at any given lat/lon/time/date, and was used as part of an algorithim to calculate the dawn/day/dusk/night transition points, since the returned value from the stock variable is either inaccessible for XML folks, or wholly unreliable for C gauges.I'm not aware of any accessible variable for the "sunlight" that you seek, nor of a way to modify what appears to be an protected internal function of one of the .dll files. It may be possible, but if so, it most certainly won't be easy... :(

Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator

I was thinking perhaps of painting a bitmap, having FS modify it for night color, and grabbing it back to find out what FS did with it. Ideally, if you use a white pixel, you can deduce from the new value what the scale factor was. But, the problem is getting that image back - and the handle in the PELEMENT tree only gives me my image back - probably because DirectX actually does the rendering and FS just specifies a color matrix transformation.Argh.

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.