Kestrel4500 - Fixed head- and crosswind calculation (#5489)

* Kestrel4500 - Fixes head- and crosswind calculation
- The wind direction was not taken into account when calculating head- and crosswinds
- This does not affect how the Kestrel4500 behaves with AdvancedBallistics enabled
- Fixes #5181

* Kestrel4500 - Fixes wind direction formatting issue
- This does not affect how the Kestrel4500 behaves with AdvancedBallistics enabled
This commit is contained in:
ulteq 2017-09-10 15:16:17 +02:00 committed by GitHub
parent e0f3b393d7
commit c402a2028f

View File

@ -136,8 +136,8 @@ if (GVAR(referenceHeadingMenu) == 0) then {
_textCenterBig = Str(round(abs(sin(GVAR(RefHeading) - _playerDir) * _windSpeed) * 10) / 10);
_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)];
_textCenterBig = Str(round(abs(sin(GVAR(RefHeading) - _windDir) * _windSpeed) * 10) / 10);
_textInfoLine1 = format["%1 m/s @ %2", round(_windSpeed * 10) / 10, round(180 + _windDir)];
};
_textInfoLine2 = "- set heading";
} else {
@ -168,8 +168,8 @@ if (GVAR(referenceHeadingMenu) == 0) then {
_textCenterBig = Str(round(cos(GVAR(RefHeading) - _playerDir) * _windSpeed * 10) / 10);
_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)];
_textCenterBig = Str(round(-cos(GVAR(RefHeading) - _windDir) * _windSpeed * 10) / 10);
_textInfoLine1 = format["%1 m/s @ %2", round(_windSpeed * 10) / 10, round(180 + _windDir)];
};
_textInfoLine2 = "- set heading";
} else {