14 Commits

Author SHA1 Message Date
Valmo Trindade
7e4379ada4 Added enemy marker function to ease enemy marking 2025-11-20 04:51:10 -03:00
Valmo Trindade
572b2a360f ADded zagorsk reserverd forest map 2025-11-20 04:50:52 -03:00
Valmo Trindade
083ccd2906 Linted cot refresh rate 2025-11-15 06:56:47 -03:00
Valmo Trindade
35a45d2cd4 fixed drone handler 2025-11-15 06:48:03 -03:00
Valmo Trindade
2b241fbeaf Fixed extract position function and dependency chain 2025-11-15 01:57:23 -03:00
Valmo Trindade
ad9ba834cc Merge pull request #22 from Roborob1234/patch-1
Update fn_convert_to_stratis.sqf
2025-10-18 02:29:58 -03:00
Rob Haddow
469403d9b5 Update fn_convert_to_stratis.sqf
[Fix] Corrected NW corner from my earlier work, NW corner had the Lat value of the S edge.
2025-10-17 19:28:17 -05:00
Valmo Trindade
01ea754f57 Merge pull request #21 from Roborob1234/Rob's-tinkering
Stratis and Tanoa coordinate update
2025-10-14 19:24:37 -03:00
Rob Haddow
fd8a25790e Update fn_convert_to_stratis.sqf
Updated Stratis with in game map size and accurized map corners
2025-10-13 12:15:04 -05:00
Rob Haddow
9ede7237b8 Merge branch 'valmojr:main' into patch-2 2025-10-13 11:30:43 -05:00
Valmo Trindade
1242b1f79f Fixed drone params on callsign function 2025-10-12 20:44:38 -03:00
Valmo Trindade
9f8f326446 fixed params on log function 2025-10-12 20:44:25 -03:00
Valmo Trindade
bf3b0cf0d4 Added ConfigOf props 2025-10-12 20:44:17 -03:00
Roborob1234
ef787a6a09 Update fn_convert_to_tanoa.sqf
Updated Tanoa map size from Altis Default and changed IRL Map edges to align with results from US FCC lat lon calculator: https://www.fcc.gov/media/radio/dms-decimal
2025-10-12 18:14:49 -05:00
18 changed files with 138 additions and 82 deletions

View File

@@ -77,6 +77,9 @@ switch (toLower worldName) do {
case "tanoa": { case "tanoa": {
_realLocation = _position call armatak_fnc_convert_to_tanoa; _realLocation = _position call armatak_fnc_convert_to_tanoa;
}; };
case "zagor_zagorsk_reserved_forest": {
_realLocation = _position call armatak_fnc_convert_to_zagor_zagorsk_reserved_forest;
};
default { default {
_warning = format ["<t color='#FF8021'>ARMATAK</t><br/> %1", "Unsupported Map"]; _warning = format ["<t color='#FF8021'>ARMATAK</t><br/> %1", "Unsupported Map"];
[[_warning, 1.5]] call CBA_fnc_notify; [[_warning, 1.5]] call CBA_fnc_notify;

View File

@@ -86,6 +86,9 @@ class CfgFunctions {
class convert_to_vr { class convert_to_vr {
file = "\armatak\armatak\addons\main\functions\map\fn_convert_to_vr.sqf"; file = "\armatak\armatak\addons\main\functions\map\fn_convert_to_vr.sqf";
}; };
class convert_to_zagor_zagorsk_reserved_forest {
file = "\armatak\armatak\addons\main\functions\map\fn_convert_to_zagor_zagorsk_reserved_forest.sqf";
};
}; };
}; };
}; };

View File

@@ -3,12 +3,12 @@ params ["_unit"];
_digitalPointer = laserTarget _unit; _digitalPointer = laserTarget _unit;
if (!isNull _digitalPointer) then { if (!isNull _digitalPointer) then {
_digitalPointerPosition = _digitalPointer call armatak_client_fnc_extractClientPosition; _digitalPointerPosition = _digitalPointer call armatak_client_fnc_extractClientPosition;
_link_uid = [_unit] call armatak_fnc_extract_uuid; _link_uid = [_unit] call armatak_fnc_extract_uuid;
_contact_callsign = ([player] call armatak_fnc_extract_unit_callsign) + ".DP1"; _contact_callsign = ([player] call armatak_fnc_extract_unit_callsign) + ".DP1";
_dpCot = [_link_uid, _contact_callsign, _digitalPointerPosition select 0, _digitalPointerPosition select 1, _digitalPointerPosition select 2]; _dpCot = [_link_uid, _contact_callsign, _digitalPointerPosition select 1, _digitalPointerPosition select 2, _digitalPointerPosition select 3];
"armatak" callExtension ["tcp_socket:send_digital_pointer_cot", [_dpCot]]; "armatak" callExtension ["tcp_socket:send_digital_pointer_cot", [_dpCot]];
}; };

