mirror of
https://github.com/acemod/ACE3.git
synced 2024-08-30 18:23:18 +00:00
Fixed a bug in the atmosphere unit conversion
This commit is contained in:
parent
336a192302
commit
8f20303a08
@ -19,7 +19,7 @@ GVAR(altitude) = -1000 max parseNumber(ctrlText 130030) min 20000;
|
||||
GVAR(temperature) = -50 max parseNumber(ctrlText 130040) min 160;
|
||||
GVAR(barometricPressure) = 0 max parseNumber(ctrlText 130050) min 1350;
|
||||
GVAR(relativeHumidity) = (0 max parseNumber(ctrlText 130060) min 100) / 100;
|
||||
if (GVAR(currentUnit) == 1) then {
|
||||
if (GVAR(currentUnit) != 2) then {
|
||||
GVAR(altitude) = GVAR(altitude) * 0.3048;
|
||||
GVAR(temperature) = (GVAR(temperature) - 32) / 1.8;
|
||||
GVAR(barometricPressure) = GVAR(barometricPressure) * 33.86389;
|
||||
|
@ -17,18 +17,18 @@
|
||||
|
||||
ctrlSetFocus ((uiNamespace getVariable "ATragMX_Display") displayCtrl 13007);
|
||||
|
||||
if (GVAR(currentUnit) != 1) then {
|
||||
if (GVAR(currentUnit) == 2) then {
|
||||
ctrlSetText [130040, Str(Round(GVAR(temperature) * 10) / 10)];
|
||||
} else {
|
||||
ctrlSetText [130040, Str(Round((GVAR(temperature) * 1.8 + 32) * 10) / 10)];
|
||||
};
|
||||
if (GVAR(currentUnit) != 1) then {
|
||||
if (GVAR(currentUnit) == 2) then {
|
||||
ctrlSetText [130050, Str(Round(GVAR(barometricPressure)))];
|
||||
} else {
|
||||
ctrlSetText [130050, Str(Round(GVAR(barometricPressure) / 33.8638866667 * 100) / 100)];
|
||||
};
|
||||
ctrlSetText [130060, Str(Round(GVAR(relativeHumidity) * 100 * 10) / 10)];
|
||||
if (GVAR(currentUnit) != 1) then {
|
||||
if (GVAR(currentUnit) == 2) then {
|
||||
ctrlSetText [130030, Str(Round(GVAR(altitude)))];
|
||||
} else {
|
||||
ctrlSetText [130030, Str(Round(GVAR(altitude) * 3.2808399))];
|
||||
|
@ -15,18 +15,18 @@
|
||||
*/
|
||||
#include "script_component.hpp"
|
||||
|
||||
if (GVAR(currentUnit) != 1) then {
|
||||
if (GVAR(currentUnit) == 2) then {
|
||||
ctrlSetText [200, Str(Round(GVAR(temperature) * 10) / 10)];
|
||||
} else {
|
||||
ctrlSetText [200, Str(Round((GVAR(temperature) * 1.8 + 32) * 10) / 10)];
|
||||
};
|
||||
if (GVAR(currentUnit) != 1) then {
|
||||
if (GVAR(currentUnit) == 2) then {
|
||||
ctrlSetText [210, Str(Round(GVAR(barometricPressure)))];
|
||||
} else {
|
||||
ctrlSetText [210, Str(Round(GVAR(barometricPressure) / 33.8638866667 * 100) / 100)];
|
||||
};
|
||||
ctrlSetText [220, Str(Round(GVAR(relativeHumidity) * 100 * 10) / 10)];
|
||||
if (GVAR(currentUnit) != 1) then {
|
||||
if (GVAR(currentUnit) == 2) then {
|
||||
ctrlSetText [230, Str(Round(GVAR(altitude)))];
|
||||
} else {
|
||||
ctrlSetText [230, Str(Round(GVAR(altitude) * 3.2808399))];
|
||||
|
Loading…
x
Reference in New Issue
Block a user