Jump to content
The simFlight Network Forums

Surface wind gust problems


Recommended Posts

Hi Pete,I am writing an IOS interface in VB 6,I am using fsuipc and widefs to comunicate with FS2002 within a network.

I never had problems with surface winds until now that I added gust,when i activate or deactivate gust the simulator became uncontrollable the winds change to more than 99 knots of intensity,the engines go up to 102 percent of N1 and the plane became "aerobatic" and out of control. :?

I only write 1 or 0 to activate or deactivate gust :shock:

:idea: I suspect that Enrico's Quickmap maybe have some relationship with this because when I experienced this problem quickmap was running together with my application in a client PC,When i had my application running alone that problem doesn't happens,any suggestion ???

Thanks in advance !

Link to comment
Share on other sites

I only write 1 or 0 to activate or deactivate gust :shock:

Gusts are controlled by a value specifying the maximum difference in Wind Speed. Where do you get the idea that they are either on or off?

It sounds like you have misunderstood something somewhere. Which of the three weather interfaces are you using? Where are you writing the "1 or 0"?

Regards,

Pete

Link to comment
Share on other sites

I only write 1 or 0 to activate or deactivate gust :shock:

Gusts are controlled by a value specifying the maximum difference in Wind Speed. Where do you get the idea that they are either on or off?

It sounds like you have misunderstood something somewhere. Which of the three weather interfaces are you using? Where are you writing the "1 or 0"?

Regards,

Pete

Hi Pete !

These are the offsets i'm using :

Public Const surface_wind_speed = &HF72

Public Const surface_wind_direction = &HF74

Public Const surface_wind_gust = &HF78

Speed and direction works fine

I wrote gust this way (I am not a guru programmer :lol: )

Dim ret As Boolean

Dim dwResult As Long

Dim gust As Byte

This is to turn on

gust = 1

ret = FSUIPC_Write(surface_wind_gust, 2, VarPtr(gust), dwResult)

ret = FSUIPC_Process(dwResult)

This is to turn off

gust = 0

ret = FSUIPC_Write(surface_wind_gust, 2, VarPtr(gust), dwResult)

ret = FSUIPC_Process(dwResult)

Tell me what's wrong please :shock:

Thanks for your quickly response !

Link to comment
Share on other sites

These are the offsets i'm using :

Public Const surface_wind_speed = &HF72

Public Const surface_wind_direction = &HF74

Public Const surface_wind_gust = &HF78

Ah .. the ancient and venerable FS98 interface. I didn't know anyone still programmed for that these days.

Yes, in FS98 you could only enable or disable gusts. In order to interface the old limited FS98 weather system to FS2000, FS2002 and FS2004 I do some manipulations on the current windspeed to calculate a reasonable gust increment, which should work out at a random value somewhere between 5 knots and 5 knots more than 120% of the wind speed.

This served well in comparison with what FS98 used to do with the "on/off" option then available.

This means that to get as high as your 99 knots the base wind speed must have been of the order of 40 odd knots.

Are you writing the speed first? If not the gust value may be calculate based on something else. Also, I hope you are not doing a Process call for every individual read/write. You should accumulate them all for one cycel and send one Process.

If you cannot figure it out, enable the Weather and IPC Write logging and show me the Log.

Regards,

Pete

Link to comment
Share on other sites

These are the offsets i'm using :

Public Const surface_wind_speed = &HF72

Public Const surface_wind_direction = &HF74

Public Const surface_wind_gust = &HF78

Ah .. the ancient and venerable FS98 interface. I didn't know anyone still programmed for that these days.

Yes, in FS98 you could only enable or disable gusts. In order to interface the old limited FS98 weather system to FS2000, FS2002 and FS2004 I do some manipulations on the current windspeed to calculate a reasonable gust increment, which should work out at a random value somewhere between 5 knots and 5 knots more than 120% of the wind speed.

This served well in comparison with what FS98 used to do with the "on/off" option then available.

This means that to get as high as your 99 knots the base wind speed must have been of the order of 40 odd knots.

Are you writing the speed first? If not the gust value may be calculate based on something else. Also, I hope you are not doing a Process call for every individual read/write. You should accumulate them all for one cycel and send one Process.

If you cannot figure it out, enable the Weather and IPC Write logging and show me the Log.

Regards,

Pete

uuuhh FS98 ??,I took the offset from the FSUIPC for programmers document,it says "0F78 | 2 |Surface wind gusts, enabled if True.

