Jump to content
The simFlight Network Forums

Question on diabling FSUIPC weather functions


Recommended Posts

Hi Pete

Apologies for another dumb question. I am looking at using the offsets 0x3127, 3128 and 312C to disable all the FSUIPC weather functions so that I can set things up externally. I am clear in setting the byte in 3127 and also rewriting the data every five seconds or so. My limited understanding of masks etc means that I am not clearwhat I need to put in the 32bits at 3128 - do I set the bit to 1 for each position that I want to effect and then set the bit to 1 in the corresponding bits at 312C?

Basically I just want to turn everything off to work on controlling things myself. ALso I am writing stuff to work on FS9 as well as 2k2. I assume that since this controls FSUIPC options it will have the same effect in both?

thanks in advance

Link to comment
Share on other sites

do I set the bit to 1 for each position that I want to effect and then set the bit to 1 in the corresponding bits at 312C?

Sort of, but not quite. The mask at 3128 tells FSUIPC which bits YOU want to control. All bits not set to 1 there are still under FSUIPC/User control. The bits in 312C corresponding to those in the mask then tell FSUIPC how you want them -- set to 0 or set to 1.

As you'll notice, to DISABLE a facility doesn't always mean setting a 1 there or a 0 -- they vary (depending historically on how the defaults used to be set). You need to look at the description of each one.

ALso I am writing stuff to work on FS9 as well as 2k2. I assume that since this controls FSUIPC options it will have the same effect in both?

Many of the options don't really apply to FS2004. To control weather properly in FS2004 you really have to use the New Weather Interface (NWI) and do it locally, station by station. Global weather simply doesn't stay global as it does in FS2002 and before. The FS2004 weather engine is a complete new beast -- I don't think you'll be successful with one method for both even though FSUIPC still does support the FS2002 facilities in FS2004.

Regards,

Pete

Link to comment
Share on other sites

Thanks Pete for the quicK reply :D

Actually I have written a simple programming language (bit like ABL which does not manage weather). The language commands are independent of the way that I execute them at runtime so when I am interpreting the program code I can write the weather information differently depending on sim - I hope to use the NWI for FS2004 and the AWI for FS2002 - I do not plan to support anything older. Not there yet by a LONG way :? :? but I have the langauge designed - the development environment working and am now working on the runtime interface with FS. I am also only really interested in controlling the weather at the aircraft's position and not over any great distance bweyond that - could I do that in FS9 by clearing all the weather and then just writing to GLOB??

Can I ask another question?

I am able to load a flight situation file into FS using the appropriate offsets. This obvisouly takes time - I can just put a sleep in after this to allow it to complete, but given all the different FS setups out there that seems rather crude - what would you advice be on the best way to know when the load was completed so that I can execute the next set of instructions?

Link to comment
Share on other sites

I am also only really interested in controlling the weather at the aircraft's position and not over any great distance bweyond that - could I do that in FS9 by clearing all the weather and then just writing to GLOB??

Yes, but, in FS2004, unfortunately you'd need to repeat the "clearing all weather" at intervals, because even with the weather dynamics slider set to minimum (or zero programmatically), the weather you set globally will change to become local. Once that happens, any further writing of global weather only affects weather stations not yet set -- certainly nowhere near the aircraft.

Clearing all weather resets the weather set at every station and so allows the global weather, which is the default, to be set again.

If you clear all weather at intervals you will get the occasionally hiccough in the weather visually, and on instruments, whilst it is reset.

I am able to load a flight situation file into FS using the appropriate offsets. This obvisouly takes time - I can just put a sleep in after this to allow it to complete, but given all the different FS setups out there that seems rather crude - what would you advice be on the best way to know when the load was completed so that I can execute the next set of instructions?

That's a good question. Infortunately I don't know the answer. As the flight is loaded various things are set, but what, exactly, indicates the completion? I really don't know. When you load a flight there are calls made all over the place to so many subsystems in FS -- aircraft, panel, scenery, weather, ATC, AI, etc etc. I really have no idea what the very "last" thing done is, and even if I did, what happens if that "last thing" wasn't needed in this case?

You might try looking at the FS time. The seconds count will presumably get reset then start incrementing again, but I'm not sure that this is the 'last' thing either.

There is also the "ready to fly" flag at offset 3364. That may not go non-zero immediately you tell FS to load a flight, but see if it works when you wait for it to go non-zero then zero again. Of course I only found that for FS2004 so it won't apply to your FS2002 version in any case.

Regards,

Pete

Link to comment
Share on other sites

thanks Pete - I presume that FS9 weather management really is better than FS2k2 :D :D it certainly does not seem to make it easy to control it accurately from outside the sim :? :?

I will have a play around with the flight load and see what I can come up with

Link to comment
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
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use. Guidelines Privacy Policy We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.