Weather - More natural temperature and humidity randomization (#5754)

This commit is contained in:
ulteq 2017-11-14 14:43:29 +01:00 committed by jonpas
parent 64c9c7d522
commit 9b6f1879f6
2 changed files with 5 additions and 3 deletions

View File

@ -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

View File

@ -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);