2015-04-17 22:11:53 +00:00
|
|
|
/*
|
|
|
|
* Author: Ruthberg
|
|
|
|
* Updates the atmospheric data fields
|
|
|
|
*
|
|
|
|
* Arguments:
|
2017-06-08 13:31:51 +00:00
|
|
|
* None
|
2015-04-17 22:11:53 +00:00
|
|
|
*
|
|
|
|
* Return Value:
|
2017-06-08 13:31:51 +00:00
|
|
|
* None
|
2015-04-17 22:11:53 +00:00
|
|
|
*
|
|
|
|
* Example:
|
|
|
|
* call ace_atragmx_fnc_update_atmo_env_data
|
|
|
|
*
|
|
|
|
* Public: No
|
|
|
|
*/
|
|
|
|
#include "script_component.hpp"
|
|
|
|
|
|
|
|
ctrlSetFocus ((uiNamespace getVariable "ATragMX_Display") displayCtrl 13007);
|
|
|
|
|
2015-04-19 09:02:06 +00:00
|
|
|
if (GVAR(currentUnit) == 2) then {
|
2015-04-17 22:11:53 +00:00
|
|
|
ctrlSetText [130040, Str(Round(GVAR(temperature) * 10) / 10)];
|
|
|
|
} else {
|
|
|
|
ctrlSetText [130040, Str(Round((GVAR(temperature) * 1.8 + 32) * 10) / 10)];
|
|
|
|
};
|
2015-04-19 09:02:06 +00:00
|
|
|
if (GVAR(currentUnit) == 2) then {
|
2015-04-17 22:11:53 +00:00
|
|
|
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)];
|
2015-04-19 09:02:06 +00:00
|
|
|
if (GVAR(currentUnit) == 2) then {
|
2015-04-17 22:11:53 +00:00
|
|
|
ctrlSetText [130030, Str(Round(GVAR(altitude)))];
|
|
|
|
} else {
|
|
|
|
ctrlSetText [130030, Str(Round(GVAR(altitude) * 3.2808399))];
|
|
|
|
};
|
|
|
|
|
|
|
|
if (GVAR(currentUnit) == 2) then {
|
|
|
|
ctrlSetText [13003, "Altitude (m)"];
|
|
|
|
ctrlSetText [13004, "temperature (C)"];
|
|
|
|
ctrlSetText [13005, "Barom Pres (milibars)"];
|
|
|
|
} else {
|
|
|
|
ctrlSetText [13003, "Altitude (ft)"];
|
|
|
|
ctrlSetText [13004, "temperature (F)"];
|
|
|
|
ctrlSetText [13005, "Barom Pres (in.merc.)"];
|
|
|
|
};
|