mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Simplified the wind direction change calculation
This commit is contained in:
parent
caf2f12eb9
commit
a9726d2b60
@ -28,4 +28,6 @@ TRACE_2("Dir: Current/Change",Round(_dir),Round(_dirChange));
|
||||
TRACE_2("Spd: Current/Change",Round(_spd * 10) / 10,Round(_spdChange * 10) / 10);
|
||||
TRACE_3("Period/Position/Percent",Round(_period),Round(_periodPosition),Round(_periodPercent * 100) / 100);
|
||||
|
||||
// TODO: Add some deterministic noise
|
||||
|
||||
[-_spd * sin(_dir), -_spd * cos(_dir), 0]
|
||||
|
@ -53,10 +53,10 @@ if(GVAR(wind_period_count) > GVAR(wind_next_period)) then {
|
||||
_windDirection = (360 + GVAR(wind_direction_reference) + _windDirectionVariance) % 360;
|
||||
_windDirectionChange = _windDirection - GVAR(current_wind_direction);
|
||||
if (_windDirectionChange > 180) then {
|
||||
_windDirectionChange = 360 - _windDirectionChange;
|
||||
_windDirectionChange = _windDirectionChange - 360;
|
||||
};
|
||||
if (_windDirectionChange < -180) then {
|
||||
_windDirectionChange = -360 - _windDirectionChange;
|
||||
_windDirectionChange = 360 + _windDirectionChange;
|
||||
};
|
||||
|
||||
_windMaxDiff = GVAR(mean_wind_speed) - GVAR(max_wind_speed);
|
||||
|
Loading…
Reference in New Issue
Block a user