View File

@@ -1,11 +1,11 @@
// function name: armatak_fnc_extract_drone // function name: armatak_fnc_send_drone_cot
// function author: Valmo // function author: Valmo
// function description: Gets the drone information for the CoT Router // function description: Gets the drone information for the CoT Router
params["_drone"]; params["_drone"];
private _atak_role = "a-f-A"; private _atak_role = "a-f-A";
private _atak_callsign = [_unit] call armatak_fnc_extract_unit_callsign; private _atak_callsign = [_drone] call armatak_fnc_extract_marker_callsign;
switch (side _drone) do { switch (side _drone) do {
case "WEST": { case "WEST": {
@@ -25,4 +25,10 @@ switch (side _drone) do {
}; };
}; };
_pre_defined_role = _drone getVariable "_atak_group_role";
if (!isNil "_pre_defined_role") then {
_callsign = _pre_defined_role;
};
_cot = [_drone, _atak_role, _atak_callsign] call armatak_fnc_send_marker_cot; _cot = [_drone, _atak_role, _atak_callsign] call armatak_fnc_send_marker_cot;

View File

@@ -0,0 +1,15 @@
// function name: armatak_fnc_send_eud_cot
// function author: Valmo
// function description: Gets the information necessary for generating the EUD Cursor Over Time
params ["_unit"];
_unit_position = _unit call armatak_client_fnc_extractClientPosition;
_uuid = _unit call armatak_fnc_extract_uuid;
_type = _unit call armatak_fnc_extract_role;
_callsign = _unit call armatak_fnc_extract_marker_callsign;
_marker_cot = [_uuid, _type, _unit_position select 1, _unit_position select 2, _unit_position select 3, _callsign, _unit_position select 5, _unit_position select 6];
"armatak" callExtension ["tcp_socket:send_marker_cot", [_marker_cot]];

View File

@@ -1,4 +1,4 @@
// function name: armatak_fnc_extract_eud_cot_info // function name: armatak_fnc_send_eud_cot
// function author: Valmo // function author: Valmo
// function description: Gets the information necessary for generating the EUD Cursor Over Time // function description: Gets the information necessary for generating the EUD Cursor Over Time
@@ -8,6 +8,5 @@ _position = _unit call armatak_client_fnc_extractClientPosition;
_uuid = _unit call armatak_fnc_extract_uuid; _uuid = _unit call armatak_fnc_extract_uuid;
_eud_cot = [_uuid, _position select 0, _position select 1, _position select 2, _callsign, _group_name, _group_role, _position select 3, speed player / 3.6]; _eud_cot = [_uuid, _position select 1, _position select 2, _position select 3, _callsign, _group_name, _group_role, _position select 5, _position select 6];
"armatak" callExtension ["tcp_socket:send_eud_cot", [_eud_cot]]; "armatak" callExtension ["tcp_socket:send_eud_cot", [_eud_cot]];

View File

@@ -8,6 +8,6 @@ _unit_position = _unit call armatak_client_fnc_extractClientPosition;
_uuid = _unit call armatak_fnc_extract_uuid; _uuid = _unit call armatak_fnc_extract_uuid;
_marker_cot = [_uuid, _type, _unit_position select 0, _unit_position select 1, _unit_position select 2, _callsign, _unit_position select 3, speed _unit / 3.6]; _marker_cot = [_uuid, _type, _unit_position select 1, _unit_position select 2, _unit_position select 3, _callsign, _unit_position select 5, _unit_position select 6];
"armatak" callExtension ["tcp_socket:send_marker_cot", [_marker_cot]]; "armatak" callExtension ["tcp_socket:send_marker_cot", [_marker_cot]];

View File

@@ -1,9 +1,10 @@
params["_unit"]; params["_unit"];
_group = group _unit;
_group_roles = ["Team Member", "Team Lead", "HQ", "Sniper", "Medic", "Forward Observer", "RTO", "K9"]; _group_roles = ["Team Member", "Team Lead", "HQ", "Sniper", "Medic", "Forward Observer", "RTO", "K9"];
_group_role = "Team Member"; _group_role = "Team Member";
if (["SpecialOperative", (configFile >> "CfgVehicles" >> typeOf _unit >> "role") call BIS_fnc_getCfgData, false] call BIS_fnc_inString) then { if (["SpecialOperative", (configOf _unit >> "role") call BIS_fnc_getCfgData, false] call BIS_fnc_inString) then {
_group_role = _group_roles select 5; _group_role = _group_roles select 5;
}; };
@@ -19,7 +20,7 @@ if (((backpack _unit) isKindOf "TFAR_Bag_Base") or (["radio", typeOf _unit, fals
_group_role = _group_roles select 6; _group_role = _group_roles select 6;
}; };
if ((["sniper", typeOf _unit, false] call BIS_fnc_inString) or (["marksman", (configFile >> "CfgVehicles" >> typeOf _unit >> "role") call BIS_fnc_getCfgData, false] call BIS_fnc_inString) or (["sharpshooter", typeOf _unit, false] call BIS_fnc_inString)) then { if ((["sniper", typeOf _unit, false] call BIS_fnc_inString) or (["marksman", (configOf _unit >> "role") call BIS_fnc_getCfgData, false] call BIS_fnc_inString) or (["sharpshooter", typeOf _unit, false] call BIS_fnc_inString)) then {
_group_role = _group_roles select 3; _group_role = _group_roles select 3;
}; };
@@ -34,7 +35,7 @@ if (["officer", typeOf _unit, false] call BIS_fnc_inString) then {
_pre_defined_role = _unit getVariable "_atak_group_role"; _pre_defined_role = _unit getVariable "_atak_group_role";
if (!isNil "_pre_defined_role") then { if (!isNil "_pre_defined_role") then {
_callsign = _pre_defined_callsign; _callsign = _pre_defined_role;
}; };
_group_role _group_role

View File

@@ -7,15 +7,15 @@ params["_unit"];
private _callsign = ""; private _callsign = "";
if ((([_unit] call BIS_fnc_objectType) select 0) == "Vehicle") then { if ((([_unit] call BIS_fnc_objectType) select 0) == "Vehicle") then {
_callsign = getText (configFile >> "CfgVehicles" >> typeOf _unit >> "displayName"); _callsign = getText (configOf _unit >> "displayName");
if (!isNull driver _unit) then { if (!isNull driver _unit) then {
_callsign = getText (configFile >> "CfgVehicles" >> typeOf _unit >> "displayName") + " | " + ([name (driver _unit)] call armatak_fnc_shorten_name); _callsign = getText (configOf _unit >> "displayName") + " | " + ([name (driver _unit)] call armatak_fnc_shorten_name);
}; };
}; };
if (unitIsUAV _unit) then { if (unitIsUAV _unit) then {
_callsign = getText (configFile >> "CfgVehicles" >> typeOf _unit >> "displayName"); _callsign = getText (configOf _unit >> "displayName");
if (isUAVConnected _unit) then { if (isUAVConnected _unit) then {
_callsign = (_callsign) + "[ON]"; _callsign = (_callsign) + "[ON]";

View File

@@ -12,7 +12,7 @@ if (roleDescription _unit != "") then {
_callsign = name _unit; _callsign = name _unit;
if (_callsign == "Error: No unit") then { if (_callsign == "Error: No unit") then {
_callsign = getText (configFile >> "CfgVehicles" >> typeOf _unit >> "displayName"); _callsign = getText (configOf _unit >> "displayName");
}; };
}; };

View File

@@ -1,3 +1,3 @@
params[_type, _message]; params["_type", "_message"];
"armatak" callExtension ["log", [_type, _message]] "armatak" callExtension ["log", [_type, _message]]

View File

@@ -1,19 +1,19 @@
params ["_longitudeInGame", "_latitudeInGame", "_altitude"]; params ["_longitudeInGame", "_latitudeInGame", "_altitude"];
private _mapWidth = 30720; private _mapWidth = 8192;
private _mapHeight = 30720; private _mapHeight = 8192;
// SW corner (used as origin) // SW corner (used as origin)
private _SW_lat = 39.456910; private _SW_lat = 39.458019;
private _SW_lon = 24.940792; private _SW_lon = 24.939314;
// SE corner // SE corner
private _SE_lat = 39.459151; private _SE_lat = 39.458019;
private _SE_lon = 25.083440; private _SE_lon = 25.081992;
// NW corner // NW corner
private _NW_lat = 39.567714; private _NW_lat = 39.568847;
private _NW_lon = 24.937866; private _NW_lon = 24.939314;
private _edgeSE_lat = _SE_lat - _SW_lat; private _edgeSE_lat = _SE_lat - _SW_lat;
private _edgeSE_lon = _SE_lon - _SW_lon; private _edgeSE_lon = _SE_lon - _SW_lon;

View File

@@ -1,19 +1,19 @@
params ["_longitudeInGame", "_latitudeInGame", "_altitude"]; params ["_longitudeInGame", "_latitudeInGame", "_altitude"];
private _mapWidth = 30720; private _mapWidth = 15360;
private _mapHeight = 30720; private _mapHeight = 15360;
// SW corner (used as origin) // SW corner (used as origin)
private _SW_lat = -19.086825; private _SW_lat = -19.086803;
private _SW_lon = 176.812772; private _SW_lon = 176.812619;
// SE corner // SE corner
private _SE_lat = -19.086825; private _SE_lat = -19.086803;
private _SE_lon = 178.687920; private _SE_lon = 178.704583;
// NW corner // NW corner
private _NW_lat = -17.196898; private _NW_lat = -17.196900;
private _NW_lon = 176.812622; private _NW_lon = 176.812619;
private _edgeSE_lat = _SE_lat - _SW_lat; private _edgeSE_lat = _SE_lat - _SW_lat;
private _edgeSE_lon = _SE_lon - _SW_lon; private _edgeSE_lon = _SE_lon - _SW_lon;

View File

@@ -0,0 +1,23 @@
params["_latitude", "_longitude", "_altitude"];
_playerPosition = [_latitude, _longitude, _altitude];
_playerLatitude = _playerPosition select 0;
_playerLongitude = _playerPosition select 1;
_playerMaxLongitude = 20480;
_playerMaxLatitude = 20480;
_MapMaxLongitude = 48.351216;
_MapMinLongitude = 48.097496;
_MapMaxLatitude = 38.345389;
_MapMinLatitude = 37.956754;
_LongitudeDifference = _MapMaxLongitude - _MapMinLongitude;
_LatitudeDifference = _MapMaxLatitude - _MapMinLatitude;
_RealLongitude = (_playerLongitude / _playerMaxLongitude) * _LongitudeDifference + _MapMinLongitude;
_RealLatitude = (_playerLatitude / _playerMaxLatitude) * _LatitudeDifference + _MapMinLatitude;
[_RealLongitude, _RealLatitude, _playerPosition select 2]

View File

@@ -21,12 +21,12 @@ if (isServer) exitWith {
_syncUnits = synchronizedObjects _logic; _syncUnits = synchronizedObjects _logic;
missionNamespace setVariable ["armatak_marked_units", _syncUnits]; missionNamespace setVariable ["armatak_server_syncedUnits", _syncUnits];
GVAR(syncedUnits) = missionNamespace getVariable "armatak_marked_units"; GVAR(syncedUnits) = missionNamespace getVariable "armatak_server_syncedUnits";
[{ [{
GVAR(syncedUnits) = missionNamespace getVariable "armatak_marked_units"; GVAR(syncedUnits) = missionNamespace getVariable "armatak_server_syncedUnits";
{ {
_objectType = _x call BIS_fnc_objectType; _objectType = _x call BIS_fnc_objectType;
@@ -45,13 +45,16 @@ if (isServer) exitWith {
[_x, _atak_type, _callsign] call armatak_fnc_send_marker_cot; [_x, _atak_type, _callsign] call armatak_fnc_send_marker_cot;
}; };
}; case ((_objectType select 0) == "VehicleAutonomous"): {
if (unitIsUAV _x) then { _atak_type = [_x] call armatak_fnc_extract_role;
[_x] call armatak_fnc_send_drone_cot; _callsign = [_x] call armatak_fnc_extract_marker_callsign;
[_x] call armatak_fnc_send_digital_pointer_cot;
[_x, _atak_type, _callsign] call armatak_fnc_send_drone_cot;
[_x] call armatak_fnc_send_digital_pointer_cot;
};
}; };
} forEach GVAR(syncedUnits); } forEach GVAR(syncedUnits);
}, 2, []] call CBA_fnc_addPerFrameHandler; }, 1, []] call CBA_fnc_addPerFrameHandler;
}; };
true; true;

View File

@@ -25,36 +25,39 @@ missionNamespace setVariable ["armatak_tcp_socket_is_running", true];
_syncUnits = []; _syncUnits = [];
missionNamespace setVariable ["armatak_marked_units", _syncUnits]; missionNamespace setVariable ["armatak_server_syncedUnits", _syncUnits];
GVAR(syncedUnits) = missionNamespace getVariable "armatak_marked_units"; GVAR(syncedUnits) = missionNamespace getVariable "armatak_server_syncedUnits";
[{ [{
GVAR(syncedUnits) = missionNamespace getVariable "armatak_marked_units"; GVAR(syncedUnits) = missionNamespace getVariable "armatak_server_syncedUnits";
{ {
_objectType = _x call BIS_fnc_objectType; _objectType = _x call BIS_fnc_objectType;
switch (true) do { switch (true) do {
case ((_objectType select 0) == "Soldier"): { case ((_objectType select 0) == "Soldier"): {
_callsign = [_x] call armatak_fnc_extract_unit_callsign; _callsign = [_x] call armatak_fnc_extract_unit_callsign;
_group_name = [group _x] call armatak_fnc_extract_group_color; _group_name = [group _x] call armatak_fnc_extract_group_color;
_group_role = [_x] call armatak_fnc_extract_group_role; _group_role = [_x] call armatak_fnc_extract_group_role;
[_x, _callsign, _group_name, _group_role] call armatak_fnc_send_eud_cot; [_x, _callsign, _group_name, _group_role] call armatak_fnc_send_eud_cot;
[_x] call armatak_fnc_send_digital_pointer_cot; [_x] call armatak_fnc_send_digital_pointer_cot;
};
case ((_objectType select 0) == "Vehicle"): {
_atak_type = [_x] call armatak_fnc_extract_role;
_callsign = [_x] call armatak_fnc_extract_marker_callsign;
[_x, _atak_type, _callsign] call armatak_fnc_send_marker_cot;
};
case ((_objectType select 0) == "VehicleAutonomous"): {
_atak_type = [_x] call armatak_fnc_extract_role;
_callsign = [_x] call armatak_fnc_extract_marker_callsign;
[_x, _atak_type, _callsign] call armatak_fnc_send_drone_cot;
[_x] call armatak_fnc_send_digital_pointer_cot;
};
}; };
case ((_objectType select 0) == "Vehicle"): { } forEach GVAR(syncedUnits);
_atak_type = [_x] call armatak_fnc_extract_role; }, 1, []] call CBA_fnc_addPerFrameHandler;
_callsign = [_x] call armatak_fnc_extract_marker_callsign;
[_x, _atak_type, _callsign] call armatak_fnc_send_marker_cot;
};
};
if (unitIsUAV _x) then {
[_x] call armatak_fnc_send_drone_cot;
[_x] call armatak_fnc_send_digital_pointer_cot;
};
} forEach GVAR(syncedUnits);
}, 2, []] call CBA_fnc_addPerFrameHandler;
deleteVehicle _logic; deleteVehicle _logic;
closeDialog 1; closeDialog 1;

View File

@@ -27,16 +27,16 @@ switch (false) do {
deleteVehicle _logic; deleteVehicle _logic;
}; };
default { default {
if (_unit in (missionNamespace getVariable ["armatak_marked_units", []])) exitWith { if (_unit in (missionNamespace getVariable ["armatak_server_syncedUnits", []])) exitWith {
["Unit already marked", "warning", "TCP Socket"] call EFUNC(main,notify); ["Unit already marked", "warning", "TCP Socket"] call EFUNC(main,notify);
deleteVehicle _logic; deleteVehicle _logic;
}; };
GVAR(syncedUnits) = missionNamespace getVariable "armatak_marked_units"; GVAR(syncedUnits) = missionNamespace getVariable "armatak_server_syncedUnits";
GVAR(syncedUnits) pushBack _unit; GVAR(syncedUnits) pushBack _unit;
missionNamespace setVariable ["armatak_marked_units", GVAR(syncedUnits)]; missionNamespace setVariable ["armatak_server_syncedUnits", GVAR(syncedUnits)];
SETVAR(_unit,GVAR(isRouting),true); SETVAR(_unit,GVAR(isRouting),true);
deleteVehicle _logic; deleteVehicle _logic;

View File

@@ -34,7 +34,7 @@ switch (false) do {
}; };
} forEach GVAR(syncedUnits); } forEach GVAR(syncedUnits);
missionNmaespace setVariable ["armatak_marked_units", GVAR(syncedUnits)]; missionNmaespace setVariable ["armatak_server_syncedUnits", GVAR(syncedUnits)];
SETVAR(_unit,GVAR(isRouting),false); SETVAR(_unit,GVAR(isRouting),false);
deleteVehicle _logic; deleteVehicle _logic;