From ac86a519e76f81f5a0ec4d3b85ef1fae3225930a Mon Sep 17 00:00:00 2001 From: Arantes83 Date: Tue, 23 Jun 2026 22:13:07 -0300 Subject: [PATCH] feat(optics): add standalone air flir addon --- .../StarSaphire/braf_StarSaphire_m.p3d | 3 + .../StarSaphire/braf_StarSaphire_n.p3d | 3 + .../StarSaphire/braf_StarSaphire_w.p3d | 3 + .../data/BRAF_StarSaphire_m_white_ca.paa | 3 + .../data/BRAF_StarSaphire_n_white_ca.paa | 3 + .../data/BRAF_StarSaphire_w_white_ca.paa | 3 + .../StarSaphire/data/braf_arrow_hor_ca.paa | 3 + .../StarSaphire/data/braf_arrow_north_ca.paa | 3 + .../StarSaphire/data/braf_arrow_vert_ca.paa | 3 + braf_optics_air/StarSaphire/model.cfg | 57 +++ braf_optics_air/braf_fnc/fn_flirControls.sqf | 217 +++++++++ braf_optics_air/braf_fnc/fn_initRSC.sqf | 38 ++ braf_optics_air/braf_fnc/fn_shutdownRSC.sqf | 16 + braf_optics_air/config.cpp | 427 ++++++++++++++++++ 14 files changed, 782 insertions(+) create mode 100644 braf_optics_air/StarSaphire/braf_StarSaphire_m.p3d create mode 100644 braf_optics_air/StarSaphire/braf_StarSaphire_n.p3d create mode 100644 braf_optics_air/StarSaphire/braf_StarSaphire_w.p3d create mode 100644 braf_optics_air/StarSaphire/data/BRAF_StarSaphire_m_white_ca.paa create mode 100644 braf_optics_air/StarSaphire/data/BRAF_StarSaphire_n_white_ca.paa create mode 100644 braf_optics_air/StarSaphire/data/BRAF_StarSaphire_w_white_ca.paa create mode 100644 braf_optics_air/StarSaphire/data/braf_arrow_hor_ca.paa create mode 100644 braf_optics_air/StarSaphire/data/braf_arrow_north_ca.paa create mode 100644 braf_optics_air/StarSaphire/data/braf_arrow_vert_ca.paa create mode 100644 braf_optics_air/StarSaphire/model.cfg create mode 100644 braf_optics_air/braf_fnc/fn_flirControls.sqf create mode 100644 braf_optics_air/braf_fnc/fn_initRSC.sqf create mode 100644 braf_optics_air/braf_fnc/fn_shutdownRSC.sqf create mode 100644 braf_optics_air/config.cpp diff --git a/braf_optics_air/StarSaphire/braf_StarSaphire_m.p3d b/braf_optics_air/StarSaphire/braf_StarSaphire_m.p3d new file mode 100644 index 0000000..40982dd --- /dev/null +++ b/braf_optics_air/StarSaphire/braf_StarSaphire_m.p3d @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:c169b708b9a3f22fe194d92152026efcbf179cacdd8650d0e404e6762249c3af +size 2871 diff --git a/braf_optics_air/StarSaphire/braf_StarSaphire_n.p3d b/braf_optics_air/StarSaphire/braf_StarSaphire_n.p3d new file mode 100644 index 0000000..2f98622 --- /dev/null +++ b/braf_optics_air/StarSaphire/braf_StarSaphire_n.p3d @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:417cbfe456f96fbd61fbfc53e81e89c4c07cf375c96f597454da1a3eeac71302 +size 2871 diff --git a/braf_optics_air/StarSaphire/braf_StarSaphire_w.p3d b/braf_optics_air/StarSaphire/braf_StarSaphire_w.p3d new file mode 100644 index 0000000..4ae7893 --- /dev/null +++ b/braf_optics_air/StarSaphire/braf_StarSaphire_w.p3d @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:fd903f8416ae00c6c1b4145c0b854128deef938639284beef277c474f77454cc +size 2871 diff --git a/braf_optics_air/StarSaphire/data/BRAF_StarSaphire_m_white_ca.paa b/braf_optics_air/StarSaphire/data/BRAF_StarSaphire_m_white_ca.paa new file mode 100644 index 0000000..1dd40aa --- /dev/null +++ b/braf_optics_air/StarSaphire/data/BRAF_StarSaphire_m_white_ca.paa @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:12cf8777f266e4e08488d3a9b43a7c09f60b957ec681d7c63f1595976aad56a4 +size 40541 diff --git a/braf_optics_air/StarSaphire/data/BRAF_StarSaphire_n_white_ca.paa b/braf_optics_air/StarSaphire/data/BRAF_StarSaphire_n_white_ca.paa new file mode 100644 index 0000000..b2eebab --- /dev/null +++ b/braf_optics_air/StarSaphire/data/BRAF_StarSaphire_n_white_ca.paa @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:265bcb0566edf4fba248ae6e09670db617adfe5b2d1d62c2f4d51d619f6cd0ae +size 41337 diff --git a/braf_optics_air/StarSaphire/data/BRAF_StarSaphire_w_white_ca.paa b/braf_optics_air/StarSaphire/data/BRAF_StarSaphire_w_white_ca.paa new file mode 100644 index 0000000..a522395 --- /dev/null +++ b/braf_optics_air/StarSaphire/data/BRAF_StarSaphire_w_white_ca.paa @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:65f28f9fd8ffacbd67a6555bec414094cb38baeb5386160d8185b1854855ff3b +size 40001 diff --git a/braf_optics_air/StarSaphire/data/braf_arrow_hor_ca.paa b/braf_optics_air/StarSaphire/data/braf_arrow_hor_ca.paa new file mode 100644 index 0000000..376c3c4 --- /dev/null +++ b/braf_optics_air/StarSaphire/data/braf_arrow_hor_ca.paa @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:1e79b9d65ca3e8932669efcc2b75cdc2fdec22d47767d243194aee4f02ce10d7 +size 24979 diff --git a/braf_optics_air/StarSaphire/data/braf_arrow_north_ca.paa b/braf_optics_air/StarSaphire/data/braf_arrow_north_ca.paa new file mode 100644 index 0000000..981bd22 --- /dev/null +++ b/braf_optics_air/StarSaphire/data/braf_arrow_north_ca.paa @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:2f161192d030e93f0bab84ffa43cb9a74627315211695f1c48a4e26d7d514dd8 +size 31656 diff --git a/braf_optics_air/StarSaphire/data/braf_arrow_vert_ca.paa b/braf_optics_air/StarSaphire/data/braf_arrow_vert_ca.paa new file mode 100644 index 0000000..34d55b7 --- /dev/null +++ b/braf_optics_air/StarSaphire/data/braf_arrow_vert_ca.paa @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:60bd305866228b30c3d99af290028a7dc933a9800d1dec9b554cbe227842d13e +size 24934 diff --git a/braf_optics_air/StarSaphire/model.cfg b/braf_optics_air/StarSaphire/model.cfg new file mode 100644 index 0000000..d528b33 --- /dev/null +++ b/braf_optics_air/StarSaphire/model.cfg @@ -0,0 +1,57 @@ +class CfgSkeletons +{ + class braf_StarSaphire_Flir + { + isDiscrete=0; + skeletonInherit=""; + skeletonBones[]={}; + }; +}; +class CfgModels +{ + class braf_StarSaphire_n + { + htMin=0; + htMax=0; + afMax=0; + mfMax=0; + mFact=0; + tBody=0; + skeletonName="braf_StarSaphire_Flir"; + sectionsInherit=""; + sections[]={}; + class Animations + { + }; + }; + class braf_StarSaphire_m + { + htMin=0; + htMax=0; + afMax=0; + mfMax=0; + mFact=0; + tBody=0; + skeletonName="braf_StarSaphire_Flir"; + sectionsInherit=""; + sections[]={}; + class Animations + { + }; + }; + class braf_StarSaphire_w + { + htMin=0; + htMax=0; + afMax=0; + mfMax=0; + mFact=0; + tBody=0; + skeletonName="braf_StarSaphire_Flir"; + sectionsInherit=""; + sections[]={}; + class Animations + { + }; + }; +}; diff --git a/braf_optics_air/braf_fnc/fn_flirControls.sqf b/braf_optics_air/braf_fnc/fn_flirControls.sqf new file mode 100644 index 0000000..08cf1ac --- /dev/null +++ b/braf_optics_air/braf_fnc/fn_flirControls.sqf @@ -0,0 +1,217 @@ +/* + Author: Brazilian Armed Forces + File: fn_flirControls.sqf + + Purpose: + - Update azimuth and elevation indicators for the FLIR pod relative to the air vehicle body + - Update the true-north compass indicator relative to the camera center + - Update platform flight data shown in the optics overlay +*/ + +#define IGUI_GROUP 170 +#define BRAF_ELEV_ARROW 1901 +#define BRAF_ELEV_TXT 1902 +#define BRAF_AZ_ARROW 1903 +#define BRAF_AZ_TXT 1904 +#define BRAF_NORTH_ARROW 1905 + +#define BRAF_HDG_VALUE 1907 +#define BRAF_IAS_VALUE 1909 +#define BRAF_GS_VALUE 1911 +#define BRAF_RALT_VALUE 1913 +#define BRAF_BARO_VALUE 1915 +#define BRAF_ROLL_VALUE 1917 +#define BRAF_PTCH_VALUE 1919 + +#define BRAF_MIN_TURN -180 +#define BRAF_MAX_TURN 180 +#define BRAF_MIN_ELEV -120 +#define BRAF_MAX_ELEV 30 +#define BRAF_AZ_BEG (0.04 * safeZoneW) +#define BRAF_AZ_DIS (0.5375 * safeZoneW) +#define BRAF_AZ_NUM_OFFSET (0.5 * safeZoneW) +#define BRAF_AZ_TXT_Y_OFFSET (-1 * 0.025 * safeZoneH) +#define BRAF_EZ_BEG (0.215 * safeZoneH) +#define BRAF_EZ_DIS (0.52 * safeZoneH) +#define BRAF_EZ_NUM_OFFSET (0 * safeZoneH) + +disableSerialization; + +params ["_display"]; + +if (isNull _display) exitWith {}; +if (cameraView != "GUNNER") exitWith {}; + +private _veh = vehicle player; +if (isNull _veh) exitWith {}; + +if (isNull (_display displayCtrl BRAF_ELEV_ARROW)) exitWith { + systemChat "[BRAF FLIR] ERROR: Elevation arrow control (IDC 1901) not found."; +}; +if (isNull (_display displayCtrl BRAF_AZ_ARROW)) exitWith { + systemChat "[BRAF FLIR] ERROR: Azimuth arrow control (IDC 1903) not found."; +}; +if (isNull (_display displayCtrl BRAF_ELEV_TXT)) exitWith { + systemChat "[BRAF FLIR] ERROR: Elevation text control (IDC 1902) not found."; +}; +if (isNull (_display displayCtrl BRAF_AZ_TXT)) exitWith { + systemChat "[BRAF FLIR] ERROR: Azimuth text control (IDC 1904) not found."; +}; +if (isNull (_display displayCtrl BRAF_NORTH_ARROW)) exitWith { + systemChat "[BRAF FLIR] ERROR: North compass control (IDC 1905) not found."; +}; +if (isNull (_display displayCtrl BRAF_HDG_VALUE)) exitWith { + systemChat "[BRAF FLIR] ERROR: HDG control (IDC 1907) not found."; +}; +if (isNull (_display displayCtrl BRAF_IAS_VALUE)) exitWith { + systemChat "[BRAF FLIR] ERROR: IAS control (IDC 1909) not found."; +}; +if (isNull (_display displayCtrl BRAF_GS_VALUE)) exitWith { + systemChat "[BRAF FLIR] ERROR: GS control (IDC 1911) not found."; +}; +if (isNull (_display displayCtrl BRAF_RALT_VALUE)) exitWith { + systemChat "[BRAF FLIR] ERROR: RALT control (IDC 1913) not found."; +}; +if (isNull (_display displayCtrl BRAF_BARO_VALUE)) exitWith { + systemChat "[BRAF FLIR] ERROR: BARO control (IDC 1915) not found."; +}; +if (isNull (_display displayCtrl BRAF_ROLL_VALUE)) exitWith { + systemChat "[BRAF FLIR] ERROR: ROLL control (IDC 1917) not found."; +}; +if (isNull (_display displayCtrl BRAF_PTCH_VALUE)) exitWith { + systemChat "[BRAF FLIR] ERROR: PTCH control (IDC 1919) not found."; +}; + +private _p0 = positionCameraToWorld [0, 0, 0]; +private _p1 = positionCameraToWorld [0, 0, 1]; +private _vW = _p1 vectorDiff _p0; + +private _lenW = vectorMagnitude _vW; +if (_lenW < 0.0001) exitWith {}; +_vW = _vW vectorMultiply (1 / _lenW); + +private _absDir_rad = (_vW select 0) atan2 (_vW select 1); +if (_absDir_rad < 0) then { + _absDir_rad = _absDir_rad + (2 * pi); +}; + +private _vM = _veh vectorWorldToModel _vW; +private _lenM = vectorMagnitude _vM; +if (_lenM < 0.0001) exitWith {}; +_vM = _vM vectorMultiply (1 / _lenM); + +private _x = _vM select 0; +private _y = _vM select 1; +private _z = _vM select 2; + +private _azimuth = (_x atan2 _y); +if (_azimuth > 180) then { + _azimuth = _azimuth - 360; +}; +if (_azimuth < -180) then { + _azimuth = _azimuth + 360; +}; + +private _h = sqrt (_x * _x + _y * _y); +private _signY = if (_y < 0) then { -1 } else { 1 }; +private _yPrime = _h * _signY; +private _elevation = (_z atan2 _yPrime); + +_azimuth = _azimuth max BRAF_MIN_TURN min BRAF_MAX_TURN; +_elevation = _elevation max BRAF_MIN_ELEV min BRAF_MAX_ELEV; + +private _turretAZcarrotCtrlPos = ctrlPosition (_display displayCtrl BRAF_AZ_ARROW); +private _turretAZtextCtrlPos = ctrlPosition (_display displayCtrl BRAF_AZ_TXT); +private _azPosX = BRAF_AZ_BEG + (((_azimuth + 180) / 360) * BRAF_AZ_DIS); + +(_display displayCtrl BRAF_AZ_ARROW) ctrlSetPosition [ + _azPosX, + _turretAZcarrotCtrlPos select 1, + _turretAZcarrotCtrlPos select 2, + _turretAZcarrotCtrlPos select 3 +]; +(_display displayCtrl BRAF_AZ_ARROW) ctrlCommit 0; + +(_display displayCtrl BRAF_AZ_TXT) ctrlSetText str (round _azimuth); + +private _azArrowW = _turretAZcarrotCtrlPos select 2; +private _azTextW = _turretAZtextCtrlPos select 2; + +(_display displayCtrl BRAF_AZ_TXT) ctrlSetPosition [ + _azPosX + ((_azArrowW - _azTextW) / 2), + (_turretAZcarrotCtrlPos select 1) + BRAF_AZ_TXT_Y_OFFSET, + _azTextW, + _turretAZtextCtrlPos select 3 +]; +(_display displayCtrl BRAF_AZ_TXT) ctrlCommit 0; + +private _turretEZcarrotCtrlPos = ctrlPosition (_display displayCtrl BRAF_ELEV_ARROW); +private _turretEZtextCtrlPos = ctrlPosition (_display displayCtrl BRAF_ELEV_TXT); +private _tEl = (BRAF_MAX_ELEV - _elevation) / (BRAF_MAX_ELEV - BRAF_MIN_ELEV); + +if (_tEl < 0) then { + _tEl = 0; +}; +if (_tEl > 1) then { + _tEl = 1; +}; + +private _elevPos = BRAF_EZ_BEG + (_tEl * BRAF_EZ_DIS); + +(_display displayCtrl BRAF_ELEV_ARROW) ctrlSetPosition [ + _turretEZcarrotCtrlPos select 0, + _elevPos, + _turretEZcarrotCtrlPos select 2, + _turretEZcarrotCtrlPos select 3 +]; +(_display displayCtrl BRAF_ELEV_ARROW) ctrlCommit 0; + +(_display displayCtrl BRAF_ELEV_TXT) ctrlSetText str (round _elevation); +(_display displayCtrl BRAF_ELEV_TXT) ctrlSetPosition [ + _turretEZtextCtrlPos select 0, + _elevPos + BRAF_EZ_NUM_OFFSET, + _turretEZtextCtrlPos select 2, + _turretEZtextCtrlPos select 3 +]; +(_display displayCtrl BRAF_ELEV_TXT) ctrlCommit 0; + +private _hdg = round (getDir _veh); +private _ias = round (speed _veh); +private _gs = round ((vectorMagnitude (velocity _veh)) * 3.6); +private _ralt = round ((getPosATL _veh) select 2); +private _baro = round ((getPosASL _veh) select 2); +private _pitchBank = _veh call BIS_fnc_getPitchBank; +private _ptch = round (_pitchBank select 0); +private _roll = round (_pitchBank select 1); + +private _ctrlHDG = _display displayCtrl BRAF_HDG_VALUE; +private _ctrlIAS = _display displayCtrl BRAF_IAS_VALUE; +private _ctrlGS = _display displayCtrl BRAF_GS_VALUE; +private _ctrlRALT = _display displayCtrl BRAF_RALT_VALUE; +private _ctrlBARO = _display displayCtrl BRAF_BARO_VALUE; +private _ctrlROLL = _display displayCtrl BRAF_ROLL_VALUE; +private _ctrlPTCH = _display displayCtrl BRAF_PTCH_VALUE; + +if (!isNull _ctrlHDG) then { + _ctrlHDG ctrlSetText format ["%1", _hdg]; +}; +if (!isNull _ctrlIAS) then { + _ctrlIAS ctrlSetText format ["%1", _ias]; +}; +if (!isNull _ctrlGS) then { + _ctrlGS ctrlSetText format ["%1", _gs]; +}; +if (!isNull _ctrlRALT) then { + _ctrlRALT ctrlSetText format ["%1", _ralt]; +}; +if (!isNull _ctrlBARO) then { + _ctrlBARO ctrlSetText format ["%1", _baro]; +}; +if (!isNull _ctrlROLL) then { + _ctrlROLL ctrlSetText format ["%1", _roll]; +}; +if (!isNull _ctrlPTCH) then { + _ctrlPTCH ctrlSetText format ["%1", _ptch]; +}; + +(_display displayCtrl BRAF_NORTH_ARROW) ctrlSetAngle [-_absDir_rad, 0.5, 0.5]; diff --git a/braf_optics_air/braf_fnc/fn_initRSC.sqf b/braf_optics_air/braf_fnc/fn_initRSC.sqf new file mode 100644 index 0000000..bb3d7dc --- /dev/null +++ b/braf_optics_air/braf_fnc/fn_initRSC.sqf @@ -0,0 +1,38 @@ +/* + Author: Brazilian Armed Forces + File: fn_initRSC.sqf + + Purpose: + - Create and manage the EachFrame loop that updates the generic air FLIR optics +*/ + +disableSerialization; + +params ["_display"]; + +if (isNil "BRAF_fnc_flirControls") then { + systemChat "[BRAF FLIR] WARNING: BRAF_fnc_flirControls is not loaded."; +}; + +uiNamespace setVariable ["BRAF_FLIR_UI_Display", _display]; + +[] call BRAF_fnc_shutdownRSC; + +private _pfh = addMissionEventHandler ["EachFrame", { + if (cameraView != "GUNNER") exitWith {}; + + private _display = uiNamespace getVariable ["BRAF_FLIR_UI_Display", displayNull]; + + if (isNull _display) exitWith { + [] call BRAF_fnc_shutdownRSC; + }; + + private _veh = vehicle player; + if (isNull _veh) exitWith { + [] call BRAF_fnc_shutdownRSC; + }; + + [_display] call BRAF_fnc_flirControls; +}]; + +uiNamespace setVariable ["BRAF_FLIR_PFH_eachFrame", _pfh]; diff --git a/braf_optics_air/braf_fnc/fn_shutdownRSC.sqf b/braf_optics_air/braf_fnc/fn_shutdownRSC.sqf new file mode 100644 index 0000000..6541376 --- /dev/null +++ b/braf_optics_air/braf_fnc/fn_shutdownRSC.sqf @@ -0,0 +1,16 @@ +/* + Author: Brazilian Armed Forces + File: fn_shutdownRSC.sqf + + Purpose: + - Stop the EachFrame loop and clear the generic air FLIR runtime state +*/ + +private _pfh = uiNamespace getVariable ["BRAF_FLIR_PFH_eachFrame", -1]; + +if (_pfh > -1) then { + removeMissionEventHandler ["EachFrame", _pfh]; +}; + +uiNamespace setVariable ["BRAF_FLIR_PFH_eachFrame", nil]; +uiNamespace setVariable ["BRAF_FLIR_UI_Display", nil]; diff --git a/braf_optics_air/config.cpp b/braf_optics_air/config.cpp new file mode 100644 index 0000000..e7fb26f --- /dev/null +++ b/braf_optics_air/config.cpp @@ -0,0 +1,427 @@ +class CfgPatches { + class BRAF_Optics_Air { + author = "BRAF Team"; + addonRootClass = "A3_Weapons_F"; + requiredAddons[] = { + "A3_Data_F", + "A3_Functions_F", + "A3_Ui_F", + "A3_Weapons_F" + }; + requiredVersion = 0.1; + units[] = {}; + weapons[] = {}; + }; +}; + +class ScrollBar; +class RscUnitInfo; +class RscControlsGroup; +class RscControlsGroupNoScrollbars; +class CA_HUDRscControlsGroup; +class RscText; +class RangeText: RscText{}; +class RscPicture; +class RscOpticsText; +class RscOpticsValue; +class RscIGProgress; +class RCWSOptics; +class Optics_Armored; + +class CfgFunctions { + class BRAF { + tag = "BRAF"; + class UI { + file = "braf\braf_optics_air\braf_fnc"; + class initRSC {}; + class shutdownRSC {}; + class flirControls {}; + }; + }; +}; + +class RscInGameUI { + class BRAF_RscOptics_Air_FLIR: RscUnitInfo { + idd = 300; + controls[] = {"CA_Zeroing","CA_IGUI_elements_group","CA_VehicleToggles"}; + class VScrollbar; + class HScrollbar; + onLoad = "[\"onLoad\",_this,\"RscUnitInfo\",'IGUI'] call (uiNamespace getVariable 'BIS_fnc_initDisplay'); _this call BRAF_fnc_initRSC;"; + onUnload = "[\"onUnload\",_this,\"RscUnitInfo\",'IGUI'] call (uiNamespace getVariable 'BIS_fnc_initDisplay'); _this call BRAF_fnc_shutdownRSC;"; + + class CA_IGUI_elements_group: RscControlsGroup { + idc = 170; + class VScrollbar: VScrollbar { width = 0; }; + class HScrollbar: HScrollbar { height = 0; }; + + x = "-4 * (0.01875 * SafezoneH) + (SafezoneX + ((SafezoneW - SafezoneH)/2))"; + y = "000 * (0.02500 * SafezoneH) + (SafezoneY)"; + w = "100 * (0.01875 * SafezoneH)"; + h = "080 * (0.02500 * SafezoneH)"; + + class controls { + class ValueDistance: RscText { + style = 1; + sizeEx = "0.038*SafezoneH"; + shadow = 0; + font = "EtelkaMonospacePro"; + idc = 198; + text = "245678"; + colorText[] = {0,0,0,1}; + colorBackground[] = {0,0,0,0}; + x = "45.5 * (0.01875 * SafezoneH)"; + y = "35.75 * (0.025 * SafezoneH)"; + w = "8 * (0.01875 * SafezoneH)"; + h = "1.2 * (0.025 * SafezoneH)"; + }; + + class TextDistance: ValueDistance { + style = 0; + idc = 1800; + text = "Laser dist:"; + x = "42 * (0.01875 * SafezoneH)"; + y = "35.75 * (0.025 * SafezoneH)"; + }; + + class ValueGrid: ValueDistance { + idc = 171; + text = "245678"; + x = "10 * (0.01875 * SafezoneH)"; + y = "34 * (0.025 * SafezoneH)"; + }; + + class TextGrid: ValueGrid { + style = 0; + idc = 1801; + text = "GPS grid:"; + x = "4.45 * (0.01875 * SafezoneH)"; + y = "34 * (0.025 * SafezoneH)"; + }; + + class ValueWeapon: ValueDistance { + idc = 172; + text = "245678"; + x = "10 * (0.01875 * SafezoneH)"; + y = "35.75 * (0.025 * SafezoneH)"; + }; + + class TextTarget: ValueGrid { + style = 0; + idc = 1802; + text = "Target grid:"; + x = "4.45 * (0.01875 * SafezoneH)"; + y = "35.75 * (0.025 * SafezoneH)"; + }; + + class TextElev: ValueGrid { + style = 0; + idc = 1803; + text = "Elev:"; + x = "32 * (0.01875 * SafezoneH)"; + y = "35.75 * (0.025 * SafezoneH)"; + }; + + class ValueElev: ValueDistance { + idc = 175; + text = "245"; + x = "32 * (0.01875 * SafezoneH)"; + y = "35.75 * (0.025 * SafezoneH)"; + }; + + class TextAz: ValueGrid { + style = 0; + idc = 1804; + text = "Az:"; + x = "24.5 * (0.01875 * SafezoneH)"; + y = "35.75 * (0.025 * SafezoneH)"; + }; + + class ValueAz: ValueDistance { + idc = 156; + text = "245"; + x = "23 * (0.01875 * SafezoneH)"; + y = "35.75 * (0.025 * SafezoneH)"; + }; + + class TextAlt: ValueGrid { + style = 0; + idc = 1805; + text = "Alt:"; + x = "24.5 * (0.01875 * SafezoneH)"; + y = "34 * (0.025 * SafezoneH)"; + }; + + class ValueAlt: ValueDistance { + idc = 189; + text = "245678"; + x = "24 * (0.01875 * SafezoneH)"; + y = "34 * (0.025 * SafezoneH)"; + }; + + class CA_Time: ValueGrid { + idc = 190; + style = 0; + shadow = 0; + text = "XX:XX:xx"; + x = "54 * (0.01875 * SafezoneH)"; + y = "35.75 * (0.025 * SafezoneH)"; + w = "6.5 * (0.01875 * SafezoneH)"; + }; + + class braf_fov_mode: RscText { + idc = 154; + text = "WFOV"; + sizeEx = "0.03*SafezoneH"; + style = 0; + shadow = 0; + font = "EtelkaMonospacePro"; + x = "0 * (0.01875 * SafezoneH)"; + y = "3 * (0.025 * SafezoneH)"; + w = "5 * (0.01875 * SafezoneH)"; + h = "1.2 * (0.025 * SafezoneH)"; + colorText[] = {0,0,0,1}; + }; + + class CA_VisionMode: RscText { + idc = 152; + sizeEx = "0.03*SafezoneH"; + style = 0; + shadow = 0; + font = "EtelkaMonospacePro"; + text = "DTV"; + x = "4.5 * (0.01875 * SafezoneH)"; + y = "3 * (0.025 * SafezoneH)"; + w = "5 * (0.01875 * SafezoneH)"; + h = "1.2 * (0.025 * SafezoneH)"; + colorText[] = {0,0,0,1}; + }; + + class CA_FlirMode: CA_VisionMode { + idc = 153; + text = "BHOT"; + x = "7 * (0.01875 * SafezoneH)"; + }; + + class CA_Laser: RscText { + idc = 158; + style = "0x30 + 0x800"; + sizeEx = "0.038*SafezoneH"; + colorText[] = {0.70599997,0.074500002,0.0196,1}; + shadow = 0; + font = "EtelkaMonospacePro"; + text = "\A3\ui_f\data\igui\rscingameui\rscoptics\laser_designator_iconLaserOn.paa"; + x = "33 * (0.01875 * SafezoneH)"; + y = "8 * (0.025 * SafezoneH)"; + w = "3.5 * (0.01875 * SafezoneH)"; + h = "1.5 * (0.025 * SafezoneH)"; + }; + + class braf_arrow_vert: RscPicture { + idc = 1901; + text = "\braf\braf_optics_air\StarSaphire\data\braf_arrow_vert_ca.paa"; + shadow = 0; + sizeEx = "0.03*SafezoneH"; + x = "-0.5 * (0.01875 * SafezoneH)"; + y = "16.6 * (0.025 * SafezoneH)"; + w = "2.1 * (0.01875 * SafezoneH)"; + h = "2.1 * (0.025 * SafezoneH)"; + color[] = {1,1,1,1}; + colorBackground[] = {0,0,0,0}; + }; + + class braf_elev_value: RscText { + idc = 1902; + style = 0; + shadow = 0; + sizeEx = "0.03*SafezoneH"; + colorText[] = {1,1,1,1}; + colorBackground[] = {0,0,0,0}; + x = "1 * (0.01875 * SafezoneH)"; + y = "16.6 * (0.025 * SafezoneH)"; + w = "4 * (0.01875 * SafezoneH)"; + h = "2.1 * (0.025 * SafezoneH)"; + text = "-120"; + }; + + class braf_arrow_horiz: braf_arrow_vert { + idc = 1903; + text = "\braf\braf_optics_air\StarSaphire\data\braf_arrow_hor_ca.paa"; + x = "-12 * (0.01875 * SafezoneH)"; + y = "30 * (0.025 * SafezoneH)"; + }; + + class braf_dir_value: braf_elev_value { + idc = 1904; + style = 2; + x = "-12.95 * (0.01875 * SafezoneH)"; + y = "20 * (0.025 * SafezoneH)"; + w = "4.0 * (0.01875 * SafezoneH)"; + h = "2.1 * (0.025 * SafezoneH)"; + text = "-180"; + }; + + class braf_compass_arrow: RscPicture { + idc = 1905; + style = 144; + shadow = 0; + text = "\braf\braf_optics_air\StarSaphire\data\braf_arrow_north_ca.paa"; + x = "57.5 * (0.01875 * SafezoneH)"; + y = "25.5 * (0.02500 * SafezoneH)"; + w = "10 * (0.01875 * SafezoneH)"; + h = "10 * (0.02500 * SafezoneH)"; + }; + + class braf_compass_n: braf_elev_value { + idc = -1; + style = 2; + sizeEx = "0.03*SafezoneH"; + x = "60 * (0.01875 * SafezoneH)"; + y = "28 * (0.02500 * SafezoneH)"; + w = "05 * (0.01875 * SafezoneH)"; + h = "05 * (0.02500 * SafezoneH)"; + text = "N"; + }; + + class BRAF_AirData_Label_HDG: RscText { + idc = 1906; + style = 2; + shadow = 0; + font = "EtelkaMonospacePro"; + sizeEx = "0.02*SafezoneH"; + colorText[] = {1,1,1,1}; + colorBackground[] = {0,0,0,0}; + text = "HDG:"; + x = "60 * (0.01875 * SafezoneH)"; + y = "4.4 * (0.025 * SafezoneH)"; + w = "4 * (0.01875 * SafezoneH)"; + h = "1.2 * (0.025 * SafezoneH)"; + }; + + class BRAF_AirData_Value_HDG: BRAF_AirData_Label_HDG { + idc = 1907; + style = 1; + text = "000"; + x = "60 * (0.01875 * SafezoneH)"; + w = "5 * (0.01875 * SafezoneH)"; + }; + + class BRAF_AirData_Label_IAS: BRAF_AirData_Label_HDG { + idc = 1908; + text = "IAS:"; + y = "5 * (0.025 * SafezoneH)"; + }; + + class BRAF_AirData_Value_IAS: BRAF_AirData_Value_HDG { + idc = 1909; + text = "000"; + y = "5 * (0.025 * SafezoneH)"; + }; + + class BRAF_AirData_Label_GS: BRAF_AirData_Label_HDG { + idc = 1910; + text = "GS:"; + y = "5.6 * (0.025 * SafezoneH)"; + }; + + class BRAF_AirData_Value_GS: BRAF_AirData_Value_HDG { + idc = 1911; + text = "000"; + y = "5.6 * (0.025 * SafezoneH)"; + }; + + class BRAF_AirData_Label_RALT: BRAF_AirData_Label_HDG { + idc = 1912; + text = "RALT:"; + y = "6.2 * (0.025 * SafezoneH)"; + }; + + class BRAF_AirData_Value_RALT: BRAF_AirData_Value_HDG { + idc = 1913; + text = "0000"; + y = "6.2 * (0.025 * SafezoneH)"; + }; + + class BRAF_AirData_Label_BARO: BRAF_AirData_Label_HDG { + idc = 1914; + text = "BARO:"; + y = "6.8 * (0.025 * SafezoneH)"; + }; + + class BRAF_AirData_Value_BARO: BRAF_AirData_Value_HDG { + idc = 1915; + text = "0000"; + y = "6.8 * (0.025 * SafezoneH)"; + }; + + class BRAF_AirData_Label_ROLL: BRAF_AirData_Label_HDG { + idc = 1916; + text = "ROLL:"; + y = "7.4 * (0.025 * SafezoneH)"; + }; + + class BRAF_AirData_Value_ROLL: BRAF_AirData_Value_HDG { + idc = 1917; + text = "0"; + y = "7.4 * (0.025 * SafezoneH)"; + }; + + class BRAF_AirData_Label_PTCH: BRAF_AirData_Label_HDG { + idc = 1918; + text = "PTCH:"; + y = "8 * (0.025 * SafezoneH)"; + }; + + class BRAF_AirData_Value_PTCH: BRAF_AirData_Value_HDG { + idc = 1919; + text = "0"; + y = "8 * (0.025 * SafezoneH)"; + }; + }; + }; + }; +}; + +class BRAF_Air_FLIR_Gunner_Optics: Optics_Armored { + class Wide: RCWSOptics { + initFov = 0.5236; + minFov = 0.5236; + maxFov = 0.5236; + opticsDisplayName = "WFOV"; + visionMode[] = {"Normal","TI"}; + thermalMode[] = {0,1}; + thermalNoise[] = {0.5,1.25,2.5,0.75,1,0,0,0.95}; + gunnerOpticsModel = "\braf\braf_optics_air\StarSaphire\braf_StarSaphire_w.p3d"; + gunnerOpticsEffect[] = {}; + directionStabilized = 1; + }; + + class Medium: Wide { + opticsDisplayName = "MFOV"; + gunnerOpticsModel = "\braf\braf_optics_air\StarSaphire\braf_StarSaphire_m.p3d"; + initFov = 0.0593; + minFov = 0.0593; + maxFov = 0.0593; + }; + + class Narrow: Wide { + opticsDisplayName = "NFOV"; + gunnerOpticsModel = "\braf\braf_optics_air\StarSaphire\braf_StarSaphire_n.p3d"; + initFov = 0.0140; + minFov = 0.0140; + maxFov = 0.0140; + }; + + class Narrower: Narrow { + opticsDisplayName = "NFOV 2X"; + initFov = 0.0070; + minFov = 0.0070; + maxFov = 0.0070; + }; + + class UltraNarrow: Narrow { + opticsDisplayName = "NFOV 4X"; + initFov = 0.0035; + minFov = 0.0035; + maxFov = 0.0035; + }; +};