I have a button configured to send direction and speed,i write direction first (It's that wrong?) :shock:

And I have another button to add gust

I really don't figure out , I will save a log

Link to comment
Share on other sites

I was trying in an alone computer (without wideserver) and works fine

The log is very big

This line is without gust

437532 >Change: preset surface wind: to alt=3998ft AMSL, dir=85T, vel=10.0, gust=0.0, turb=0, shear=3, var=0.0

This line is with gust

489579 Results: preset surface wind: to alt=3998ft AMSL, dir=85T, vel=10.0, gust=23.1, turb=0, shear=3, var=0.0

And I notice in this line that it says FS98 wind , why ?

437532 >Change: FS98 Wind0: ground (49ft) to 1998ft AGL, dir 90M, vel 10, gust 0, turb 0

Link to comment
Share on other sites

And I notice in this line that it says FS98 wind , why ?

Because it was set by something writing to the FS98 weather interface -- please review my earlier reply.

Regards,

Pete

I did Pete,but i don't realize,maybe that means that inside FS2002 are an FS98 weather interface :?:

So how can I write in the FS2002 weather interface ?

Link to comment
Share on other sites

I did Pete,but i don't realize,maybe that means that inside FS2002 are an FS98 weather interface :?:

No. As I said in my first reply, FSUIPC interfaces the old FS98 interface to FS2000, FS2002, and FS2004. You must have missed a paragraph?

The whole point of FSUIPC, when it was first released for FS2000, was to allow all the nice FS98 programs to be used with FS2000. Similarly FS98 and FS2000 on FS2002, then FS98, FS2000 and FS2002 programs on FS2004. So FSUIPC still supports all the FS98 interface as well as the FS2000, FS2002 and FS2004 ones. It does the data matching internally. It is all smoke and mirrors and you don't need to worry about it.

The weather was markedly improved with FS2000, but roughly the same in FS2002, so the "Advanced Weather Interface", developed in FSUIPC for FS2000, applies to both of those.

Both of those old interfaces only dealt with Global weather setting. In FS2004 this proved to be insufficient, as weather is localised with time. So in FS2004 only the "New Weather Interface" is provided. That is actually rather more transparent, a sort of Window into FS's WEATHER.DLL, only made in a format suiting the FSUIPC interface design.

There are two weather programs provided in the FSUIPC.ZIP package -- WeatherSet which uses the AWI and WeatherSet2 (for FS2004 only) which uses the NWI.

So how can I write in the FS2002 weather interface ?

Check the details provided in the SDK.

Regards,

Pete

Link to comment
Share on other sites

Just to add something Pete,when the sim become uncontrollable y open the menu and watching the advanced weather section I saw for a surface wind from 90 degrees 10 knots the gusting was 62465 knots !! :shock:

I go to read more,tks :D

Link to comment
Share on other sites

when the sim become uncontrollable y open the menu and watching the advanced weather section I saw for a surface wind from 90 degrees 10 knots the gusting was 62465 knots !! :shock:

I really would need to see the Logging to understand what is happening. It really does sound like you are writing something wrong somewhere, because the FS98 interface still works okay. I mentioned in an earlier message the need for logs and told you which options to select. You can ZIP the logs and send them to me at petedowson@btconnect.com.

Please don't report any more of these without also supplying the needed information, as it merely wastes both our time.

Thanks,

Pete

Link to comment
Share on other sites

Whilst I was re-checking the FS98 gust setting facilities (the offset 0F78 you are/were using), I re-discovered an old improvement I made back in FS2000 days, documented in the FSUIPC Programmer's document thus:

WIND GUST control in FS2000: Weather control programs designed only for FS98 provided only gust (1) or no gust (0) information. For these, FSUIPC generates a random gust speed. However, if the program supplies a value greater than 1, this is treated as a required gust speed in knots. If the value is greater than the base wind speed then it is used as the upper wind speed, otherwise it is treated as the required difference.

Whilst it does say "FS2000" this actually, for onward compatibility, applies to FS2002 and FS2004 as well. So, in addition to merely setting gusts on or off (1 or 0) you can easily actually set the gust limit value rather than leave FSUIPC to compute a random one for you.

In checking this mechanism, by the way, I could not make it produce any odd or extreme amounts such as those you mentioned, so I am still dependent upon logs from you to tell you what was going on.

Regards,

Pete

Link to comment
Share on other sites

Pete,i dim the variable for gust as long instead as byte and it's work now.

It's 16 bit of course (2 bytes), a "short" in C/C++ terms. If you only allowed one byte for it in your program, then your weird values would certainly arise from any non-zero rubbish it picked up from the upper, undeclared, byte.

That should have been obvious from one of the weird values you quoted -- 62465, which in hexadecimal is F401. i.e. 1 in the first byte and F4 (244) in the second. Logging in FSUIPC would have picked this error up straight away.

Regards,

Pete

Link to comment
Share on other sites

So,if i write a value greater than 1 for the gust var ,for example 15 what will be the result in the sim,15 knots ?

If you write a value less than the wind speed it is taken to be the gust difference, i.e wind varying by 15 knots (up to 40, say, if the wind is 25).

If the value is greater than the wind speed it is taken to be the upper limit -- so if you set 15 with a wind speed of 5 you'd get 5-15.

I think that's written up okay in the paragraph I quoted in this thread earlier. Did you miss it?

Pete

Link to comment
Share on other sites

So,if i write a value greater than 1 for the gust var ,for example 15 what will be the result in the sim,15 knots ?

If you write a value less than the wind speed it is taken to be the gust difference, i.e wind varying by 15 knots (up to 40, say, if the wind is 25).

If the value is greater than the wind speed it is taken to be the upper limit -- so if you set 15 with a wind speed of 5 you'd get 5-15.

That's songs great for me ,thanks so much

I think that's written up okay in the paragraph I quoted in this thread earlier. Did you miss it?

Pete

Sorry Pete :oops: ,be patient i am not a guru programmer and there are more , english is not my native language :?

Believe me i am doing my best effort to understand , thanks God you exist !

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.