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.

General time of day (enum: 1=Day, 2=Dusk/Dawn, 3=Night)

Featured Replies

i am not getting the expected return for;(P:TIME OF DAY, enum)General time of day (enum: 1=Day, 2=Dusk/Dawn, 3=Night) snipit from sdki get a 1 or a 3, never 2.if i want to select for day and dawn/dusk i should write;(P:TIME OF DAY, enum) 3 < is that correct?something fishy...i have gone in fs9 with atleast 10 different setting trying to get the 2 and no lucklooking for wisdom..

  • Moderator

Search the forum. No one has managed to get it to work... it's "broken." :-erks

Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator

As Bill quite rightly points out, the variable is "broken," both in C and in XML. FS does maintain the value - the attached fetches it directly from GLOBAL.DLL.Syntax is:gauge34=dsd_time_of_day!time_of_day, 458,273,10The value is returned to(L:time_of_day, enum)Doug

Does the above work really work? Getting the info from global.dll?We just released a project where I had to bust my behind to get the sun angle formula to work not only in the northern hemisphere, but the southern one as well. It was 2-3 days of trying to tinker with some of Arne's logic riddles / coding... there were many on HC who thought I had totally lost my mind by diggin in there where Angels, Demons and even the IRS fear to tread.But I did finally get it to work. Now you tell me that I could have found out when the _L maps enabled by simply interrogating global.dll????(faint)Scott / Vorlin

thats a sad story....it took me 20 minutes.i posted..doug answered, and 2 minutes to impliment!small caviot, i am getting 1=day,2=dawn/dusk,4=nightno 3 ?? i can use it just fine:) but am i not supposed to get a 3?i did test dawn and dusk seperatly thinking i would find the 3 but they both return 2

Scott,Look at it this way...Your solution will work with FSX. Mine might work FSX.Ridgell,4 is the expected answer for night.Doug

Scott,The Sun Angle formula posted somewhere in this forum works great for both North and South hemispheres, at least in XML code. I use it to manage my cockpit's "smart" lighting system; this way I have better "sensing" of environmental light than when inspecting Time of Day variable.Tom

  • Commercial Member

Might I suggest you try (E:TIME OF DAY,Enum) instead of what you've been trying?For a C++ gauge use: SINT32 time_of_dayi; execute_calculator_code("(E:TIME OF DAY,Enum)",NULL,&time_of_dayi,NULL);

Ed Wilson

Mindstar Aviation
My Playland - I69

  • Moderator

:-ukliam Now that Ed has reminded me, the E: parameter type is unique, and is documented in the Panel & Gauges SDK. It is cleverly hidden in a table contained in the Panels SDK.doc near the bottom of page 79...E Environment You can get the current time from this parameter.In my defense though, it's not like I've used this variable all that often! *:-*

Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator
  • Moderator

>See:>>http://forums.avsim.net/dcboard.php?az=sho...ing_type=search>>RobOMG Rob! This show just how long ago I used this variable myself... :)Sat May-22-04 10:08 PMAlso, it reminds me that I had "suggested" the use of XML for 3d VC gauges long before anyone had actually done so in an FS9 model:Sun May-23-04 08:45 AM"Carried to the extreme, it is entirely possible to build a 3d animated, analog gauge completely *inside* the compiled MDL file itself. Imagine, for example, clocks on a courthouse with 3d "hands" that move and display accurate time!"

Fr. Bill    

AOPA Member: 07141481 AARP Member: 3209010556


     Avsim Board of Directors | Avsim Forums Moderator

Tom,Sun angle is what I did use. I needed to know exactly when the _l bmp's went active because I have certain routines for day gauges and others for night.For some odd reason it was working in reverse when I was down in Australia and tests showed that it was the southern hemesphere in general that had the issue. I was able to straighten that out though and it works fine now.That project that I was busting my rear on is finally public!It's an extensive customization of the Nemeth Brothers MD500E that I worked on in conjunction with Chris (Panther) from Hover Control. You can see a little more about it on my blog and there's a link there to download the aircraft.Check it out and see what you think.http://vorlinized.blogspot.com/Scott / Vorlin

unless i missed something,E:TIME OF DAY, enumonly returns 3 for night and 1 for day.no dawn/dusk return (me thinks still broke) doug's deal works though :-)

  • Commercial Member

>unless i missed something,>E:TIME OF DAY, enum>>only returns 3 for night and 1 for day.>no dawn/dusk return (me thinks still broke) >>doug's deal works though :-)>>Are you using XML or C++?I use it in C++ and it returns exactly what I expect. 1=day,2=dusk/dawn,3=night.However, I've not had to worry about dusk/dawn at all... since it's either day... or it isn't. ;)

Ed Wilson

Mindstar Aviation
My Playland - I69

i am useing xmli am messing around with night time panels. i intend only to go to completly dark at night, so the dawn/dusk 3 return does not work...for me.doug's gauge works fine, i just tested the E: out of intellectual curiosity.

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.