From f4ce352e7139689bb99f151a364067b438ae5bc3 Mon Sep 17 00:00:00 2001
From: mrschick <58027418+mrschick@users.noreply.github.com>
Date: Wed, 2 Aug 2023 12:15:01 +0200
Subject: [PATCH 1/6] Add CBA Setting for LR Radio Signal Model
I can vouch for the added translations in english, german and italian.
The other languages were google translated, except for Japanese and Chinese (trad+simp) which I did not change.
---
addons/sys_signal/initSettings.sqf | 19 +++++++++++++++++++
addons/sys_signal/stringtable.xml | 13 +++++++++++++
2 files changed, 32 insertions(+)
diff --git a/addons/sys_signal/initSettings.sqf b/addons/sys_signal/initSettings.sqf
index 5209b4dc9..9ec38748c 100644
--- a/addons/sys_signal/initSettings.sqf
+++ b/addons/sys_signal/initSettings.sqf
@@ -16,3 +16,22 @@
INFO_1("Using radio propagation model: %1",_signalModel);
}
] call CBA_fnc_addSetting;
+
+// Signal model for Backpack Radios
+[
+ QGVAR(signalModelLR),
+ "LIST",
+ localize LSTRING(signalModelLR_displayName),
+ "ACRE2",
+ [
+ [SIGNAL_ENUMS],
+ [SIGNAL_NAMES],
+ SIGNAL_MODEL_LOS_MULTIPATH // Default
+ ],
+ true,
+ {
+ params ["_value"];
+ private _signalModelLR = [SIGNAL_NAMES] select _value;
+ INFO_1("Using backpack radio propagation model: %1",_signalModelLR);
+ }
+] call CBA_fnc_addSetting;
diff --git a/addons/sys_signal/stringtable.xml b/addons/sys_signal/stringtable.xml
index fd8815dec..4fd56947b 100644
--- a/addons/sys_signal/stringtable.xml
+++ b/addons/sys_signal/stringtable.xml
@@ -14,5 +14,18 @@
Modelo de propagação de sinal
Sinyal İletim Modeli
+
+ Signal Propagation Model for Long-Range Radios
+ Modelo de propagación de señal para radios de largo alcance
+ 信号伝搬モデル
+ 訊號傳遞模型
+ Signalausbreitungsmodell für Langstreckenfunkgeräte
+ Modello di propagazione del segnale per radio a lunga portata
+ Модель распространения сигнала для радиостанций дальнего действия
+ Modèle de propagation des ondes pour les radios longue portée
+ 讯号传递模型
+ Modelo de propagação de sinal para rádios de longo alcance
+ Uzun menzilli telsizler için sinyal yayılma modeli
+
From 93a36af5ee2cdf6eee023cc47f94a1ab5e1b9c21 Mon Sep 17 00:00:00 2001
From: mrschick <58027418+mrschick@users.noreply.github.com>
Date: Wed, 9 Aug 2023 17:58:05 +0200
Subject: [PATCH 2/6] Move signalModel fetching and check out of loop
---
addons/sys_signal/fnc_getSignalCore.sqf | 15 ++++++++-------
1 file changed, 8 insertions(+), 7 deletions(-)
diff --git a/addons/sys_signal/fnc_getSignalCore.sqf b/addons/sys_signal/fnc_getSignalCore.sqf
index 549426546..d5e3904dd 100644
--- a/addons/sys_signal/fnc_getSignalCore.sqf
+++ b/addons/sys_signal/fnc_getSignalCore.sqf
@@ -25,17 +25,18 @@ if (_count == 0) then {
private _rxAntennas = [_receiverClass] call EFUNC(sys_components,findAntenna);
private _txAntennas = [_transmitterClass] call EFUNC(sys_components,findAntenna);
+ private _model = GVAR(signalModel); // TODO: Change models on the fly if compatible (underwater, better frequency matching)
+
+ // Make sure ITWOM is not used for the moment
+ if (_model > SIGNAL_MODEL_ITWOM || {_model < SIGNAL_MODEL_CASUAL}) then {
+ _model = SIGNAL_MODEL_LOS_MULTIPATH; // Default to LOS Multipath if the model is out of range
+ GVAR(signalModel) = _model; // And make sure we do not use an invalid mode next time
+ };
+
{
private _txAntenna = _x;
{
private _rxAntenna = _x;
- private _model = GVAR(signalModel); // TODO: Change models on the fly if compatible (underwater, better frequency matching)
-
- // Make sure ITWOM is not used for the moment
- if (_model > SIGNAL_MODEL_ITWOM || {_model < SIGNAL_MODEL_CASUAL}) then {
- _model = SIGNAL_MODEL_LOS_MULTIPATH; // Default to LOS Multipath if the model is out of range
- GVAR(signalModel) = _model; // And make sure we do not use an invalid mode next time
- };
_count = _count + 1;
private _id = format ["%1_%2_%3_%4", _transmitterClass, (_txAntenna select 0), _receiverClass, (_rxAntenna select 0)];
From 02e5f100a8052cc8903b9acc0cbdddfafc3bcc8d Mon Sep 17 00:00:00 2001
From: mrschick <58027418+mrschick@users.noreply.github.com>
Date: Wed, 9 Aug 2023 17:59:26 +0200
Subject: [PATCH 3/6] Switch to signalModelLR when using LR Radio
---
addons/sys_signal/fnc_getSignalCore.sqf | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/addons/sys_signal/fnc_getSignalCore.sqf b/addons/sys_signal/fnc_getSignalCore.sqf
index d5e3904dd..38f853c1a 100644
--- a/addons/sys_signal/fnc_getSignalCore.sqf
+++ b/addons/sys_signal/fnc_getSignalCore.sqf
@@ -25,6 +25,9 @@ if (_count == 0) then {
private _rxAntennas = [_receiverClass] call EFUNC(sys_components,findAntenna);
private _txAntennas = [_transmitterClass] call EFUNC(sys_components,findAntenna);
+ private _lrRadios = ["PRC77", "PRC117F", "SEM70"];
+ private _lrAntennas = ["SEM70", "AT271", "123CM", "270CM", "FA80", "AS1729", "243CM", "643CM"];
+
private _model = GVAR(signalModel); // TODO: Change models on the fly if compatible (underwater, better frequency matching)
// Make sure ITWOM is not used for the moment
@@ -38,6 +41,14 @@ if (_count == 0) then {
{
private _rxAntenna = _x;
+ // IF the transmitter is using a LR antenna, use signalModelLR
+ private _txRadioName = [_transmitterClass, "_"] call BIS_fnc_splitString select 1;
+ private _txAntennaName = [_txAntenna select 0, "_"] call BIS_fnc_splitString select 1;
+
+ if (_txRadioName in _lrRadios || {_txAntennaName in _lrAntennas}) then {
+ _model = GVAR(signalModelLR);
+ };
+
_count = _count + 1;
private _id = format ["%1_%2_%3_%4", _transmitterClass, (_txAntenna select 0), _receiverClass, (_rxAntenna select 0)];
[
From e298fc6bcd337068b18c9cd9fc5ed1a1c7903acf Mon Sep 17 00:00:00 2001
From: mrschick <58027418+mrschick@users.noreply.github.com>
Date: Mon, 7 Aug 2023 10:47:14 +0200
Subject: [PATCH 4/6] Added systemChat Debug of applied signalModel
---
addons/sys_signal/fnc_getSignalCore.sqf | 3 +++
1 file changed, 3 insertions(+)
diff --git a/addons/sys_signal/fnc_getSignalCore.sqf b/addons/sys_signal/fnc_getSignalCore.sqf
index 38f853c1a..08ecb886b 100644
--- a/addons/sys_signal/fnc_getSignalCore.sqf
+++ b/addons/sys_signal/fnc_getSignalCore.sqf
@@ -47,6 +47,9 @@ if (_count == 0) then {
if (_txRadioName in _lrRadios || {_txAntennaName in _lrAntennas}) then {
_model = GVAR(signalModelLR);
+ systemChat "transmission is using signalModelLR";
+ } else {
+ systemChat "transmission is using normal signalModel";
};
_count = _count + 1;
From 459956c1a470bc5d2ee2c856915c2380dde0225e Mon Sep 17 00:00:00 2001
From: mrschick <58027418+mrschick@users.noreply.github.com>
Date: Sun, 17 Sep 2023 16:23:15 +0200
Subject: [PATCH 5/6] New CBA Signal Settings to define which Antennas are LR
---
addons/sys_signal/XEH_preInit.sqf | 21 +++++++++++++++
addons/sys_signal/fnc_getSignalCore.sqf | 6 +----
addons/sys_signal/initSettings.sqf | 36 ++++++++++++++++++++++++-
addons/sys_signal/stringtable.xml | 15 +++++++++++
4 files changed, 72 insertions(+), 6 deletions(-)
diff --git a/addons/sys_signal/XEH_preInit.sqf b/addons/sys_signal/XEH_preInit.sqf
index ede415eed..5a08998d7 100644
--- a/addons/sys_signal/XEH_preInit.sqf
+++ b/addons/sys_signal/XEH_preInit.sqf
@@ -15,4 +15,25 @@ if (hasInterface) then {
// CBA Settings
#include "initSettings.sqf"
+DGVAR(lrAntennas) = []; // array of antenna classname segments that count as long-ranged, i.e: "ACRE_123CM_VHF_TNC" should be "123CM" in the array.
+if !(GVAR(signalModel) isEqualTo GVAR(signalModelLR)) then { // start building the array of antenna classname segments based on the current ACRE Signal CBA settings
+ if (GVAR(radiopacksLR)) then {
+ GVAR(lrAntennas) append ["SEM70", "AT271", "123CM"];
+ };
+
+ if (GVAR(racksLR)) then {
+ GVAR(lrAntennas) append ["270CM", "FA80", "AS1729"];
+ };
+
+ if (GVAR(groundSpikeLR) != 0) then {
+ if (GVAR(groundSpikeLR) == 1) exitWith { // Only GSA with Mast is long-ranged
+ GVAR(lrAntennas) append ["643CM"];
+ };
+ if (GVAR(groundSpikeLR) == 2) exitWith { // Both GSA with and without Masts are long-ranged
+ GVAR(lrAntennas) append ["243CM", "643CM"];
+ };
+ };
+ INFO_1("Antennas that use signalModelLR: %1", GVAR(lrAntennas));
+};
+
ADDON = true;
diff --git a/addons/sys_signal/fnc_getSignalCore.sqf b/addons/sys_signal/fnc_getSignalCore.sqf
index 08ecb886b..1407b636d 100644
--- a/addons/sys_signal/fnc_getSignalCore.sqf
+++ b/addons/sys_signal/fnc_getSignalCore.sqf
@@ -25,9 +25,6 @@ if (_count == 0) then {
private _rxAntennas = [_receiverClass] call EFUNC(sys_components,findAntenna);
private _txAntennas = [_transmitterClass] call EFUNC(sys_components,findAntenna);
- private _lrRadios = ["PRC77", "PRC117F", "SEM70"];
- private _lrAntennas = ["SEM70", "AT271", "123CM", "270CM", "FA80", "AS1729", "243CM", "643CM"];
-
private _model = GVAR(signalModel); // TODO: Change models on the fly if compatible (underwater, better frequency matching)
// Make sure ITWOM is not used for the moment
@@ -42,10 +39,9 @@ if (_count == 0) then {
private _rxAntenna = _x;
// IF the transmitter is using a LR antenna, use signalModelLR
- private _txRadioName = [_transmitterClass, "_"] call BIS_fnc_splitString select 1;
private _txAntennaName = [_txAntenna select 0, "_"] call BIS_fnc_splitString select 1;
- if (_txRadioName in _lrRadios || {_txAntennaName in _lrAntennas}) then {
+ if (_txAntennaName in GVAR(lrAntennas)) then {
_model = GVAR(signalModelLR);
systemChat "transmission is using signalModelLR";
} else {
diff --git a/addons/sys_signal/initSettings.sqf b/addons/sys_signal/initSettings.sqf
index 9ec38748c..16d49d3ef 100644
--- a/addons/sys_signal/initSettings.sqf
+++ b/addons/sys_signal/initSettings.sqf
@@ -32,6 +32,40 @@
{
params ["_value"];
private _signalModelLR = [SIGNAL_NAMES] select _value;
- INFO_1("Using backpack radio propagation model: %1",_signalModelLR);
+ INFO_1("Using Long-Range radio propagation model: %1",_signalModelLR);
}
] call CBA_fnc_addSetting;
+
+// Do backpack radios use signalModelLR
+[
+ QGVAR(radiopacksLR),
+ "CHECKBOX",
+ localize LSTRING(radiopacksLR_displayName),
+ "ACRE2",
+ true,
+ true
+] call CBA_fnc_addSetting;
+
+// Do vehicle racks use signalModelLR
+[
+ QGVAR(racksLR),
+ "CHECKBOX",
+ localize LSTRING(racksLR_displayName),
+ "ACRE2",
+ true,
+ true
+] call CBA_fnc_addSetting;
+
+// Does the ground spike antenna use signalModelLR
+[
+ QGVAR(groundSpikeLR),
+ "LIST",
+ localize LSTRING(groundSpikeLR_displayName),
+ "ACRE2",
+ [
+ [0, 1, 2],
+ ["None", "Only GSA with Mast", "Both"],
+ 1 // Default
+ ],
+ true
+] call CBA_fnc_addSetting;
diff --git a/addons/sys_signal/stringtable.xml b/addons/sys_signal/stringtable.xml
index 4fd56947b..b6008827c 100644
--- a/addons/sys_signal/stringtable.xml
+++ b/addons/sys_signal/stringtable.xml
@@ -27,5 +27,20 @@
Modelo de propagação de sinal para rádios de longo alcance
Uzun menzilli telsizler için sinyal yayılma modeli
+
+ Should radiopacks count as Long-Ranged
+ Rucksackfunkgeräte sind langstreckentauglich
+ Radio da zaino sono di lunga portata
+
+
+ Should Vehicle Racks count as Long-Ranged
+ Fahrzeugantennen sind langstreckentauglich
+ Racks sui veicoli sono di lunga portata
+
+
+ Should Ground Spikes count as Long-Ranged
+ Bodenbefestigte Antennen sind langstreckentauglich
+ Antenne piazzabili sono di lunga portata
+
From ec4e2237e6cef467a7c2556f63a08278597b04e2 Mon Sep 17 00:00:00 2001
From: mrschick <58027418+mrschick@users.noreply.github.com>
Date: Sun, 17 Sep 2023 16:23:42 +0200
Subject: [PATCH 6/6] Removed systemChat debug logs
---
addons/sys_signal/fnc_getSignalCore.sqf | 3 ---
1 file changed, 3 deletions(-)
diff --git a/addons/sys_signal/fnc_getSignalCore.sqf b/addons/sys_signal/fnc_getSignalCore.sqf
index 1407b636d..e3e90212d 100644
--- a/addons/sys_signal/fnc_getSignalCore.sqf
+++ b/addons/sys_signal/fnc_getSignalCore.sqf
@@ -43,9 +43,6 @@ if (_count == 0) then {
if (_txAntennaName in GVAR(lrAntennas)) then {
_model = GVAR(signalModelLR);
- systemChat "transmission is using signalModelLR";
- } else {
- systemChat "transmission is using normal signalModel";
};
_count = _count + 1;