Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@Drofseh
Copy link
Contributor

@Drofseh Drofseh commented Apr 21, 2025

When merged this pull request will:

  • Check if description.ext contains a CfgWorlds entry with ACE Weather data, if so use it.

documention to be done in another PR
ACE_TempDay, ACE_TempNight, ACE_Humidity, ACE_WindSpeedMax, ACE_WindSpeedMean, ACE_WindSpeedMin, ACE_WindDirectionProbabilities

@Drofseh
Copy link
Contributor Author

Drofseh commented Apr 22, 2025

@ulteq it looks like you added the current format for weather data in af4fdda

Do you recall what each array represents?
What units (degrees, m/s kph) they use, why ACE_WindSpeedMax and ACE_WindSpeedMin use doubles, etc?

@johnb432
Copy link
Contributor

johnb432 commented May 3, 2025

From what I can decipher from the functions:
ACE_WindSpeedMin use pairs of doubles to describe the average minimum (1st element), with the 2nd element being the maximum deviation from the average.

if (isArray (_cfgPath >> "ACE_WindSpeedMin")) then {
GVAR(WindSpeedMin) = getArray (_cfgPath >> "ACE_WindSpeedMin");
};

GVAR(min_wind_speed) = GVAR(WindSpeedMin) select (_month - 1);
GVAR(min_wind_speed) = (GVAR(min_wind_speed) select 0) + (random (GVAR(min_wind_speed) select 1)) - (random (GVAR(min_wind_speed) select 1));
GVAR(min_wind_speed) = 0 max GVAR(min_wind_speed);

Given all calculations for wind are done without any type of conversions, I'm assuming that those numbers are in m/s, as setWind takes m/s (GVAR(current_wind_speed) is determined by the min and max wind speed in FUNC(initWind)):

private _speed = linearConversion [GVAR(last_wind_update), GVAR(next_wind_udpate), CBA_missionTime, GVAR(current_wind_speed), GVAR(next_wind_speed), true];
private _direction = linearConversion [GVAR(last_wind_update), GVAR(next_wind_udpate), CBA_missionTime, GVAR(current_wind_direction), GVAR(next_wind_direction), true];
setWind [-_speed * sin(_direction), -_speed * cos(_direction), true];

Same applies for ACE_WindSpeedMax.


ACE_WindDirectionProbabilities is an array of arrays, each sub-array corresponding to a month. The sub-arrays contain wind direction probabilities, the first element being north, then north-east etc (I think the comments are fairly clear on this part).
The probabilities don't sum up to be 1; I assume that's because there's missing data.


I can make a PR for the missing wiki entries if you want me to, just let me know.

@Drofseh
Copy link
Contributor Author

Drofseh commented May 3, 2025

I can make a PR for the missing wiki entries if you want me to, just let me know.

That'd be great, thanks!

@Drofseh Drofseh marked this pull request as ready for review May 3, 2025 15:25
@Drofseh Drofseh requested review from bux and johnb432 May 3, 2025 15:25
@PabstMirror PabstMirror added this to the 3.20.0 milestone May 4, 2025
@PabstMirror PabstMirror added the kind/enhancement Release Notes: **IMPROVED:** label May 4, 2025
@Drofseh Drofseh requested a review from johnb432 May 5, 2025 05:00
@Drofseh Drofseh merged commit fae2587 into acemod:master May 5, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

kind/enhancement Release Notes: **IMPROVED:**

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants