mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Weather - More natural temperature and humidity randomization (#5754)
This commit is contained in:
parent
64c9c7d522
commit
9b6f1879f6
@ -111,6 +111,8 @@
|
||||
|
||||
#define GRAVITY 9.8066
|
||||
|
||||
#define SD_TO_MIN_MAX(d) ((d) * 3.371) // Standard deviation -> min / max of random [min, mid, max]
|
||||
|
||||
// Angular unit conversion
|
||||
#define MRAD_TO_MOA(d) ((d) * 3.43774677) // Conversion factor: 54 / (5 * PI)
|
||||
#define MOA_TO_MRAD(d) ((d) * 0.29088821) // Conversion factor: (5 * PI) / 54
|
||||
|
@ -3,9 +3,9 @@
|
||||
["ace_settingsInitialized", {
|
||||
if (!GVAR(enabled)) exitWith {};
|
||||
|
||||
GVAR(temperatureShift) = random [-5, 0, 5];
|
||||
GVAR(badWeatherShift) = random [10, 0, 10];
|
||||
GVAR(humidityShift) = random [-0.1, 0, 0.1];
|
||||
GVAR(temperatureShift) = random [-SD_TO_MIN_MAX(4), 0, SD_TO_MIN_MAX(4)]; // Gauss(0, 4)
|
||||
GVAR(badWeatherShift) = random [-SD_TO_MIN_MAX(2) + 4, 4, 4 + SD_TO_MIN_MAX(2)]; // Gauss(4, 2)
|
||||
GVAR(humidityShift) = random [-SD_TO_MIN_MAX(0.065), 0, SD_TO_MIN_MAX(0.065)]; // Gauss(0, 0.065)
|
||||
|
||||
if (GVAR(windSimulation)) then {
|
||||
call FUNC(initWind);
|
||||
|
Loading…
Reference in New Issue
Block a user