mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Advanced Ballistics - Fixed faulty wind attenuation (#5869)
* Advanced Ballistics - Fixed faulty wind attenuation * Only relevant at very low altitudes above ground (below 1.6 m) * Also fixes the Kestrel 4500 readout * Kestrel 4500 - Minor optimization / fix * Avoids possible math error 'ln(0)' * Rebuild Dills
This commit is contained in:
parent
534898a680
commit
77fd2007ea
Binary file not shown.
Binary file not shown.
@ -34,10 +34,9 @@ private _windDirAdjusted = _windDir + 180;
|
|||||||
if (_windGradientEnabled) then {
|
if (_windGradientEnabled) then {
|
||||||
if (_windSpeed > 0.05) then {
|
if (_windSpeed > 0.05) then {
|
||||||
private _height = (ASLToATL _position) select 2;
|
private _height = (ASLToATL _position) select 2;
|
||||||
_height = 0 max _height min 20;
|
if (_height > 0 && _height < 20) then {
|
||||||
if (_height < 20) then {
|
|
||||||
private _roughnessLength = _position call FUNC(calculateRoughnessLength);
|
private _roughnessLength = _position call FUNC(calculateRoughnessLength);
|
||||||
_windSpeed = _windSpeed * abs(ln(_height / _roughnessLength) / ln(20 / _roughnessLength));
|
_windSpeed = _windSpeed * (0 max (ln(_height / _roughnessLength) / ln(20 / _roughnessLength)));
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
@ -89,7 +89,7 @@ endif()
|
|||||||
|
|
||||||
string(TIMESTAMP ACE_BUILDSTAMP "%Y-%m-%dT%H:%M:%SZ")
|
string(TIMESTAMP ACE_BUILDSTAMP "%Y-%m-%dT%H:%M:%SZ")
|
||||||
set(ACE_VERSION_MAJOR 3)
|
set(ACE_VERSION_MAJOR 3)
|
||||||
set(ACE_VERSION_MINOR 11)
|
set(ACE_VERSION_MINOR 12)
|
||||||
set(ACE_VERSION_REVISION 0)
|
set(ACE_VERSION_REVISION 0)
|
||||||
EXECUTE_PROCESS(COMMAND git rev-parse --verify HEAD
|
EXECUTE_PROCESS(COMMAND git rev-parse --verify HEAD
|
||||||
OUTPUT_VARIABLE T_ACE_VERSION_BUILD
|
OUTPUT_VARIABLE T_ACE_VERSION_BUILD
|
||||||
|
@ -530,7 +530,7 @@ void __stdcall RVExtension(char *output, int outputSize, const char *function)
|
|||||||
windSourceObstacles = bulletPosition - windVelocity.normalize() * 25;
|
windSourceObstacles = bulletPosition - windVelocity.normalize() * 25;
|
||||||
|
|
||||||
double roughnessLength = calculateRoughnessLength(windSourceObstacles.x(), windSourceObstacles.y());
|
double roughnessLength = calculateRoughnessLength(windSourceObstacles.x(), windSourceObstacles.y());
|
||||||
windAttenuation *= abs(log(heightAGL / roughnessLength) / log(20 / roughnessLength));
|
windAttenuation *= std::max(0.0, log(heightAGL / roughnessLength) / log(20 / roughnessLength));
|
||||||
}
|
}
|
||||||
|
|
||||||
windVelocity = windVelocity * windAttenuation;
|
windVelocity = windVelocity * windAttenuation;
|
||||||
|
Loading…
Reference in New Issue
Block a user