Jump to content
Sign in to follow this  
Guest ridgell

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

Recommended Posts

Guest ridgell

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..

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites
Guest Vorlin

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

Share this post


Link to post
Share on other sites
Guest ridgell

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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

:-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

Share this post


Link to post
Share on other sites

>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

Share this post


Link to post
Share on other sites
Guest Vorlin

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

Share this post


Link to post
Share on other sites
Guest ridgell

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 :-)

Share this post


Link to post
Share on other sites

>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

Share this post


Link to post
Share on other sites
Guest ridgell

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.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Tom Allensworth,
    Founder of AVSIM Online


  • Flight Simulation's Premier Resource!

    AVSIM is a free service to the flight simulation community. AVSIM is staffed completely by volunteers and all funds donated to AVSIM go directly back to supporting the community. Your donation here helps to pay our bandwidth costs, emergency funding, and other general costs that crop up from time to time. Thank you for your support!

    Click here for more information and to see all donations year to date.
×
×
  • Create New...