Jump to content
Sign in to follow this  
raptor 6 actual

Wind Parameters help needed

Recommended Posts

I'm trying to see if anyone has detailed information pertaining to what scale the wind is based upon. Thus far, I'm using a small script to return the wind to me in a hint. It's working fine, using this line of code:

_windSpeed = windStr;

In the in-game weather/date dialog in the editor, I changed Wind from "AUTO" to "Manual" and started playing around with the range from 1 to 100. Obviously, no wind == 0.0, and 100 on the wind scale slider == 1. Therefore, if 1 is set on the slider, the windStr == 0.01, set it to 12 and windStr == 0.12, so on and so forth. But the main question is, what speed in KPH or MPH does this all equate to? I've looked at other peoples' threads and to no avail. Even the BIS wiki doesn't really help in these matters. If the slider is set to 100 and the windStr == 1, it doesn't feel like 100mph in-game. You basically just stand there and you MIGHT hear the wind blowing by louder, but that's it.

Any thoughts or extra info on this so we can expand the wiki and my personal knowledge bank?

Thanks

Share this post


Link to post
Share on other sites

That's what I want to know!

I asked this myself months ago. Thread here & some here.

Had to put a project on hold. If you find anything, PM me. :thumb:

Share this post


Link to post
Share on other sites

From a quick test, it looks like it is the general value of the wind strength, on the scale 0-1 (as with overcast, rain, fog etc). It has no units.

If not set manually in the editor, auto inherits the current overcast value. If set manually, it works in the same way the overcast sliders affect the overcast value (linear transition from Start to Forecasted over about 30-45 mins)

While the returned wind array varies erratically moment to moment, think of windStr is the general wind strength. I can't really see any a direct use for it in the game, other than making a custom wind script.

Edited by ceeeb

Share this post


Link to post
Share on other sites
From a quick test, it looks like it is the general value of the wind strength, on the scale 0-1 (as with overcast, rain, fog etc). It has no units.

If not set manually in the editor, auto inherits the current overcast value. If set manually, it works in the same way the overcast sliders affect the overcast value (linear transition from Start to Forecasted over about 30-45 mins)

While the returned wind array varies erratically moment to moment, think of windStr is the general wind strength. I can't really see any a direct use for it in the game, other than making a custom wind script.

@Goblin- will PM you when I get more info

@ceeeb- I understand the values being from 0-1. But, I was curious as to how fast 0.01 is in relation to real life. When I first started running the script, I was thinking it was saying 0.01 mph, but then realized when I set the slider to 100, it returned a speed of 1, and that's when I realized I needed a reference to match those values to real world speeds.

Share this post


Link to post
Share on other sites

May help: I had problems with setWindDir and setWindStr - If wind is set manually in the editor it overides setWindDir and the command doesn't work. If wind is set to auto then it overides setWindStr - so you can't use both commands at the same time.

eg I would have liked the wind to be stronger in this:

http://forums.bistudio.com/showthread.php?168405-Helis-land-on-rooftops-(Missing-Mando-Heliroute)&p=2556760&viewfull=1#post2556760

Share this post


Link to post
Share on other sites
@Goblin- will PM you when I get more info

@ceeeb- I understand the values being from 0-1. But, I was curious as to how fast 0.01 is in relation to real life. When I first started running the script, I was thinking it was saying 0.01 mph, but then realized when I set the slider to 100, it returned a speed of 1, and that's when I realized I needed a reference to match those values to real world speeds.

It changes every few seconds, and varies quite a lot, depending on gusts. For example windStr = 1 results in wind speeds in the range of 17-33 km/h. That's really only a light wind by real world standards.

Heres a quick script to monitor the current windStr and speed:

onEachFrame
{
CEEB_windKMPH = 3.6 * sqrt ((wind select 0)*(wind select 0) + (wind select 1)*(wind select 1));
hintSilent format
[
	"
		windStr = %1\n
		gusts = %2\n
		wind = %3\n
		wind direction = %4\n
		wind speed = %5 km/h\n
		wind speed = %6 miles/h\n
		wind speed = %7 knots	
	",
	windStr,
	gusts,
	wind,
	windDir,
	CEEB_windKMPH, //kilometres per hour
	CEEB_windKMPH / 1.609344, //miles per hour
	CEEB_windKMPH / 1.85200 //knots	
];
};

Edited by ceeeb

Share this post


Link to post
Share on other sites

Thank you ceeeb for that. I am new to scripting, can I ask you to break this down in a "retard" mode for myself? For instance, when looking at the BIS wiki windStr states this:

Description

Description:Returns the current wind strength.

Syntax

Syntax: windStr Return Value: Number

Where did you find out that you could use "wind select 0" and "wind select 1?"

Seeing as how there was no example given on the wiki, I never new that windStr returned two arguments back to it's array. Another question, is why multiply wind select 0 by wind select 0, so on and so forth?

I apologize in advance, but the sooner I start understanding this, I'll be able to return my findings in other areas of the weather system variables. Thanks so much.

-------Edit Post-----------------------------------------------------------------------------------------------------------------------------------------

Again, thanks for the script, it works perfectly ingame. Will await a response pertaining to where you came up with the calculation. I've even gone as far as looking on Wikipedia, but maybe I overlooked that particular formula if it's on there. I'm currently working on using the windStr to factor it into things such as crosswind component, head/tail wind, etc. I will keep everyone informed as I get results back.

Edited by Raptor 6 Actual

Share this post


Link to post
Share on other sites

Where did you find out that you could use "wind select 0" and "wind select 1?"

It's on the wiki page: wind

Note the return value is an array. Select is used to retrieve values within an array.

Specifically, I know that the wind is a 3D vector, which is just a specific type of array - 3 numbers, with each defining the speed in the x,y,z axis (in meters/second).

Seeing as how there was no example given on the wiki, I never new that windStr returned two arguments back to it's array.

windStr does not return an array (two anythings must be passed in an array). It only returns a number. Wind is the command that returns an array.

Another question, is why multiply wind select 0 by wind select 0, so on and so forth?

I'm using the pythagorean theorem to determine the magnitude of the wind vector. I can skip the z value, as it is always 0 (so technically wind is a 2D vector). This is multiplied by 3.6 to convert m/s into km/h (60*60/1000)

If you want to make the wind affect bullets, vehicles etc, the wind command is what you need.

Edited by ceeeb

Share this post


Link to post
Share on other sites

Thanks for the breakdown there. Sorry I missed the part about you selecting parts of the array from wind, and not windStr. If I had looked closer, I would've seen that.

Share this post


Link to post
Share on other sites

@ceeeb

Sweet baby! Thank You! Thank You! Thank You!

Been waiting months to confirm this. I guessed about 20mph when at Max Wind.

Was damn close with Gusts factored in.

You know how to limit the readout to only 1 decimal or so?

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×