From 7b2d736ba35fb2c6808311ba61065076da4c9401 Mon Sep 17 00:00:00 2001 From: ulteq Date: Fri, 28 Oct 2016 22:25:47 +0200 Subject: [PATCH] Fix Kestrel4500 wind speed calculation * Cosine was applied twice (on some screens) --- addons/kestrel4500/functions/fnc_generateOutputData.sqf | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/addons/kestrel4500/functions/fnc_generateOutputData.sqf b/addons/kestrel4500/functions/fnc_generateOutputData.sqf index c3bce5efa2..ccc2ab57e3 100644 --- a/addons/kestrel4500/functions/fnc_generateOutputData.sqf +++ b/addons/kestrel4500/functions/fnc_generateOutputData.sqf @@ -107,7 +107,7 @@ if (GVAR(referenceHeadingMenu) == 0) then { }; case 2: { // Wind SPD if (!GVAR(MinAvgMax)) then { - _textCenterBig = Str(round(abs(_windSpeed) * 10) / 10); + _textCenterBig = Str(round(_windSpeed * 10) / 10); } else { _textCenterLine1Left = "Max"; _textCenterLine2Left = "Avg"; @@ -134,7 +134,7 @@ if (GVAR(referenceHeadingMenu) == 0) then { if (!GVAR(MinAvgMax)) then { if (missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false]) then { _textCenterBig = Str(round(abs(sin(GVAR(RefHeading) - _playerDir) * _windSpeed) * 10) / 10); - _textInfoLine1 = format["%1 m/s @ %2", round((abs(cos(_playerDir - _windDir)) * _windSpeed) * 10) / 10, round(_playerDir)]; + _textInfoLine1 = format["%1 m/s @ %2", round(_windSpeed * 10) / 10, round(_playerDir)]; } else { _textCenterBig = Str(round(abs(sin(GVAR(RefHeading)) * _windSpeed) * 10) / 10); _textInfoLine1 = format["%1 m/s @ %2", round(_windSpeed * 10) / 10, round(_windDir)]; @@ -166,7 +166,7 @@ if (GVAR(referenceHeadingMenu) == 0) then { if (!GVAR(MinAvgMax)) then { if (missionNamespace getVariable [QEGVAR(advanced_ballistics,enabled), false]) then { _textCenterBig = Str(round(cos(GVAR(RefHeading) - _playerDir) * _windSpeed * 10) / 10); - _textInfoLine1 = format["%1 m/s @ %2", round((abs(cos(_playerDir - _windDir)) * _windSpeed) * 10) / 10, round(_playerDir)]; + _textInfoLine1 = format["%1 m/s @ %2", round(_windSpeed * 10) / 10, round(_playerDir)]; } else { _textCenterBig = Str(round(cos(GVAR(RefHeading)) * _windSpeed * 10) / 10); _textInfoLine1 = format["%1 m/s @ %2", round(_windSpeed * 10) / 10, round(_windDir)];