100 Commits

Author SHA1 Message Date
0486f2a285 Added initial COT Sensor payloads to support UAV Tools integration for Arma Drones 2026-04-13 08:03:31 -03:00
753dcab26e Added hellanmaaw winter support 2026-03-31 07:23:48 -03:00
2f53488ba8 Added video url prop to 3den editor/zeus, allowing to parse __video prop to cots 2026-03-31 07:21:29 -03:00
323339e679 Removed video addon, too simple for a specific addon 2026-03-31 07:20:19 -03:00
3f14a75e81 Added video url parser to CoT types 2026-03-31 07:19:39 -03:00
469a54c141 Added Hellanmma map support 2026-03-31 07:18:23 -03:00
2ee9030c00 Updated media folder 2026-03-26 14:45:08 -03:00
5b29a40990 Improved mTLS description on readme 2026-03-26 03:47:54 -03:00
708fe5e670 Fixed CoT queue during armatak connection to the TAK Server, running soft as butter 2026-03-26 03:45:05 -03:00
e32aadda4e Splitted Connection Module 2026-03-26 01:05:54 -03:00
c35b7f0268 Updated project readme file 2026-03-24 16:56:26 -03:00
876cf900c3 Changed dialogs and module UI to get mTLS needed params 2026-03-24 16:56:19 -03:00
778ac0ac54 Added the mTLS connection calls to zeus and 3den modules 2026-03-24 16:55:53 -03:00
b816144fb0 Added transport layer and configured extension commands to call mTLS socket connection 2026-03-24 16:55:36 -03:00
61ba9f6d63 Added connector and enrollment for mTLS client certificate auto enrollment on game sessions, will MOCK a official tak client behavior when authenticating 2026-03-24 16:55:05 -03:00
f88c02a7aa formatted some rust files for linting porpuses 2026-03-24 16:44:22 -03:00
5ffc08e6f1 Readded reqwest dependency to cargo toml, will be used for TAK Server API interaction on authencated tak server connections 2026-03-24 16:41:38 -03:00
9392380c78 Added hemtt private key to git ignore 2026-03-24 16:40:58 -03:00
a18343b81d Commented video module 2026-03-24 14:03:28 -03:00
Valmo Trindade
13cd08c655 Added mandol map support 2026-01-03 02:55:39 -03:00
Valmo Trindade
8fe14dc18d Added Clafghan Map Support 2026-01-02 03:28:10 -03:00
Valmo Trindade
1bec26df8a Added UMP Colombia map support 2025-12-21 02:21:02 -03:00
Valmo Trindade
c5d5da636f added malvinas pradero ganso function call 2025-12-13 15:00:33 -03:00
Valmo Trindade
c2e137e67c Added lawn map 2025-12-13 14:59:05 -03:00
Valmo Trindade
de5ac9dbb5 Added Malvinas Maps 2025-12-12 19:12:04 -03:00
Valmo Trindade
ef3be1e768 fixed router entity remover function 2025-12-10 23:07:53 -03:00
Valmo Trindade
9bda92d389 Removed once cell dependency 2025-11-30 10:43:43 -03:00
Valmo Trindade
9763cb6697 reoganized command groups on extension call 2025-11-30 10:43:18 -03:00
Valmo Trindade
5ac49e12f8 customized sensor markers to dont cheat enemy info 2025-11-26 20:21:09 -03:00
Valmo Trindade
2108d20b01 changed default affiliation to be unkown 2025-11-26 20:20:51 -03:00
Valmo Trindade
524e7a0b3e Added vehicle sensor handler to get sensor input and throw it on ATAK 2025-11-22 12:15:15 -03:00
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
Valmo Trindade
42098401f2 Fixed syntax on ConverClientPosition function 2025-10-12 20:43:36 -03:00
Valmo Trindade
cad4aaa1a5 Added Tanoa to switch case function to manage positions 2025-10-12 20:31:00 -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
Valmo Trindade
2e017f97c9 Removed executable because brett said dont need it 2025-09-09 14:16:02 -03:00
Valmo Trindade
fbd58d9426 Removed SIMTAK apk from includes, added executable for linux 2025-09-04 11:24:29 -03:00
Valmo Trindade
894a11f087 Removed FFMPEG Video Streaming support for now, it has many variables to deal with it yet 2025-07-30 23:10:55 -03:00
Valmo Trindade
dacb38fe45 Added github action to push into production mod when a release is approved 2025-07-30 23:09:51 -03:00
Valmo Trindade
2298254e24 Changed UDP Socket bind address to match the LOCAL address and point to a LOCAL target address, this will fit 99% of the use cases and avoid many mistakes 2025-07-30 15:15:38 -03:00
Valmo Trindade
853000a5c9 fixed LFS images 2025-07-30 14:31:06 -03:00
Valmo Trindade
d0b47dd315 changed arma 3 executable to fit my linux proton installation 2025-07-30 12:48:02 -03:00
Valmo Trindade
3c9dd1bea4 removed websocket component from extension part 2025-07-16 13:18:07 -03:00
Valmo Trindade
4d89ea7bc5 removed unused dialog imports 2025-07-16 13:05:02 -03:00
Valmo Trindade
b97d13121e (WIP) refacotred video stream generator 2025-07-16 12:46:53 -03:00
Valmo Trindade
dcfdb0451c removed stop UDP Socket function because it was not implemented, and will not be soo close 2025-07-16 12:46:43 -03:00
Valmo Trindade
83b9082e87 added end of line in all files 2025-07-16 12:46:12 -03:00
Valmo Trindade
2ab83a17b9 refactored lfs objects 2025-07-12 12:17:55 -03:00
Valmo Trindade
4ae35335e2 Added fail callback UDP switch to turn of config on clientside 2025-06-25 13:10:15 -03:00
Valmo Trindade
a1bf9472ae added static video geoencoding to test KLV data 2025-06-24 19:34:08 -03:00
Valmo Trindade
15129bb344 removed useless mod metadata from addons/video config 2025-06-23 02:25:36 -03:00
Valmo Trindade
f143d80c34 added more cool mod preset 2025-06-23 02:25:22 -03:00
Valmo Trindade
e713c2f35f refactored video stream handler to handle RTSP feed on linux with multiple OS data, avoinding DRY 2025-06-19 23:44:19 -03:00
Valmo Trindade
b1fac90e78 Switched release description to match the commit tag only 2025-06-19 20:25:20 -03:00
Valmo Trindade
8341288457 Removed unused mods to hemtt launcher 2025-06-17 23:35:02 -03:00
Valmo Trindade
4ad2b2d6dd Added video feed support for Linux clients 2025-06-17 05:21:11 -03:00
Valmo Trindade
485e67120c reduce the external gps position frequency to 2Hz 2025-06-17 05:16:32 -03:00
Valmo Trindade
60f04bc4e8 added start and stop functions for the UDP Socket 2025-06-17 03:57:23 -03:00
Valmo Trindade
35742847a7 linted extract group color function and parsed colors gvar 2025-06-17 03:57:13 -03:00
Valmo Trindade
c8c2b639ea removed group info from client side, because sadly it won't work as a handler for it 2025-06-17 03:56:48 -03:00
Valmo Trindade
0453470f1f defined group colors as a init gvar 2025-06-17 03:54:56 -03:00
Valmo Trindade
d9da877da6 added ace self action to create the eud connection dialog 2025-06-17 03:43:07 -03:00
Valmo Trindade
ed2b09a5f6 defined rust as main language of the project 2025-06-17 03:42:36 -03:00
Valmo Trindade
c1198ef287 added dialog to input data for eud connection 2025-06-17 03:42:26 -03:00
Valmo Trindade
58f6d3f349 removed unused imports on server dialogs 2025-06-17 03:42:15 -03:00
Valmo Trindade
67a7fa99af removed gradle config 2025-06-17 02:23:59 -03:00
Valmo Trindade
220c56f01d Removed SIMTAK for the workflows on GH actions 2025-06-17 02:23:40 -03:00
Valmo Trindade
30be943581 FINALLY removed the SIMTAK application for my project, it was a good start, but it's time to move on and i got it native on ATAK, thanks @Andonyth for the help 2025-06-17 02:12:28 -03:00
Valmo Trindade
a859e55c1b Managed dependencies and remove many legacy features dependencies and unused stuff 2025-06-17 02:03:37 -03:00
Valmo Trindade
f491b06664 Improved callbacks for UDP sockets 2025-06-17 01:54:30 -03:00
Valmo Trindade
874686c975 changed the extractClientPosition to fit the external gps use case 2025-06-17 01:42:37 -03:00
Valmo Trindade
2a7c1b8ae8 removed websocket stuff from the functions because i can make this go to the trash can 2025-06-17 01:41:50 -03:00
Valmo Trindade
8ddbefee18 Improved callback handlers to get UDP socket stuff 2025-06-17 01:41:22 -03:00
Valmo Trindade
2b190d72c5 fixed callsign function calls on cot generators 2025-06-17 01:40:49 -03:00
Valmo Trindade
9fb8311aca Added UDP Socket, because now i can mock a external GPS on EUD and that's awesome 2025-06-17 01:40:26 -03:00
Valmo Trindade
d4f6ddb0fa linted linux block because now i actually have to care about linux 2025-06-17 01:38:43 -03:00
Valmo Trindade
0dd12a275b removed unused structs from root project 2025-06-17 01:38:12 -03:00
Valmo Trindade
c45708066e renamed tcp socket folder for a name that actually makes any sense 2025-06-17 01:37:45 -03:00
Valmo Trindade
0de4cf75e8 Added GPS CoT Structs 2025-06-17 01:37:28 -03:00
Valmo Trindade
9bb4483266 linted digital pointer structs 2025-06-16 04:27:06 -03:00
Valmo Trindade
ffc75cf4c4 added handler (personal) for the linux hemtt launch params 2025-06-16 04:26:55 -03:00
Valmo Trindade
2919805844 fixed uni callsign extraction on group cot sender 2025-06-16 04:26:15 -03:00
Valmo Trindade
f3bff2b9cf Added Kunduz Valley Map Support 2025-06-01 04:19:35 -03:00
Valmo Trindade
74cda1c9a6 fixed extract position call on laser marker 2025-06-01 03:19:47 -03:00
Valmo Trindade
6c667d69b8 improved router entity add and remove function 2025-05-28 00:32:57 -03:00
Valmo Trindade
5f62304965 change if hell to switchcase on 3denCoremodule config func 2025-05-28 00:32:37 -03:00
Valmo Trindade
082831951e change if hell to switchcase on callback handlers func 2025-05-28 00:32:20 -03:00
Valmo Trindade
645a16394b change if hell to switchcase on zeusCoremodule config func 2025-05-28 00:32:00 -03:00
193 changed files with 4316 additions and 5077 deletions

2
.gitattributes vendored
View File

@@ -1,3 +1,5 @@
*.rs linguist-language=Rust
*.paa filter=lfs diff=lfs merge=lfs -text
*.p3d filter=lfs diff=lfs merge=lfs -text
*.jpeg filter=lfs diff=lfs merge=lfs -text

View File

@@ -5,32 +5,6 @@ on:
branches: [ main ]
jobs:
package_application:
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v4
with:
lfs: true
- name: set up JDK 11
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'zulu'
cache: gradle
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle
run: ./gradlew assembleDebug
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: simtak
path: app/build/outputs/apk/debug/app-debug.apk
if-no-files-found: error
retention-days: 1
build_extension:
strategy:
matrix:
@@ -66,7 +40,7 @@ jobs:
retention-days: 1
package:
needs: [build_extension, package_application]
needs: [build_extension]
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
@@ -88,11 +62,6 @@ jobs:
with:
name: x86_64-unknown-linux-gnu
- run: mv ./libarmatak.so ./armatak_x64.so
- name: Download Android Application Installer
uses: actions/download-artifact@v4
with:
name: simtak
- run: mv ./app-debug.apk ./simtak.apk
- name: Setup HEMTT
uses: arma-actions/hemtt@v1
- name: Build

View File

@@ -5,32 +5,6 @@ on:
branches: [ main ]
jobs:
package_application:
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v4
with:
lfs: true
- name: set up JDK 11
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'zulu'
cache: gradle
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle
run: ./gradlew assembleDebug
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: simtak
path: app/build/outputs/apk/debug/app-debug.apk
if-no-files-found: error
retention-days: 1
build_extension:
strategy:
matrix:
@@ -66,7 +40,7 @@ jobs:
retention-days: 1
package:
needs: [build_extension, package_application]
needs: [build_extension]
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
@@ -88,11 +62,6 @@ jobs:
with:
name: x86_64-unknown-linux-gnu
- run: mv ./libarmatak.so ./armatak_x64.so
- name: Download Android Application Installer
uses: actions/download-artifact@v4
with:
name: simtak
- run: mv ./app-debug.apk ./simtak.apk
- name: Setup HEMTT
uses: arma-actions/hemtt@v1
- name: Build

View File

@@ -9,31 +9,6 @@ permissions:
contents: write
jobs:
package_application:
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v4
with:
lfs: true
- name: Set up JDK 11
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'zulu'
cache: gradle
- name: Grant execute permission for gradlew
run: chmod +x gradlew
- name: Build with Gradle
run: ./gradlew assembleDebug
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: simtak
path: app/build/outputs/apk/debug/app-debug.apk
if-no-files-found: error
retention-days: 1
build_extension:
strategy:
matrix:
@@ -69,7 +44,7 @@ jobs:
retention-days: 1
package:
needs: [build_extension, package_application]
needs: [build_extension]
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
@@ -91,11 +66,6 @@ jobs:
with:
name: x86_64-unknown-linux-gnu
- run: mv ./libarmatak.so ./armatak_x64.so
- name: Download Android Application Installer
uses: actions/download-artifact@v4
with:
name: simtak
- run: mv ./app-debug.apk ./simtak.apk
- name: Setup HEMTT
uses: arma-actions/hemtt@v1
- name: Build
@@ -121,7 +91,7 @@ jobs:
release_name: ${{ github.ref }}
body: |
Changes in this release:
${{ env.COMMIT_MESSAGES }}
${{ github.event.head_commit.message }}
draft: true
prerelease: false
- name: Upload Release Asset

View File

@@ -0,0 +1,79 @@
name: Publish Production
on:
release:
types: [published]
jobs:
build_extension:
strategy:
matrix:
os_target:
- { os: "windows-latest", target: "i686-pc-windows-msvc", artifact: "armatak.dll", name: "armatak.dll" }
- { os: "windows-latest", target: "x86_64-pc-windows-msvc", artifact: "armatak.dll", name: "armatak_x64.dll" }
- { os: "ubuntu-latest", target: "x86_64-unknown-linux-gnu", artifact: "libarmatak.so", name: "armatak.so" }
runs-on: ${{ matrix.os_target.os }}
steps:
- name: Checkout Repo
uses: actions/checkout@v4
with:
lfs: true
- name: Install Rust Toolchain
uses: actions-rs/toolchain@v1
with:
target: ${{ matrix.os_target.target }}
toolchain: stable
default: true
- name: Install Dependencies (Linux only)
if: matrix.os_target.os == 'ubuntu-latest'
run: sudo apt-get update && sudo apt-get install -y build-essential
- name: Cargo Build
run: cargo build --release --target ${{ matrix.os_target.target }}
- name: check stuff
run: ls target/release
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.os_target.target }}
path: target/${{ matrix.os_target.target }}/release/${{ matrix.os_target.artifact }}
if-no-files-found: error
retention-days: 1
package:
needs: [build_extension]
runs-on: ubuntu-latest
steps:
- name: Checkout Repo
uses: actions/checkout@v4
with:
lfs: true
- run: mkdir -p ./target/release
- name: Download Windows x64 Artifact
uses: actions/download-artifact@v4
with:
name: x86_64-pc-windows-msvc
- run: mv ./armatak.dll ./armatak_x64.dll
- name: Download Windows x86 Artifact
uses: actions/download-artifact@v4
with:
name: i686-pc-windows-msvc
- name: Download Linux x64 Artifact
uses: actions/download-artifact@v4
with:
name: x86_64-unknown-linux-gnu
- run: mv ./libarmatak.so ./armatak_x64.so
- name: Setup HEMTT
uses: arma-actions/hemtt@v1
- name: Build
run: hemtt release
- name: Extract Zipped Mod
run: unzip releases/armatak-latest.zip -d releases
- uses: arma-actions/workshop-upload@v1
with:
appId: '107410'
itemId: ${{ secrets.STEAM_WORKSHOP_PROD_ID }}
contentPath: releases/@armatak
changelog: 'Update'
env:
STEAM_USERNAME: ${{ secrets.STEAM_USERNAME }}
STEAM_PASSWORD: ${{ secrets.STEAM_PASSWORD }}

3
.gitignore vendored
View File

@@ -3,6 +3,7 @@
hemtt
hemtt.exe
*.biprivatekey
.hemttprivatekey
source/
.vscode
releases/
@@ -87,4 +88,4 @@ target/
.cxx
local.properties
*.apk
*.apk

View File

@@ -25,8 +25,7 @@ include = [
"LICENSE",
"*.dll",
"*.so",
"*.paa",
"simtak.apk"
"*.paa"
]
[properties]
@@ -38,30 +37,31 @@ preset = "Hemtt"
[hemtt.launch.default]
workshop = [
"450814997", # CBA
"450814997", # CBA_A3
"463939057", # ACE
"623475643", # 3den enhanced
"1779063631", # Zeus enhanced
"1673595418", # User Input Menus
"1678581937", # Extended Function Viewer
"1231625987", #Debug Console
"751965892", # ACRE2
"2522638637", # ACE Extended Arsenal
"333310405", # Enhanced Movement
"2034363662", # Enhanced Movement Rework
"2941986336", # Hatchet Interaction Framework - Stable Version
"1745501605", # Hatchet H-60 pack - Stable Version
"843577117", # RHSUSAF
"3030830594", # Western Dusk
"843425103", # RHSAFRF
"843632231", # RHSSAF
"843593391", # RHSGREF
"1673456286", # 3CB Factions
"623475643", # 3den Enhanced
"2257686620", # Blastcore Murr Edition
"583496184", # CUP Terrains - Core
"3078351739", # Kunduz River
"1858075458", # LAMBS_Danger.fsm
"1808238502", # LAMBS_Suppression
"3425368881", # M4A1_URGI
"2268351256", # Tier One Weapons
"583496184", # CUP Terrains
"583544987", # CUP Maps
"3015795970", # No zoom
"2941986336", # Hatchet Framework
"1745501605", # Hatchet H-60 Pack
"333310405", # Enhanced Moviments
"2034363662", # Enhanced Moviments Rework
"2257686620", # Blastcore Murr
"3407948300", # JSRS Sound Mod
"2560276469", # Restrict Markers
"3493557838" # Ballad of the Green Berets
]
mission = "armatak_jtac.Mountains_ACR"
parameters = [
"-skipIntro",
"-noSplash",

1895
Cargo.lock generated

File diff suppressed because it is too large Load Diff

View File

@@ -6,21 +6,14 @@ edition = "2021"
[dependencies]
arma-rs = "1.10.4"
chrono = "0.4.39"
futures = "0.3.31"
futures-util = "0.3.31"
http = "1.1.0"
lazy_static = "1.5.0"
log = "0.4.22"
log4rs = "1.3.0"
once_cell = "1.19.0"
qrcode = "0.14.1"
regex = "1.10.6"
reqwest = { version = "0.12.7", features = ["blocking"] }
reqwest = { version = "0.12.15", default-features = false, features = ["blocking", "json", "rustls-tls"] }
rcgen = { version = "0.13.2", default-features = false, features = ["crypto", "pem", "aws_lc_rs"] }
rustls = "0.23.23"
rustls-pemfile = "2.2.0"
serde = { version = "1.0.210", features = ["derive"] }
serde_json = "1.0.128"
tokio = { version = "1.40", features = ["full"] }
tokio-tungstenite = "0.24.0"
ws = "0.9.2"
[dependencies.uuid]
version = "1.10.0"

View File

@@ -4,6 +4,10 @@
ARMATAK is a server side Arma 3 addons for streaming unit positions to TAK Clients in sessions on real locations maps. It can be runned both as a clientside mod or a serverside mod, when runned serverside, it will create a TCP Socket connection between Arma 3 and the TAK Server, sending the game session information into it. When used clientside, Arma 3 will host a websocket server that you can connect to your phone and mock the phone's location to the player's in game location.
The server-side CoT router supports two transports:
- Plain TCP, for legacy TAK ingress.
- Mutual TLS, using the TAK Server authentication API, so the Arma session can publish as an authenticated TAK device on port `8089`.
## Get in Touch
[Join the Discord Server for ARMATAK!](https://discord.gg/svK64PCycU)

View File

@@ -1,2 +1,3 @@
PREP(convertClientLocation);
PREP(extractClientPosition);
PREP(startUDPSocket);

View File

@@ -4,11 +4,5 @@ if (!hasInterface) exitWith {};
_local_address = "armatak" callExtension ["local_ip", []] select 0;
"armatak" callExtension ["websocket:start", []];
SETVAR(player,GVAR(localAddress),_local_address);
SETVAR(player,GVAR(eudConnected),false);
[{
"armatak" callExtension ["websocket:location", [player call armatak_client_fnc_extractClientPosition]];
}, 1, []] call CBA_fnc_addPerFrameHandler;

View File

@@ -6,4 +6,4 @@ PREP_RECOMPILE_START;
#include "XEH_PREP.hpp"
PREP_RECOMPILE_END;
ADDON = true;
ADDON = true;

View File

@@ -1,3 +1,3 @@
#include "script_component.hpp"
#include "XEH_PREP.hpp"
#include "XEH_PREP.hpp"

View File

@@ -16,4 +16,20 @@ class CfgPatches {
};
};
#include "CfgEventHandlers.hpp"
class CfgVehicles {
class Man;
class CAManBase: Man {
class ACE_SelfActions {
class danceParty {
displayName = "Connect to EUD";
condition = "!(player getVariable ['armatak_client_eudConnected', false])";
exceptions[] = {};
statement = "createDialog 'armatak_udp_socket_start_dialog'";
icon = "";
};
};
};
};
#include "CfgEventHandlers.hpp"
#include "dialog.hpp"

73
addons/client/dialog.hpp Normal file
View File

@@ -0,0 +1,73 @@
class RscText;
class RscBackground;
class RscButton;
class RscEdit;
class armatak_udp_socket_start_dialog {
idd = 999091;
movingEnable = 0;
class ControlsBackground {
class armatak_gui_module_udp_socket_dialog_main_frame: RscBackground {
idc = 16960;
x = "0.386562 * safezoneW + safezoneX";
y = "0.401 * safezoneH + safezoneY";
w = "0.216563 * safezoneW";
h = "0.242 * safezoneH";
colorBackground[]={0,0,0,0.45};
};
};
class Controls {
class armatak_gui_module_udp_socket_dialog_address_edit: RscEdit {
idc = 16961;
text = "168.15.0.3";
x = "0.391719 * safezoneW + safezoneX";
y = "0.445 * safezoneH + safezoneY";
w = "0.20625 * safezoneW";
h = "0.044 * safezoneH";
colorBackground[]={0,0,0,0.5};
};
class armatak_gui_module_udp_socket_dialog_address_port_edit: RscEdit {
idc = 16962;
text = "4349";
x = "0.391719 * safezoneW + safezoneX";
y = "0.522 * safezoneH + safezoneY";
w = "0.20625 * safezoneW";
h = "0.044 * safezoneH";
colorBackground[]={0,0,0,0.5};
};
class armatak_gui_module_udp_socket_dialog_address_text: RscText {
idc = 16963;
text = "Phone's Socket Local Address";
x = "0.391719 * safezoneW + safezoneX";
y = "0.412 * safezoneH + safezoneY";
w = "0.20625 * safezoneW";
h = "0.033 * safezoneH";
};
class armatak_gui_module_udp_socket_dialog_address_port_text: RscText {
idc = 16964;
text = "Phone's Socket Local Port";
x = "0.391719 * safezoneW + safezoneX";
y = "0.489 * safezoneH + safezoneY";
w = "0.20625 * safezoneW";
h = "0.033 * safezoneH";
};
class armatak_gui_module_udp_socket_dialog_address_button_cancel: RscButton {
idc = 16965;
text = "Cancel";
action = "closeDialog 2;";
x = "0.551563 * safezoneW + safezoneX";
y = "0.577 * safezoneH + safezoneY";
w = "0.0464063 * safezoneW";
h = "0.055 * safezoneH";
};
class armatak_gui_module_udp_socket_dialog_address_button_ok: RscButton {
idc = 16966;
text = "Ok";
action = QUOTE(call FUNC(startUDPSocket));
x = "0.5 * safezoneW + safezoneX";
y = "0.577 * safezoneH + safezoneY";
w = "0.0464063 * safezoneW";
h = "0.055 * safezoneH";
};
};
};

View File

@@ -1,23 +1,23 @@
#include "..\script_component.hpp"
/*
* Author: Valmo Trindade
* This function is used to convert the position of a unit to the world world location.
*
* Argument:
* 0: in game latitude <NUMBER> is the latitude of the unit.
* 1: in game longitude <NUMBER> is the longitude of the unit.
* 2: in game altitude <NUMBER> is the altitude of the unit.
* 3: in game bearing <NUMBER> is the bearing of the unit.
*
* Return Value:
* ARRAY -> [latitude, longitude, altitude, bearing]
*
* Example:
* [player] call armatak_client_fnc_convertClientLocation;
*
* Public: Yes
*/
* Author: Valmo Trindade
* This function is used to convert the position of a unit to the world world location.
*
* Argument:
* 0: in game latitude <NUMBER> is the latitude of the unit.
* 1: in game longitude <NUMBER> is the longitude of the unit.
* 2: in game altitude <NUMBER> is the altitude of the unit.
* 3: in game bearing <NUMBER> is the bearing of the unit.
*
* Return Value:
* ARRAY -> [latitude, longitude, altitude, bearing]
*
* Example:
* [player] call armatak_client_fnc_convertClientLocation;
*
* Public: Yes
*/
params["_latitude", "_longitude", "_altitude"];
@@ -38,6 +38,9 @@ switch (toLower worldName) do {
case "vr": {
_realLocation = _position call armatak_fnc_convert_to_vr;
};
case "lawn": {
_realLocation = _position call armatak_fnc_convert_to_lawn;
};
case "cucui": {
_realLocation = _position call armatak_fnc_convert_to_cucui;
};
@@ -71,6 +74,45 @@ switch (toLower worldName) do {
case "kunduz": {
_realLocation = _position call armatak_fnc_convert_to_kunduz;
};
case "kunduz_valley": {
_realLocation = _position call armatak_fnc_convert_to_kunduz_valley;
};
case "malvinasfalkands": {
_realLocation = _position call armatak_fnc_convert_to_malvinas_malvinasfalkands;
};
case "pebble_island_airfield": {
_realLocation = _position call armatak_fnc_convert_to_malvinas_pebble_island_airfield;
};
case "p_argentino_stanley": {
_realLocation = _position call armatak_fnc_convert_to_malvinas_p_argentino_stanley;
};
case "top_malo_house": {
_realLocation = _position call armatak_fnc_convert_to_malvinas_top_malo_house;
};
case "pradera_ganso": {
_realLocation = _position call armatak_fnc_convert_to_malvinas_pradera_ganso;
};
case "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;
};
case "umb_colombia": {
_realLocation = _position call armatak_fnc_convert_to_colombia;
};
case "clafghan": {
_realLocation = _position call armatak_fnc_convert_to_clafghan;
};
case "rut_mandol": {
_realLocation = _position call armatak_fnc_convert_to_rut_mandol;
};
case "hellanmaa": {
_realLocation = _position call armatak_fnc_convert_to_hellanmaa;
};
case "hellanmaaw": {
_realLocation = _position call armatak_fnc_convert_to_hellanmaa;
};
default {
_warning = format ["<t color='#FF8021'>ARMATAK</t><br/> %1", "Unsupported Map"];
[[_warning, 1.5]] call CBA_fnc_notify;
@@ -79,4 +121,4 @@ switch (toLower worldName) do {
};
};
_realLocation
_realLocation

View File

@@ -18,13 +18,12 @@
params["_unit"];
private _location = (getPos _unit) call FUNC(convertClientLocation);
private _uuid = _unit call armatak_fnc_extract_uuid;
private _pos = (getPos _unit) call FUNC(convertClientLocation);
private _callsign = _unit call armatak_fnc_extract_unit_callsign;
private _bearing = parseNumber ((getDir _unit) toFixed 0);
private _speed = speed _unit / 3.6;
private _atak_latitude = _location select 0;
private _atak_longitude = _location select 1;
private _atak_altitude = _location select 2;
private _atak_bearing = parseNumber ((getDir _unit) toFixed 0);
_payload = [_uuid, _pos select 0, _pos select 1, _pos select 2, _callsign, _bearing, _speed, _callsign];
_unit_info = [_atak_latitude,_atak_longitude,_atak_altitude,_atak_bearing];
_unit_info
_payload

View File

@@ -0,0 +1,31 @@
#include "..\script_component.hpp"
params ["_logic"];
_socket_is_running = player getVariable [QGVAR(eudConnected), false];
if (_socket_is_running) exitWith {
["Socket is already running", "error", "UDP Socket"] call EFUNC(main,notify);
closeDialog 1;
};
disableSerialization;
_udp_socket_instance_address = ctrlText 16961;
_udp_socket_instance_port = ctrlText 16962;
_udp_socket_fulladdress = ((_udp_socket_instance_address) + ":" + (_udp_socket_instance_port));
player setVariable [QGVAR(udp_socket_address), _udp_socket_fulladdress];
player setVariable [QGVAR(eudConnected), true];
"armatak" callExtension ["udp_socket:start", [_udp_socket_fulladdress]];
[{
if (player getVariable [QGVAR(eudConnected), false]) then {
"armatak" callExtension ["udp_socket:send_gps_cot", [player call FUNC(extractClientPosition)]];
};
}, 0.5, []] call CBA_fnc_addPerFrameHandler;
deleteVehicle _logic;
closeDialog 1;

View File

@@ -78,6 +78,16 @@ class Cfg3den {
condition = "objectVehicle";
typeName = "STRING";
};
class armatak_attribute_video_url {
displayName = "Video URL (RTSP)";
tooltip = "RTSP stream URL for UAS Tool integration. When set, the drone will appear in the ATAK UAS Tool with FOV cone and video feed. Format: rtsp://address:port/path (e.g. rtsp://192.168.1.10:8554/live/drone1). Leave empty to disable UAS Tool integration for this entity.";
property = "armatak_attribute_video_url";
control = "Edit";
expression = "_this setVariable ['armatak_attribute_video_url',_value]";
defaultValue = "''";
condition = "objectVehicle";
typeName = "STRING";
};
};
};
};
@@ -157,4 +167,4 @@ class Cfg3den {
};
};
};
};
};

View File

@@ -10,12 +10,21 @@ class CfgFunctions {
class send_group_cots {
file = "\armatak\armatak\addons\main\functions\api\fn_send_group_cots.sqf";
};
class send_enemy_cot {
file = "\armatak\armatak\addons\main\functions\api\fn_send_enemy_cot.sqf";
};
class send_eud_cot {
file = "\armatak\armatak\addons\main\functions\api\fn_send_eud_cot.sqf";
};
class send_marker_cot {
file = "\armatak\armatak\addons\main\functions\api\fn_send_marker_cot.sqf";
};
class send_uas_video_cot {
file = "\armatak\armatak\addons\main\functions\api\fn_send_uas_video_cot.sqf";
};
class send_uas_sensor_cot {
file = "\armatak\armatak\addons\main\functions\api\fn_send_uas_sensor_cot.sqf";
};
class stop_tcp_socket {
file = "\armatak\armatak\addons\main\functions\api\fn_stop_tcp_socket.sqf";
};
@@ -31,6 +40,9 @@ class CfgFunctions {
class extract_role {
file = "\armatak\armatak\addons\main\functions\extract_data\fn_extract_role.sqf";
};
class extract_sensor_data {
file = "\armatak\armatak\addons\main\functions\extract_data\fn_extract_sensor_data.sqf";
};
class extract_unit_callsign {
file = "\armatak\armatak\addons\main\functions\extract_data\fn_extract_unit_callsign.sqf";
};
@@ -59,12 +71,33 @@ class CfgFunctions {
class convert_to_kunduz {
file = "\armatak\armatak\addons\main\functions\map\fn_convert_to_kunduz.sqf";
};
class convert_to_kunduz_valley {
file = "\armatak\armatak\addons\main\functions\map\fn_convert_to_kunduz_valley.sqf";
};
class convert_to_lawn {
file = "\armatak\armatak\addons\main\functions\map\fn_convert_to_lawn.sqf";
};
class convert_to_livonia {
file = "\armatak\armatak\addons\main\functions\map\fn_convert_to_livonia.sqf";
};
class convert_to_malden {
file = "\armatak\armatak\addons\main\functions\map\fn_convert_to_malden.sqf";
};
class convert_to_malvinas_malvinasfalkands {
file = "\armatak\armatak\addons\main\functions\map\fn_convert_to_malvinas_malvinasfalkands.sqf";
};
class convert_to_malvinas_p_argentino_stanley {
file = "\armatak\armatak\addons\main\functions\map\fn_convert_to_malvinas_p_argentino_stanley.sqf";
};
class convert_to_malvinas_pebble_island_airfield {
file = "\armatak\armatak\addons\main\functions\map\fn_convert_to_malvinas_pebble_island_airfield.sqf";
};
class convert_to_malvinas_pradera_ganso {
file = "\armatak\armatak\addons\main\functions\map\fn_convert_to_malvinas_pradera_ganso.sqf";
};
class convert_to_malvinas_top_malo_house {
file = "\armatak\armatak\addons\main\functions\map\fn_convert_to_malvinas_top_malo_house.sqf";
};
class convert_to_southen_sahrani {
file = "\armatak\armatak\addons\main\functions\map\fn_convert_to_southen_sahrani.sqf";
};
@@ -83,6 +116,18 @@ class CfgFunctions {
class convert_to_vr {
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";
};
class convert_to_colombia {
file = "\armatak\armatak\addons\main\functions\map\fn_convert_to_colombia.sqf";
};
class convert_to_clafghan {
file = "\armatak\armatak\addons\main\functions\map\fn_convert_to_clafghan.sqf";
};
class convert_to_rut_mandol {
file = "\armatak\armatak\addons\main\functions\map\fn_convert_to_rut_mandol.sqf";
};
};
};
};
};

View File

@@ -1,2 +1,2 @@
PREP(logMessage);
PREP(notify);
PREP(notify);

View File

@@ -3,41 +3,59 @@
addMissionEventHandler ["ExtensionCallback", {
params ["_name", "_function", "_data"];
if (_name == "WEBSOCKET") then {
[_function, "success", _name] call FUNC(notify);
switch (_name) do {
case "UDP SOCKET": {
[_function, "success", _name] call FUNC(notify);
switch (_function) do {
case "EUD connected": {
SETVAR(player,EGVAR(client,eudConnected),true);
switch (_function) do {
case "EUD Connected": {
SETVAR(player,EGVAR(client,eudConnected),true);
};
case "EUD Disconnected": {
SETVAR(player,EGVAR(client,eudConnected),false);
};
default {};
};
case "EUD disconnected": {
SETVAR(player,GVAR(eudConnected),false);
};
case "UDP SOCKET WARNING": {
[_function, "warning", "UDP Socket"] call FUNC(notify);
};
case "UDP SOCKET ERROR": {
[_function, "error", _name] call FUNC(notify);
if (_function == "UDP Socket is not running") then {
SETVAR(player,EGVAR(client,eudConnected),false);
};
default {};
if (_function == "failed to bind UDP socket") then {
SETVAR(player,EGVAR(client,eudConnected),false);
};
};
case "TCP SOCKET": {
[_function, "success", _name] call FUNC(notify);
};
case "TCP SOCKET ERROR": {
_message = _function;
if (_data isNotEqualTo "") then {
_message = format ["%1: %2", _function, _data];
};
[_message, "error", _name] call FUNC(notify);
};
case "VIDEO": {
[_function, "success", _name] call FUNC(notify);
};
case "VIDEO ERROR": {
[_function, "error", _name] call FUNC(notify);
SETVAR(player,EGVAR(video,isStreaming),false);
};
default {
"armatak" callExtension ["log",["error", (_name + _function + _data)]];
};
};
}];
if (_name == "WEBSOCKET WARNING") then {
[_function, "warning", "WEBSOCKET"] call FUNC(notify);
};
GVAR(group_colors) = ["White", "Yellow", "Orange", "Magenta", "Red", "Maroon", "Purple", "DarkBlue", "Blue", "Cyan", "Teal", "Green", "DarkGreen", "Brown"];
if (_name == "WEBSOCKET ERROR") then {
[_function, "error", _name] call FUNC(notify);
};
if (_name == "TCP SOCKET") then {
[_function, "success", _name] call FUNC(notify);
};
if (_name == "TCP SOCKET ERROR") then {
[_function, "error", _name] call FUNC(notify);
};
if (_name == "VIDEO") then {
[_function, "success", _name] call FUNC(notify);
};
if (_name == "VIDEO ERROR") then {
[_function, "error", _name] call FUNC(notify);
};
}];
missionNamespace setVariable [QGVAR(group_colors), GVAR(group_colors)];

View File

@@ -6,4 +6,4 @@ PREP_RECOMPILE_START;
#include "XEH_PREP.hpp"
PREP_RECOMPILE_END;
ADDON = true;
ADDON = true;

View File

@@ -1,3 +1,3 @@
#include "script_component.hpp"
#include "XEH_PREP.hpp"
#include "XEH_PREP.hpp"

View File

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

View File

@@ -1,11 +1,11 @@
// function name: armatak_fnc_extract_drone
// function name: armatak_fnc_send_drone_cot
// function author: Valmo
// function description: Gets the drone information for the CoT Router
params["_drone"];
private _atak_role = "a-f-A";
private _atak_callsign = [_unit] call armatak_fnc_extract_callsign;
private _atak_callsign = [_drone] call armatak_fnc_extract_marker_callsign;
switch (side _drone) do {
case "WEST": {
@@ -25,4 +25,13 @@ switch (side _drone) do {
};
};
_cot = [_drone, _atak_role, _atak_callsign] call armatak_fnc_send_marker_cot;
_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;
[_drone] call armatak_fnc_send_uas_video_cot;
[_drone] call armatak_fnc_send_uas_sensor_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:cot:marker", [_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 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;
_eud_cot = [_uuid, _position select 0, _position select 1, _position select 2, _callsign, _group_name, _group_role, _position select 3, speed player / 3.6];
"armatak" callExtension ["tcp_socket:send_eud_cot", [_eud_cot]];
_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:cot:eud", [_eud_cot]];

View File

@@ -5,9 +5,9 @@
params["_group"];
{
_callsign = [_x] call armatak_fnc_extract_callsign;
_callsign = [_x] call armatak_fnc_extract_unit_callsign;
_group_name = [_group] call armatak_fnc_extract_group_color;
_group_role = [_x] call armatak_fnc_extract_group_role;
[_x, _callsign, _group_name, _group_role] call armatak_fnc_send_eud_cot;
} forEach (units _group);
} forEach (units _group);

View File

@@ -5,9 +5,10 @@
params ["_unit", "_type", "_callsign"];
_unit_position = _unit call armatak_client_fnc_extractClientPosition;
_video_url = [_unit] call armatak_fnc_extract_marker_video_url;
_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, _video_url];
"armatak" callExtension ["tcp_socket:send_marker_cot", [_marker_cot]];
"armatak" callExtension ["tcp_socket:cot:marker", [_marker_cot]];

View File

@@ -0,0 +1,55 @@
// function name: armatak_fnc_send_uas_sensor_cot
// function author: Valmo / ArmaTAK contributors
// function description:
// Sends a b-m-p-s-p-loc CoT event every router tick (1 s) for a drone.
// This is the "sensor position" event consumed by the ATAK UAS Tool to:
// - Draw the FOV cone on the moving map.
// - Compute four-corners for AR marker overlay on the video feed.
// - Show the SPoI (Sensor Point of Interest) crosshair.
//
// The event references the drone's b-i-v video endpoint via the drone UUID,
// so armatak_fnc_send_uas_video_cot must also be called for the same drone.
//
// Exits silently when "armatak_attribute_video_url" is not set, which keeps
// the behavior identical to the old fn_send_drone_cot for drones without a
// configured video stream.
//
// Arguments:
// 0: _drone <OBJECT> The drone object.
//
// Return value: none
params ["_drone"];
private _video_url = _drone getVariable ["armatak_attribute_video_url", ""];
if (_video_url == "") exitWith {};
private _uuid = _drone call armatak_fnc_extract_uuid;
private _sensor_uid = _uuid + "-sensor";
private _callsign = [_drone] call armatak_fnc_extract_marker_callsign;
private _pos = (getPos _drone) call armatak_client_fnc_convertClientLocation;
private _lat = _pos select 0;
private _lon = _pos select 1;
private _hae = _pos select 2;
private _azimuth = parseNumber ((getDir _drone) toFixed 0);
private _allTurrets = [_drone, false] call BIS_fnc_allTurrets;
if (count _allTurrets > 0) then {
private _firstTurretPath = _allTurrets select 0;
private _turretWeapons = _drone weaponsTurret _firstTurretPath;
if (_turretWeapons isNotEqualTo []) then {
private _tDir = _drone weaponDirection (_turretWeapons select 0);
if (!((_tDir select 0) == 0 && (_tDir select 1) == 0)) then {
_azimuth = round (((_tDir select 0) atan2 (_tDir select 1) + 360) mod 360);
};
};
};
private _fov = _drone getVariable ["armatak_uas_fov", 60];
private _range = round (((getPosATL _drone) select 2) max 1);
private _payload = [_sensor_uid, _uuid, _callsign, _lat, _lon, _hae, _azimuth, _fov, _range];
"armatak" callExtension ["tcp_socket:cot:uas_sensor", [_payload]];

View File

@@ -0,0 +1,30 @@
// function name: armatak_fnc_send_uas_video_cot
// function author: Valmo / ArmaTAK contributors
// function description:
// Sends a b-i-v CoT event that declares the RTSP video endpoint for a drone.
// The ATAK UAS Tool picks this up and shows the drone in its UAS list with
// the associated video feed available for playback.
//
// The drone entity MUST have the variable "armatak_attribute_video_url" set
// to a valid RTSP URL, e.g.:
// _drone setVariable ["armatak_attribute_video_url", "rtsp://192.168.1.10:8554/live/drone1"];
// or via the 3DEN attribute "Video URL (RTSP)" in the ARMA Team Awareness Kit
// attribute category.
//
// If the variable is absent or empty the function exits silently.
//
// Arguments:
// 0: _drone <OBJECT> The drone object.
//
// Return value: none
params ["_drone"];
private _video_url = _drone getVariable ["armatak_attribute_video_url", ""];
if (_video_url == "") exitWith {};
private _uuid = _drone call armatak_fnc_extract_uuid;
private _callsign = [_drone] call armatak_fnc_extract_marker_callsign;
private _payload = [_uuid, _callsign, _video_url];
"armatak" callExtension ["tcp_socket:cot:uas_video", [_payload]];

View File

@@ -7,4 +7,4 @@ if (_armatak_tcp_socket_is_running) then {
} else {
_warning = format ["<t color='#FF0021'>ARMATAK</t><br/> %1", "There is no TCP Socket running to be stopped"];
[[_warning, 1.5]] call CBA_fnc_notify;
};
};

View File

@@ -1,9 +1,11 @@
#include "..\..\script_component.hpp"
params["_group"];
_group_name = _group getVariable "_atak_group_name";
_group_name = _group getVariable QGVAR(group_name);
if (isNil "_group_name") then {
_group_colors = missionNamespace getVariable "armatak_group_colors";
_group_colors = missionNamespace getVariable QGVAR(group_colors);
_group_name = selectRandom _group_colors;
if (count _group_colors > 0) then {
@@ -14,12 +16,12 @@ if (isNil "_group_name") then {
_group_colors deleteAt _randomIndex;
_group_name = _selectedColor;
_group setVariable ["_atak_group_name", _group_name];
missionNamespace setVariable ["armatak_group_colors", _group_colors]
_group setVariable [QGVAR(group_name), _group_name];
missionNamespace setVariable [QGVAR(group_colors), _group_colors]
} else {
_group_name = "Red";
_group setVariable ["_atak_group_name", _group_name];
_group setVariable [QGVAR(group_name), _group_name];
};
};
_group_name
_group_name

View File

@@ -1,9 +1,10 @@
params["_unit"];
_group = group _unit;
_group_roles = ["Team Member", "Team Lead", "HQ", "Sniper", "Medic", "Forward Observer", "RTO", "K9"];
_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;
};
@@ -19,7 +20,7 @@ if (((backpack _unit) isKindOf "TFAR_Bag_Base") or (["radio", typeOf _unit, fals
_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;
};
@@ -34,7 +35,7 @@ if (["officer", typeOf _unit, false] call BIS_fnc_inString) then {
_pre_defined_role = _unit getVariable "_atak_group_role";
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 = "";
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 {
_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 {
_callsign = getText (configFile >> "CfgVehicles" >> typeOf _unit >> "displayName");
_callsign = getText (configOf _unit >> "displayName");
if (isUAVConnected _unit) then {
_callsign = (_callsign) + "[ON]";
@@ -30,4 +30,4 @@ if (!isNil "armatak_attribute_marker_callsign" or armatak_attribute_marker_calls
_callsign = armatak_attribute_marker_callsign;
};
_callsign
_callsign

View File

@@ -0,0 +1,13 @@
// function name: armatak_fnc_extract_marker_video_url
// function author: Codex
// function description: Gets the marker video URL configured in 3DEN for a vehicle
params ["_unit"];
private _videoUrl = _unit getVariable ["armatak_attribute_marker_video_url", ""];
if (isNil "_videoUrl") exitWith {
""
};
_videoUrl

View File

@@ -7,8 +7,15 @@ params["_unit"];
private _affiliation = "f";
private _type = "G";
private _role = "a-f-G-U-C-I";
switch (str side _unit) do {
private _side = side _unit;
if (isNil {
_unit getVariable "armatak_current_side"
}) then {
_side = _unit getVariable "armatak_current_side";
};
switch (str _side) do {
case "WEST": {
_affiliation = "f";
};
@@ -22,7 +29,7 @@ switch (str side _unit) do {
_affiliation = "u";
};
default {
_affiliation = "f";
_affiliation = "u";
};
};
@@ -110,11 +117,10 @@ if ((typeOf (vehicle _unit) != typeOf _unit) or ((_unit_type select 0) == "Vehic
_role = "a-" + _affiliation + "-" + _type;
armatak_attribute_marker_type = _unit getVariable "armatak_attribute_marker_type";
if (!isNil "armatak_attribute_marker_type" or armatak_attribute_marker_type != '') then {
_role = armatak_attribute_marker_type;
};
_role
_role

View File

@@ -0,0 +1,27 @@
params["_unit"];
_target = getSensorTargets (_unit);
{
_unit = _x select 0;
_position = _x select 1;
_status = _x select 2;
if (isNil {
_unit getVariable "armatak_current_side"
}) then {
_unit setVariable ["armatak_current_side", side _unit];
};
if (_status != "destroyed" && !(_unit in armatak_server_syncedUnits)) then {
_unit_position = _unit call armatak_client_fnc_extractClientPosition;
_uuid = _unit call armatak_fnc_extract_uuid;
_type = _unit call armatak_fnc_extract_role;
_callsign = getText (configOf _unit >> "displayName");
_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:cot:marker", [_marker_cot]];
};
} forEach _target;

View File

@@ -12,14 +12,18 @@ if (roleDescription _unit != "") then {
_callsign = name _unit;
if (_callsign == "Error: No unit") then {
_callsign = getText (configFile >> "CfgVehicles" >> typeOf _unit >> "displayName");
_callsign = getText (configOf _unit >> "displayName");
};
};
if (side _unit == east) then {
_callsign = getText (configOf _unit >> "displayName");
};
armatak_attribute_unit_callsign = _unit getVariable "armatak_attribute_unit_callsign";
if (!isNil "armatak_attribute_unit_callsign" or armatak_attribute_unit_callsign != '') then {
_callsign = armatak_attribute_unit_callsign;
};
_callsign
_callsign

View File

@@ -11,4 +11,4 @@ if (isNil "_uuid") then {
_unit setVariable ["_atak_uid", _uuid];
};
_uuid
_uuid

View File

@@ -14,4 +14,4 @@ if (_nameCount == 1) then {
} else {
format ["%1 %2", _firstName select [0, 1], _lastName]
};
};
};

View File

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

View File

@@ -18,4 +18,4 @@ switch (_type) do {
default {
systemChat format ["%1 - %2", _title, _message];
};
};
};

View File

@@ -27,4 +27,4 @@ private _fy = _latitudeInGame / _mapHeight;
private _realLat = _SW_lat + (_fx * _edgeSE_lat) + (_fy * _edgeNW_lat);
private _realLon = _SW_lon + (_fx * _edgeSE_lon) + (_fy * _edgeNW_lon);
[_realLat, _realLon, _altitude]
[_realLat, _realLon, _altitude]

View File

@@ -27,4 +27,4 @@ private _fy = _latitudeInGame / _mapHeight;
private _realLat = _SW_lat + (_fx * _edgeSE_lat) + (_fy * _edgeNW_lat);
private _realLon = _SW_lon + (_fx * _edgeSE_lon) + (_fy * _edgeNW_lon);
[_realLat, _realLon, _altitude]
[_realLat, _realLon, _altitude]

View File

@@ -27,4 +27,4 @@ private _fy = _latitudeInGame / _mapHeight;
private _realLat = _SW_lat + (_fx * _edgeSE_lat) + (_fy * _edgeNW_lat);
private _realLon = _SW_lon + (_fx * _edgeSE_lon) + (_fy * _edgeNW_lon);
[_realLat, _realLon, _altitude]
[_realLat, _realLon, _altitude]

View File

@@ -27,4 +27,4 @@ private _fy = _latitudeInGame / _mapHeight;
private _realLat = _SW_lat + (_fx * _edgeSE_lat) + (_fy * _edgeNW_lat);
private _realLon = _SW_lon + (_fx * _edgeSE_lon) + (_fy * _edgeNW_lon);
[_realLat, _realLon, _altitude]
[_realLat, _realLon, _altitude]

View File

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

View File

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

View File

@@ -27,4 +27,4 @@ private _fy = _latitudeInGame / _mapHeight;
private _realLat = _SW_lat + (_fx * _edgeSE_lat) + (_fy * _edgeNW_lat);
private _realLon = _SW_lon + (_fx * _edgeSE_lon) + (_fy * _edgeNW_lon);
[_realLat, _realLon, _altitude]
[_realLat, _realLon, _altitude]

View File

@@ -0,0 +1,30 @@
params ["_longitudeInGame", "_latitudeInGame", "_altitude"];
private _mapWidth = 8192;
private _mapHeight = 8192;
// SW corner (used as origin)
private _SW_lat = 63.005389;
private _SW_lon = 22.638957;
// SE corner
private _SE_lat = 63.010092;
private _SE_lon = 22.800107;
// NW corner
private _NW_lat = 63.078713;
private _NW_lon = 22.628542;
private _edgeSE_lat = _SE_lat - _SW_lat;
private _edgeSE_lon = _SE_lon - _SW_lon;
private _edgeNW_lat = _NW_lat - _SW_lat;
private _edgeNW_lon = _NW_lon - _SW_lon;
private _fx = _longitudeInGame / _mapWidth;
private _fy = _latitudeInGame / _mapHeight;
private _realLat = _SW_lat + (_fx * _edgeSE_lat) + (_fy * _edgeNW_lat);
private _realLon = _SW_lon + (_fx * _edgeSE_lon) + (_fy * _edgeNW_lon);
[_realLat, _realLon, _altitude]

View File

@@ -27,4 +27,4 @@ private _fy = _latitudeInGame / _mapHeight;
private _realLat = _SW_lat + (_fx * _edgeSE_lat) + (_fy * _edgeNW_lat);
private _realLon = _SW_lon + (_fx * _edgeSE_lon) + (_fy * _edgeNW_lon);
[_realLat, _realLon, _altitude]
[_realLat, _realLon, _altitude]

View File

@@ -0,0 +1,30 @@
params ["_longitudeInGame", "_latitudeInGame", "_altitude"];
private _mapWidth = 10240;
private _mapHeight = 10240;
// SW corner (used as origin)
private _SW_lat = 36.547662;
private _SW_lon = 68.802314;
// SE corner
private _SE_lat = 36.547662;
private _SE_lon = 68.916671;
// NW corner
private _NW_lat = 36.639935;
private _NW_lon = 68.802314;
private _edgeSE_lat = _SE_lat - _SW_lat;
private _edgeSE_lon = _SE_lon - _SW_lon;
private _edgeNW_lat = _NW_lat - _SW_lat;
private _edgeNW_lon = _NW_lon - _SW_lon;
private _fx = _longitudeInGame / _mapWidth;
private _fy = _latitudeInGame / _mapHeight;
private _realLat = _SW_lat + (_fx * _edgeSE_lat) + (_fy * _edgeNW_lat);
private _realLon = _SW_lon + (_fx * _edgeSE_lon) + (_fy * _edgeNW_lon);
[_realLat, _realLon, _altitude]

View File

@@ -0,0 +1,23 @@
params["_latitude", "_longitude", "_altitude"];
_playerPosition = [_latitude, _longitude, _altitude];
_playerLatitude = _playerPosition select 0;
_playerLongitude = _playerPosition select 1;
_playerMaxLongitude = 4992;
_playerMaxLatitude = 4992;
_MapMaxLongitude = -99.722665;
_MapMinLongitude = -99.775505;
_MapMaxLatitude = 32.159272;
_MapMinLatitude = 32.114011;
_LongitudeDifference = _MapMaxLongitude - _MapMinLongitude;
_LatitudeDifference = _MapMaxLatitude - _MapMinLatitude;
_RealLongitude = (_playerLongitude / _playerMaxLongitude) * _LongitudeDifference + _MapMinLongitude;
_RealLatitude = (_playerLatitude / _playerMaxLatitude) * _LatitudeDifference + _MapMinLatitude;
[_RealLongitude, _RealLatitude, _playerPosition select 2]

View File

@@ -27,4 +27,4 @@ private _fy = _latitudeInGame / _mapHeight;
private _realLat = _SW_lat + (_fx * _edgeSE_lat) + (_fy * _edgeNW_lat);
private _realLon = _SW_lon + (_fx * _edgeSE_lon) + (_fy * _edgeNW_lon);
[_realLat, _realLon, _altitude]
[_realLat, _realLon, _altitude]

View File

@@ -20,4 +20,4 @@ _LatitudeDifference = _MapMaxLatitude - _MapMinLatitude;
_RealLongitude = (_playerLongitude / _playerMaxLongitude) * _LongitudeDifference + _MapMinLongitude;
_RealLatitude = (_playerLatitude / _playerMaxLatitude) * _LatitudeDifference + _MapMinLatitude;
[_RealLongitude, _RealLatitude, _playerPosition select 2]
[_RealLongitude, _RealLatitude, _playerPosition select 2]

View File

@@ -0,0 +1,30 @@
params ["_longitudeInGame", "_latitudeInGame", "_altitude"];
private _mapWidth = 11264;
private _mapHeight = 11264;
// SW corner (used as origin)
private _SW_lat = -51.736078;
private _SW_lon = -57.915032;
// SE corner
private _SE_lat = -51.736078;
private _SE_lon = -58.077879;
// NW corner
private _NW_lat = -51.634750;
private _NW_lon = -58.077879;
private _edgeSE_lat = _SE_lat - _SW_lat;
private _edgeSE_lon = _SE_lon - _SW_lon;
private _edgeNW_lat = _NW_lat - _SW_lat;
private _edgeNW_lon = _NW_lon - _SW_lon;
private _fx = _longitudeInGame / _mapWidth;
private _fy = _latitudeInGame / _mapHeight;
private _realLat = _SW_lat + (_fx * _edgeSE_lat) + (_fy * _edgeNW_lat);
private _realLon = _SW_lon + (_fx * _edgeSE_lon) + (_fy * _edgeNW_lon);
[_realLat, _realLon, _altitude]

View File

@@ -0,0 +1,30 @@
params ["_longitudeInGame", "_latitudeInGame", "_altitude"];
private _mapWidth = 16384;
private _mapHeight = 16384;
// SW corner (used as origin)
private _SW_lat = -51.806546;
private _SW_lon = -57.939747;
// SE corner
private _SE_lat = -51.806546;
private _SE_lon = -57.701978;
// NW corner
private _NW_lat = -51.658913;
private _NW_lon = -57.939747;
private _edgeSE_lat = _SE_lat - _SW_lat;
private _edgeSE_lon = _SE_lon - _SW_lon;
private _edgeNW_lat = _NW_lat - _SW_lat;
private _edgeNW_lon = _NW_lon - _SW_lon;
private _fx = _longitudeInGame / _mapWidth;
private _fy = _latitudeInGame / _mapHeight;
private _realLat = _SW_lat + (_fx * _edgeSE_lat) + (_fy * _edgeNW_lat);
private _realLon = _SW_lon + (_fx * _edgeSE_lon) + (_fy * _edgeNW_lon);
[_realLat, _realLon, _altitude]

View File

@@ -0,0 +1,30 @@
params ["_longitudeInGame", "_latitudeInGame", "_altitude"];
private _mapWidth = 10240;
private _mapHeight = 10240;
// SW corner (used as origin)
private _SW_lat = -51.863358;
private _SW_lon = -59.054585;
// SE corner
private _SE_lat = -51.863358;
private _SE_lon = -58.906155;
// NW corner
private _NW_lat = -51.771493;
private _NW_lon = -59.054585;
private _edgeSE_lat = _SE_lat - _SW_lat;
private _edgeSE_lon = _SE_lon - _SW_lon;
private _edgeNW_lat = _NW_lat - _SW_lat;
private _edgeNW_lon = _NW_lon - _SW_lon;
private _fx = _longitudeInGame / _mapWidth;
private _fy = _latitudeInGame / _mapHeight;
private _realLat = _SW_lat + (_fx * _edgeSE_lat) + (_fy * _edgeNW_lat);
private _realLon = _SW_lon + (_fx * _edgeSE_lon) + (_fy * _edgeNW_lon);
[_realLat, _realLon, _altitude]

View File

@@ -0,0 +1,23 @@
params["_latitude", "_longitude", "_altitude"];
_playerPosition = [_latitude, _longitude, _altitude];
_playerLatitude = _playerPosition select 0;
_playerLongitude = _playerPosition select 1;
_playerMaxLongitude = 5120;
_playerMaxLatitude = 5120;
_MapMaxLatitude = -51.619725;
_MapMinLatitude = -51.664223;
_MapMaxLongitude = -58.394630;
_MapMinLongitude = -58.469580;
_LongitudeDifference = _MapMaxLongitude - _MapMinLongitude;
_LatitudeDifference = _MapMaxLatitude - _MapMinLatitude;
_RealLongitude = (_playerLongitude / _playerMaxLongitude) * _LongitudeDifference + _MapMinLongitude;
_RealLatitude = (_playerLatitude / _playerMaxLatitude) * _LatitudeDifference + _MapMinLatitude;
[_RealLongitude, _RealLatitude, _playerPosition select 2]

View File

@@ -0,0 +1,23 @@
params["_latitude", "_longitude", "_altitude"];
_playerPosition = [_latitude, _longitude, _altitude];
_playerLatitude = _playerPosition select 0;
_playerLongitude = _playerPosition select 1;
_playerMaxLatitude = 32768;
_playerMaxLongitude = 32768;
_MapMaxLongitude = 35.285485;
_MapMinLongitude = 34.927617;
_MapMaxLatitude = 70.445404;
_MapMinLatitude = 70.016783;
_LongitudeDifference = _MapMaxLongitude - _MapMinLongitude;
_LatitudeDifference = _MapMaxLatitude - _MapMinLatitude;
_RealLongitude = (_playerLongitude / _playerMaxLongitude) * _LongitudeDifference + _MapMinLongitude;
_RealLatitude = (_playerLatitude / _playerMaxLatitude) * _LatitudeDifference + _MapMinLatitude;
[_RealLongitude, _RealLatitude, _playerPosition select 2]

View File

@@ -27,4 +27,4 @@ private _fy = _latitudeInGame / _mapHeight;
private _realLat = _SW_lat + (_fx * _edgeSE_lat) + (_fy * _edgeNW_lat);
private _realLon = _SW_lon + (_fx * _edgeSE_lon) + (_fy * _edgeNW_lon);
[_realLat, _realLon, _altitude]
[_realLat, _realLon, _altitude]

View File

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

View File

@@ -20,4 +20,4 @@ _LatitudeDifference = _MapMaxLatitude - _MapMinLatitude;
_RealLongitude = (_playerLongitude / _playerMaxLongitude) * _LongitudeDifference + _MapMinLongitude;
_RealLatitude = (_playerLatitude / _playerMaxLatitude) * _LatitudeDifference + _MapMinLatitude;
[_RealLongitude, _RealLatitude, _playerPosition select 2]
[_RealLongitude, _RealLatitude, _playerPosition select 2]

View File

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

View File

@@ -27,4 +27,4 @@ private _fy = _latitudeInGame / _mapHeight;
private _realLat = _SW_lat + (_fx * _edgeSE_lat) + (_fy * _edgeNW_lat);
private _realLon = _SW_lon + (_fx * _edgeSE_lon) + (_fy * _edgeNW_lon);
[_realLat, _realLon, _altitude]
[_realLat, _realLon, _altitude]

View File

@@ -27,4 +27,4 @@ private _fy = _latitudeInGame / _mapHeight;
private _realLat = _SW_lat + (_fx * _edgeSE_lat) + (_fy * _edgeNW_lat);
private _realLon = _SW_lon + (_fx * _edgeSE_lon) + (_fy * _edgeNW_lon);
[_realLat, _realLon, _altitude]
[_realLat, _realLon, _altitude]

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

@@ -29,4 +29,4 @@
#define EXTENSION_NAME QUOTE(armatak)
#define CALLEXT(var) EXTENSION_NAME callExtension [QUOTE(var),[]]
#define CALLEXTP(var1, var2) EXTENSION_NAME callExtension [QUOTE(var1), var2] select 0
#define CALLEXTP(var1, var2) EXTENSION_NAME callExtension [QUOTE(var1), var2] select 0

View File

@@ -1,4 +1,4 @@
#define build 0
#define major 1
#define minor 1
#define patch 0
#define patch 0

View File

@@ -8,4 +8,4 @@ class Extended_PreInit_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_SCRIPT(XEH_preInit));
};
};
};

View File

@@ -1,42 +1,28 @@
class CfgVehicles {
class Logic;
class Module_F : Logic
{
class AttributesBase
{
class Default;
class Logic;
class Module_F : Logic {
class AttributesBase {
class Edit;
class Combo;
class Checkbox;
class CheckboxNumber;
class ModuleDescription;
class Units;
};
class ModuleDescription
{
class AnyBrain;
};
class ModuleDescription;
};
class GVAR(moduleBase): Module_F {
author = PROJECT_AUTHOR;
category = QEGVAR(main,moduleCategory);
function = QUOTE({});
functionPriority = 1;
isGlobal = 1;
isTriggerActivated = 0;
scope = 1;
scopeCurator = 2;
};
author = PROJECT_AUTHOR;
category = QEGVAR(main,moduleCategory);
function = QUOTE({});
functionPriority = 1;
isGlobal = 1;
isTriggerActivated = 0;
scope = 1;
scopeCurator = 2;
};
class GVAR(coreModule): GVAR(moduleBase) {
scope = 2;
class GVAR(connectionModuleBase): GVAR(moduleBase) {
scopeCurator = 0;
displayname = "CoT Router";
icon = "\a3\Modules_F_Curator\Data\iconRadio_ca.paa";
category = QEGVAR(main,moduleCategory);
function = QFUNC(3denCoreModuleConfig);
functionPriority = 1;
isGlobal = 0;
isTriggerActivated = 1;
@@ -47,19 +33,25 @@ class CfgVehicles {
canSetArea = 0;
canSetAreaShape = 0;
canSetAreaHeight = 0;
};
class GVAR(tcpModule): GVAR(connectionModuleBase) {
scope = 2;
displayName = "CoT Router (TCP)";
function = QFUNC(3denTcpModuleConfig);
class Attributes: AttributesBase {
class GVAR(moduleInstanceAddress): Edit {
property = QGVAR(moduleInstanceAddress);
displayname = "TAK Server Address";
tooltip = "TAK Server Instance Address";
displayName = "TAK Server Address";
tooltip = "Hostname or IP address for the TAK or IronTAK server.";
typeName = "STRING";
defaultValue = "localhost";
defaultValue = "'localhost'";
};
class GVAR(moduleInstancePort): Edit {
property = QGVAR(moduleInstancePort);
displayname = "TAK Server TCP Port";
tooltip = "TAK Server instance Port for TCP connection";
displayName = "TAK Server TCP Port";
tooltip = "Port for the unauthenticated TCP socket.";
typeName = "NUMBER";
defaultValue = "8088";
};
@@ -67,24 +59,75 @@ class CfgVehicles {
};
class ModuleDescription: ModuleDescription {
description = "Generate the initial ARMATAK configuration, syncronizing all players to the TAK server instance";
description = "Connect ArmaTAK to a TAK server over plain TCP.";
sync[] = {"LocationArea_F"};
};
};
class GVAR(coreModuleCurator): GVAR(coreModule) {
class GVAR(enrollModule): GVAR(connectionModuleBase) {
scope = 2;
displayName = "CoT Router (Authenticated)";
function = QFUNC(3denEnrollModuleConfig);
class Attributes: AttributesBase {
class GVAR(moduleInstanceAddress): Edit {
property = QGVAR(moduleInstanceAddress);
displayname = "TAK Server Address";
tooltip = "Hostname or IP address used for enrollment and the final TLS connection.";
typeName = "STRING";
defaultValue = "'localhost'";
};
class GVAR(moduleEnrollmentPort): Edit {
property = QGVAR(moduleEnrollmentPort);
displayName = "Enrollment HTTPS Port";
tooltip = "Port used for GET /Marti/api/tls/config and POST /Marti/api/tls/signClient/v2.";
typeName = "NUMBER";
defaultValue = "8446";
};
class GVAR(moduleEnrollmentUsername): Edit {
property = QGVAR(moduleEnrollmentUsername);
displayName = "Enrollment Username";
tooltip = "Username used in Basic Auth for client certificate enrollment.";
typeName = "STRING";
defaultValue = "''";
};
class GVAR(moduleEnrollmentPassword): Edit {
property = QGVAR(moduleEnrollmentPassword);
displayName = "Enrollment Password";
tooltip = "Password used in Basic Auth for client certificate enrollment.";
typeName = "STRING";
defaultValue = "''";
};
class ModuleDescription: ModuleDescription {};
};
class ModuleDescription: ModuleDescription {
description = "Enroll a client certificate and connect ArmaTAK over mTLS.";
sync[] = {"LocationArea_F"};
};
};
class GVAR(tcpModuleCurator): GVAR(tcpModule) {
scope = 1;
scopeCurator = 2;
function = "";
displayName = "CoT Router (Zeus)";
curatorInfoType = "armatak_zeus_core_module_dialog";
displayName = "CoT Router (TCP, Zeus)";
curatorInfoType = "armatak_zeus_tcp_module_dialog";
};
class GVAR(enrollModuleCurator): GVAR(enrollModule) {
scope = 1;
scopeCurator = 2;
function = "";
displayName = "CoT Router (Authenticated, Zeus)";
curatorInfoType = "armatak_zeus_enroll_module_dialog";
};
class GVAR(markEntity): GVAR(moduleBase) {
curatorCanAttach = 1;
category = QEGVAR(main,moduleCategory);
curatorCanAttach = 1;
category = QEGVAR(main,moduleCategory);
displayname = "Mark Entity";
function = QFUNC(routerEntityAdd);
icon = "\a3\Modules_F_Curator\Data\iconRadio_ca.paa";
};
};
function = QFUNC(routerEntityAdd);
icon = "\a3\Modules_F_Curator\Data\iconRadio_ca.paa";
};
};

View File

@@ -1,4 +1,7 @@
PREP(3denCoreModuleConfig);
PREP(3denEnrollModuleConfig);
PREP(3denTcpModuleConfig);
PREP(routerEntityAdd);
PREP(routerEntityRemove);
PREP(ZeusCoreModuleConfig);
PREP(startCotRouter);
PREP(ZeusEnrollModuleConfig);
PREP(ZeusTcpModuleConfig);

View File

@@ -6,4 +6,4 @@ PREP_RECOMPILE_START;
#include "XEH_PREP.hpp"
PREP_RECOMPILE_END;
ADDON = true;
ADDON = true;

View File

@@ -1,3 +1,3 @@
#include "script_component.hpp"
#include "XEH_PREP.hpp"
#include "XEH_PREP.hpp"

View File

@@ -4,8 +4,10 @@ class CfgPatches {
class ADDON {
name = COMPONENT_NAME;
units[] = {
QGVAR(coreModule),
QGVAR(coreModuleCurator),
QGVAR(tcpModule),
QGVAR(tcpModuleCurator),
QGVAR(enrollModule),
QGVAR(enrollModuleCurator),
QGVAR(markEntity)
};
weapons[] = {};
@@ -22,4 +24,4 @@ class CfgPatches {
#include "CfgEventHandlers.hpp"
#include "dialog.hpp"
#include "CfgVehicles.hpp"
#include "CfgVehicles.hpp"

View File

@@ -1,104 +1,174 @@
class RscObject;
class RscText;
class RscFrame;
class RscLine;
class RscProgress;
class RscPicture;
class RscBackground;
class RscPictureKeepAspect;
class RscVideo;
class RscHTML;
class RscButton;
class RscShortcutButton;
class RscEdit;
class RscCombo;
class RscListBox;
class RscListNBox;
class RscXListBox;
class RscTree;
class RscSlider;
class RscXSliderH;
class RscActiveText;
class RscActivePicture;
class RscActivePictureKeepAspect;
class RscStructuredText;
class RscToolbox;
class RscControlsGroup;
class RscControlsGroupNoScrollbars;
class RscControlsGroupNoHScrollbars;
class RscControlsGroupNoVScrollbars;
class RscButtonTextOnly;
class RscButtonMenu;
class RscButtonMenuOK;
class RscButtonMenuCancel;
class RscButtonMenuSteam;
class RscMapControl;
class RscMapControlEmpty;
class RscCheckBox;
class armatak_zeus_core_module_dialog {
class armatak_zeus_tcp_module_dialog {
idd = 999991;
movingEnable = 0;
class ControlsBackground {
class armatak_gui_module_zeus_core_dialog_main_frame: RscBackground {
class main_frame: RscBackground {
idc = 1800;
x = "0.386562 * safezoneW + safezoneX";
y = "0.401 * safezoneH + safezoneY";
y = "0.29 * safezoneH + safezoneY";
w = "0.216563 * safezoneW";
h = "0.242 * safezoneH";
colorBackground[]={0,0,0,0.45};
h = "0.32 * safezoneH";
colorBackground[] = {0,0,0,0.45};
};
};
class Controls {
class armatak_gui_module_zeus_core_dialog_address_edit: RscEdit {
idc = 14000;
text = "localhost";
x = "0.391719 * safezoneW + safezoneX";
y = "0.445 * safezoneH + safezoneY";
w = "0.20625 * safezoneW";
h = "0.044 * safezoneH";
colorBackground[]={0,0,0,0.5};
};
class armatak_gui_module_zeus_core_dialog_address_port_edit: RscEdit {
idc = 14001;
text = "8088";
x = "0.391719 * safezoneW + safezoneX";
y = "0.522 * safezoneH + safezoneY";
w = "0.20625 * safezoneW";
h = "0.044 * safezoneH";
colorBackground[]={0,0,0,0.5};
};
class armatak_gui_module_zeus_core_dialog_address_text: RscText {
class address_text: RscText {
idc = 1000;
text = "TAK Server Address";
x = "0.391719 * safezoneW + safezoneX";
y = "0.412 * safezoneH + safezoneY";
y = "0.332 * safezoneH + safezoneY";
w = "0.20625 * safezoneW";
h = "0.033 * safezoneH";
};
class armatak_gui_module_zeus_core_dialog_address_port_text: RscText {
class address_edit: RscEdit {
idc = 14000;
text = "localhost";
x = "0.391719 * safezoneW + safezoneX";
y = "0.365 * safezoneH + safezoneY";
w = "0.20625 * safezoneW";
h = "0.044 * safezoneH";
colorBackground[] = {0,0,0,0.5};
};
class port_text: RscText {
idc = 1001;
text = "TAK Server Port";
x = "0.391719 * safezoneW + safezoneX";
y = "0.489 * safezoneH + safezoneY";
y = "0.425 * safezoneH + safezoneY";
w = "0.20625 * safezoneW";
h = "0.033 * safezoneH";
};
class armatak_gui_module_zeus_core_dialog_address_button_cancel: RscButton {
class port_edit: RscEdit {
idc = 14001;
text = "8088";
x = "0.391719 * safezoneW + safezoneX";
y = "0.458 * safezoneH + safezoneY";
w = "0.20625 * safezoneW";
h = "0.044 * safezoneH";
colorBackground[] = {0,0,0,0.5};
};
class button_cancel: RscButton {
idc = 1601;
text = "Cancel";
action = "closeDialog 2;";
x = "0.551563 * safezoneW + safezoneX";
y = "0.577 * safezoneH + safezoneY";
y = "0.535 * safezoneH + safezoneY";
w = "0.0464063 * safezoneW";
h = "0.055 * safezoneH";
};
class armatak_gui_module_zeus_core_dialog_address_button_ok: RscButton {
class button_ok: RscButton {
idc = 1600;
text = "Ok";
action = QUOTE(call FUNC(zeusCoreModuleConfig));
action = QUOTE(call FUNC(ZeusTcpModuleConfig));
x = "0.5 * safezoneW + safezoneX";
y = "0.577 * safezoneH + safezoneY";
y = "0.535 * safezoneH + safezoneY";
w = "0.0464063 * safezoneW";
h = "0.055 * safezoneH";
};
};
};
class armatak_zeus_enroll_module_dialog {
idd = 999992;
movingEnable = 0;
class ControlsBackground {
class main_frame: RscBackground {
idc = 1810;
x = "0.386562 * safezoneW + safezoneX";
y = "0.2 * safezoneH + safezoneY";
w = "0.216563 * safezoneW";
h = "0.52 * safezoneH";
colorBackground[] = {0,0,0,0.45};
};
};
class Controls {
class address_text: RscText {
idc = 1010;
text = "TAK Server Address";
x = "0.391719 * safezoneW + safezoneX";
y = "0.242 * safezoneH + safezoneY";
w = "0.20625 * safezoneW";
h = "0.033 * safezoneH";
};
class address_edit: RscEdit {
idc = 14100;
text = "localhost";
x = "0.391719 * safezoneW + safezoneX";
y = "0.275 * safezoneH + safezoneY";
w = "0.20625 * safezoneW";
h = "0.044 * safezoneH";
colorBackground[] = {0,0,0,0.5};
};
class enroll_port_text: RscText {
idc = 1011;
text = "Enrollment HTTPS Port";
x = "0.391719 * safezoneW + safezoneX";
y = "0.335 * safezoneH + safezoneY";
w = "0.20625 * safezoneW";
h = "0.033 * safezoneH";
};
class enroll_port_edit: RscEdit {
idc = 14101;
text = "8446";
x = "0.391719 * safezoneW + safezoneX";
y = "0.368 * safezoneH + safezoneY";
w = "0.20625 * safezoneW";
h = "0.044 * safezoneH";
colorBackground[] = {0,0,0,0.5};
};
class username_text: RscText {
idc = 1012;
text = "Enrollment Username";
x = "0.391719 * safezoneW + safezoneX";
y = "0.428 * safezoneH + safezoneY";
w = "0.20625 * safezoneW";
h = "0.033 * safezoneH";
};
class username_edit: RscEdit {
idc = 14102;
text = "";
x = "0.391719 * safezoneW + safezoneX";
y = "0.461 * safezoneH + safezoneY";
w = "0.20625 * safezoneW";
h = "0.044 * safezoneH";
colorBackground[] = {0,0,0,0.5};
};
class password_text: RscText {
idc = 1013;
text = "Enrollment Password";
x = "0.391719 * safezoneW + safezoneX";
y = "0.521 * safezoneH + safezoneY";
w = "0.20625 * safezoneW";
h = "0.033 * safezoneH";
};
class password_edit: RscEdit {
idc = 14103;
text = "";
x = "0.391719 * safezoneW + safezoneX";
y = "0.554 * safezoneH + safezoneY";
w = "0.20625 * safezoneW";
h = "0.044 * safezoneH";
colorBackground[] = {0,0,0,0.5};
};
class button_cancel: RscButton {
idc = 1611;
text = "Cancel";
action = "closeDialog 2;";
x = "0.551563 * safezoneW + safezoneX";
y = "0.645 * safezoneH + safezoneY";
w = "0.0464063 * safezoneW";
h = "0.055 * safezoneH";
};
class button_ok: RscButton {
idc = 1610;
text = "Ok";
action = QUOTE(call FUNC(ZeusEnrollModuleConfig));
x = "0.5 * safezoneW + safezoneX";
y = "0.645 * safezoneH + safezoneY";
w = "0.0464063 * safezoneW";
h = "0.055 * safezoneH";
};
@@ -110,7 +180,7 @@ class armatak_zeus_custom_marker_dialog {
movingEnable = 0;
class Controls {
class RscFrame_1800: RscFrame
class RscFrame_1800: RscBackground
{
idc = 1800;
x = "0.37625 * safezoneW + safezoneX";
@@ -171,4 +241,4 @@ class armatak_zeus_custom_marker_dialog {
h = "0.055 * safezoneH";
};
};
};
};

View File

@@ -1,56 +0,0 @@
#include "..\script_component.hpp"
params [
["_logic", objNull, [objNull]],
["_units", [], [[]]],
["_activated", true, [true]]
];
if (isServer) exitWith {
["Connecting to TCP Socket", "success", "TCP Socket"] call EFUNC(main,notify);
_tak_server_instance_address = _logic getVariable QGVAR(moduleInstanceAddress);
_tak_server_instance_port = _logic getVariable QGVAR(moduleInstancePort);
_tak_server_fulladdress = _tak_server_instance_address + ":" + (str _tak_server_instance_port);
missionNamespace setVariable ["armatak_server_instance", _tak_server_fulladdress];
missionNamespace setVariable ["armatak_tcp_socket_is_running", true];
missionNamespace setVariable ["armatak_group_colors", ["White", "Yellow", "Orange", "Magenta", "Red", "Maroon", "Purple", "DarkBlue", "Blue", "Cyan", "Teal", "Green", "DarkGreen", "Brown"]];
"armatak" callExtension ["tcp_socket:start", [_tak_server_fulladdress]];
_syncUnits = synchronizedObjects _logic;
missionNamespace setVariable ["armatak_marked_units", _syncUnits];
GVAR(syncedUnits) = missionNamespace getVariable "armatak_marked_units";
[{
GVAR(syncedUnits) = missionNamespace getVariable "armatak_marked_units";
{
_objectType = _x call BIS_fnc_objectType;
if ((_objectType select 0) == "Soldier") then {
_callsign = [_x] call armatak_fnc_extract_unit_callsign;
_group_name = [group _x] call armatak_fnc_extract_group_color;
_group_role = [_x] call armatak_fnc_extract_group_role;
[_x, _callsign, _group_name, _group_role] call armatak_fnc_send_eud_cot;
[_x] call armatak_fnc_send_digital_pointer_cot;
};
if ((_objectType select 0) == "Vehicle") then {
_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;
};
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;
};
true;

View File

@@ -0,0 +1,37 @@
#include "..\script_component.hpp"
params [
["_logic", objNull, [objNull]],
["_units", [], [[]]],
["_activated", true, [true]]
];
if (isServer) exitWith {
if (missionNamespace getVariable ["armatak_tcp_socket_is_running", false]) exitWith {
["Socket was called twice", "error", "TCP Socket"] call EFUNC(main,notify);
};
["Connecting to authenticated TAK socket", "success", "TCP Socket"] call EFUNC(main,notify);
_tak_server_instance_address = _logic getVariable [QGVAR(moduleInstanceAddress), "localhost"];
_tak_server_enrollment_port = _logic getVariable [QGVAR(moduleEnrollmentPort), 8446];
_tak_server_enrollment_username = _logic getVariable [QGVAR(moduleEnrollmentUsername), ""];
_tak_server_enrollment_password = _logic getVariable [QGVAR(moduleEnrollmentPassword), ""];
"armatak" callExtension [
"tcp_socket:start_enroll_mtls",
[
_tak_server_instance_address,
_tak_server_instance_address,
str _tak_server_enrollment_port,
_tak_server_enrollment_username,
_tak_server_enrollment_password,
""
]
];
missionNamespace setVariable ["armatak_server_syncedUnits", synchronizedObjects _logic];
_tak_server_instance_address call FUNC(startCotRouter);
};
true

View File

@@ -0,0 +1,26 @@
#include "..\script_component.hpp"
params [
["_logic", objNull, [objNull]],
["_units", [], [[]]],
["_activated", true, [true]]
];
if (isServer) exitWith {
if (missionNamespace getVariable ["armatak_tcp_socket_is_running", false]) exitWith {
["Socket was called twice", "error", "TCP Socket"] call EFUNC(main,notify);
};
["Connecting to TCP Socket", "success", "TCP Socket"] call EFUNC(main,notify);
_tak_server_instance_address = _logic getVariable [QGVAR(moduleInstanceAddress), "localhost"];
_tak_server_instance_port = _logic getVariable [QGVAR(moduleInstancePort), 8088];
_tak_server_fulladdress = _tak_server_instance_address + ":" + (str _tak_server_instance_port);
"armatak" callExtension ["tcp_socket:start", [_tak_server_fulladdress]];
missionNamespace setVariable ["armatak_server_syncedUnits", synchronizedObjects _logic];
_tak_server_fulladdress call FUNC(startCotRouter);
};
true

View File

@@ -1,60 +0,0 @@
#include "..\script_component.hpp"
params ["_logic"];
_socket_is_running = missionNamespace getVariable ["armatak_tcp_socket_is_running", false];
if (_socket_is_running) exitWith {
["Socket was called twice","error", "TCP Socket"] call EFUNC(main,notify);
closeDialog 1;
};
disableSerialization;
["Connecting to TCP Socket", "success", "TCP Socket"] call EFUNC(main,notify);
_tak_server_instance_address = ctrlText 14000;
_tak_server_instance_port = ctrlText 14001;
_tak_server_fulladdress = ((_tak_server_instance_address) + ":" + (_tak_server_instance_port));
missionNamespace setVariable ["armatak_server_instance", _tak_server_fulladdress];
missionNamespace setVariable ["armatak_tcp_socket_is_running", true];
missionNamespace setVariable ["armatak_group_colors", ["White", "Yellow", "Orange", "Magenta", "Red", "Maroon", "Purple", "DarkBlue", "Blue", "Cyan", "Teal", "Green", "DarkGreen", "Brown"]];
"armatak" callExtension ["tcp_socket:start", [_tak_server_fulladdress]];
_syncUnits = [];
missionNamespace setVariable ["armatak_marked_units", _syncUnits];
GVAR(syncedUnits) = missionNamespace getVariable "armatak_marked_units";
[{
GVAR(syncedUnits) = missionNamespace getVariable "armatak_marked_units";
{
_objectType = _x call BIS_fnc_objectType;
if ((_objectType select 0) == "Soldier") then {
_callsign = [_x] call armatak_fnc_extract_unit_callsign;
_group_name = [group _x] call armatak_fnc_extract_group_color;
_group_role = [_x] call armatak_fnc_extract_group_role;
[_x, _callsign, _group_name, _group_role] call armatak_fnc_send_eud_cot;
[_x] call armatak_fnc_send_digital_pointer_cot;
};
if ((_objectType select 0) == "Vehicle") then {
_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;
};
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;
closeDialog 1;

View File

@@ -0,0 +1,33 @@
#include "..\script_component.hpp"
params ["_logic"];
if (missionNamespace getVariable ["armatak_tcp_socket_is_running", false]) exitWith {
["Socket was called twice", "error", "TCP Socket"] call EFUNC(main,notify);
closeDialog 1;
};
disableSerialization;
["Connecting to authenticated TAK socket", "success", "TCP Socket"] call EFUNC(main,notify);
_tak_server_instance_address = ctrlText 14100;
_tak_server_enrollment_port = ctrlText 14101;
_tak_server_enrollment_username = ctrlText 14102;
_tak_server_enrollment_password = ctrlText 14103;
"armatak" callExtension [
"tcp_socket:start_enroll_mtls",
[
_tak_server_instance_address,
_tak_server_instance_address,
_tak_server_enrollment_port,
_tak_server_enrollment_username,
_tak_server_enrollment_password,
""
]
];
_tak_server_instance_address call FUNC(startCotRouter);
deleteVehicle _logic;
closeDialog 1;

View File

@@ -0,0 +1,22 @@
#include "..\script_component.hpp"
params ["_logic"];
if (missionNamespace getVariable ["armatak_tcp_socket_is_running", false]) exitWith {
["Socket was called twice", "error", "TCP Socket"] call EFUNC(main,notify);
closeDialog 1;
};
disableSerialization;
["Connecting to TCP Socket", "success", "TCP Socket"] call EFUNC(main,notify);
_tak_server_instance_address = ctrlText 14000;
_tak_server_instance_port = ctrlText 14001;
_tak_server_fulladdress = _tak_server_instance_address + ":" + _tak_server_instance_port;
"armatak" callExtension ["tcp_socket:start", [_tak_server_fulladdress]];
_tak_server_fulladdress call FUNC(startCotRouter);
deleteVehicle _logic;
closeDialog 1;

View File

@@ -20,20 +20,25 @@ params ["_logic"];
if (!local _logic) exitWith {};
private _unit = attachedTo _logic;
deleteVehicle _logic;
switch (false) do {
case (!isNull _unit): {
deleteVehicle _logic;
["Nothing selected", "error", "TCP Socket"] call EFUNC(main,notify);
deleteVehicle _logic;
};
default {
GVAR(syncedUnits) = missionNamespace getVariable "armatak_marked_units";
if (_unit in (missionNamespace getVariable ["armatak_server_syncedUnits", []])) exitWith {
["Unit already marked", "warning", "TCP Socket"] call EFUNC(main,notify);
deleteVehicle _logic;
};
GVAR(syncedUnits) = missionNamespace getVariable "armatak_server_syncedUnits";
GVAR(syncedUnits) pushBack _unit;
missionNamespace setVariable ["armatak_marked_units", GVAR(syncedUnits)];
missionNamespace setVariable ["armatak_server_syncedUnits", GVAR(syncedUnits)];
SETVAR(_unit,GVAR(isRouting),true);
deleteVehicle _logic;
};
};
};

View File

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

View File

@@ -0,0 +1,47 @@
#include "..\script_component.hpp"
params [["_server_instance", "", [""]]];
missionNamespace setVariable ["armatak_server_instance", _server_instance];
missionNamespace setVariable ["armatak_tcp_socket_is_running", true];
if (isNil { missionNamespace getVariable "armatak_server_syncedUnits" }) then {
missionNamespace setVariable ["armatak_server_syncedUnits", []];
};
GVAR(syncedUnits) = missionNamespace getVariable "armatak_server_syncedUnits";
[{
GVAR(syncedUnits) = missionNamespace getVariable "armatak_server_syncedUnits";
{
_objectType = _x call BIS_fnc_objectType;
switch (true) do {
case ((_objectType select 0) == "Soldier"): {
_callsign = [_x] call armatak_fnc_extract_unit_callsign;
_group_name = [group _x] call armatak_fnc_extract_group_color;
_group_role = [_x] call armatak_fnc_extract_group_role;
[_x, _callsign, _group_name, _group_role] call armatak_fnc_send_eud_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;
_x call armatak_fnc_extract_sensor_data;
};
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;
_x call armatak_fnc_extract_sensor_data;
};
};
} forEach GVAR(syncedUnits);
}, 1, []] call CBA_fnc_addPerFrameHandler;
true

View File

@@ -1 +0,0 @@
armatak\armatak\addons\video

View File

@@ -1,11 +0,0 @@
class Extended_PreStart_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_SCRIPT(XEH_preStart));
};
};
class Extended_PreInit_EventHandlers {
class ADDON {
init = QUOTE(call COMPILE_SCRIPT(XEH_preInit));
};
};

View File

@@ -1,72 +0,0 @@
class CfgVehicles {
class Logic;
class Module_F : Logic
{
class AttributesBase
{
class Default;
class Edit;
class Combo;
class Checkbox;
class CheckboxNumber;
class ModuleDescription;
class Units;
};
class ModuleDescription
{
class AnyBrain;
};
};
class EGVAR(server,moduleBase);
class GVAR(videoModule): EGVAR(server,moduleBase) {
scope = 2;
scopeCurator = 0;
displayname = "Video Streaming Handler";
icon = "\a3\Modules_F_Curator\Data\iconRadio_ca.paa";
category = QEGVAR(main,moduleCategory);
function = QFUNC(videoParser);
functionPriority = 1;
isGlobal = 0;
isTriggerActivated = 1;
isDisposable = 1;
is3den = 0;
curatorCanAttach = 0;
curatorInfoType = "RscDisplayAttributeModuleNuke";
canSetArea = 0;
canSetAreaShape = 0;
canSetAreaHeight = 0;
class Attributes: AttributesBase {
class GVAR(instanceAddress): Edit {
property = QGVAR(instanceAddress);
displayname = "MediaMTX Provider Address";
tooltip = "MediaMTX Provider Instance Address";
typeName = "STRING";
defaultValue = "localhost";
};
class GVAR(instancePort): Edit {
property = "armatak_module_mediamtx_video_stream_instance_port";
displayname = "MediaMTX Provider Port";
tooltip = "MediaMTX Provider Port for handling video streams";
typeName = "STRING";
defaultValue = "8554";
};
class GVAR(instanceAuthUser): Edit {
property = QGVAR(instanceAuthUser);
displayname = "MediaMTX Provider Username";
tooltip = "MediaMTX Provider Instance Username";
typeName = "STRING";
defaultValue = "administrator";
};
class GVAR(instanceAuthPassword): Edit {
property = QGVAR(instanceAuthPassword);
displayname = "MediaMTX Provider Password";
tooltip = "MediaMTX Provider Instance Password";
typeName = "STRING";
defaultValue = "password";
};
};
};
};

View File

@@ -1 +0,0 @@
PREP(videoParser);

View File

@@ -1,9 +0,0 @@
#include "script_component.hpp"
ADDON = false;
PREP_RECOMPILE_START;
#include "XEH_PREP.hpp"
PREP_RECOMPILE_END;
ADDON = true;

View File

@@ -1,3 +0,0 @@
#include "script_component.hpp"
#include "XEH_PREP.hpp"

View File

@@ -1,42 +0,0 @@
#include "script_component.hpp"
class CfgPatches {
class ADDON {
name = COMPONENT_NAME;
units[] = {
QGVAR(videoModule)
};
weapons[] = {};
requiredAddons[] = {
"cba_main",
"ace_main",
"armatak_main",
"armatak_server"
};
requiredVersion = REQUIRED_VERSION;
author = PROJECT_AUTHOR;
url = "https://github.com/valmojr/armatak";
};
};
class CfgMods {
class PREFIX {
name = "Arma Team Awareness Kit";
author = PROJECT_AUTHOR;
logo = "logo_ca.paa";
logoOver = "logo_hover_ca.paa";
tooltip = "ARMATAK";
tooltipOwned = "ARMATAK";
picture = "picture.paa";
actionName = "GitHub";
action = "https://github.com/valmojr/armatak";
overview = "ARMATAK Addons allows Arma 3 sessions to be parsed to TAK Clients";
hideName = 0;
hidePicture = 0;
dlcColor[] = { 0.23, 0.39, 0.30, 1 };
logoSmall = "logo_small_ca.paa";
};
};
#include "CfgEventHandlers.hpp"
#include "CfgVehicles.hpp"

View File

@@ -1,83 +0,0 @@
#include "..\script_component.hpp"
params [
["_logic", objNull, [objNull]],
["_units", [], [[]]],
["_activated", true, [true]]
];
if (isServer) exitWith {
private _instance_address = GETVAR(_logic,GVAR(instanceAddress),false);
private _instance_port = GETVAR(_logic,GVAR(instancePort),false);
private _instance_auth_user = GETVAR(_logic,GVAR(instanceAuthUser),false);
private _instance_auth_pass = GETVAR(_logic,GVAR(instanceAuthPassword),false);
SETMVAR(GVAR(instanceAddress),_instance_address);
SETMVAR(GVAR(instancePort),_instance_port);
SETMVAR(GVAR(instanceAuthUser),_instance_auth_user);
SETMVAR(GVAR(instanceAuthPassword),_instance_auth_pass);
_startAction = [
QGVAR(startStream),
"Start Video Feed",
"",
{
_uuid = (_this select 0) call armatak_fnc_extract_uuid;
_uuid_short = _uuid select [0, 8];
_role = roleDescription (_this select 0);
_name = name (_this select 0);
_role = [_role] call BIS_fnc_filterString;
_name = [_name] call BIS_fnc_filterString;
_stream_path = _name + "_" + _role + "_" + _uuid_short;
armatak_mediamtx_video_stream_instance_address = GETMVAR(instance_address,false);
armatak_mediamtx_video_stream_instance_port = missionNamespace getVariable "instance_port";
armatak_mediamtx_video_stream_instance_auth_user = missionNamespace getVariable "instance_auth_user";
armatak_mediamtx_video_stream_instance_auth_pass = missionNamespace getVariable "instance_auth_pass";
"armatak" callExtension ["video_stream:start", [armatak_mediamtx_video_stream_instance_address, armatak_mediamtx_video_stream_instance_port, _stream_path, armatak_mediamtx_video_stream_instance_auth_user, armatak_mediamtx_video_stream_instance_auth_pass]];
(_this select 0) setVariable ["armatak_video_feed_is_streaming", true];
},
{
(_this select 0) getVariable "armatak_video_feed_is_streaming" == false
}
] call ace_interact_menu_fnc_createAction;
[
"Man",
1,
["ACE_SelfActions"],
_startAction,
true
] call ace_interact_menu_fnc_addActionToClass;
_stopAction = [
"ArmatakStopStream",
"Stop Video Feed",
"",
{
"armatak" callExtension ["video_stream:stop", []];
SETVAR(_this select 0,GVAR(isStreaming),false);
},
{
GETVAR((this select 0),GVAR(isStreaming),false)
}
] call ace_interact_menu_fnc_createAction;
[
"Man",
1,
["ACE_SelfActions"],
_stopAction,
true
] call ace_interact_menu_fnc_addActionToClass;
if (isMultiplayer) then {
{
SETVAR(_x,GVAR(isStreaming),false);
} forEach playableUnits;
} else {
SETVAR(player,GVAR(isStreaming),false);
};
};
true;

View File

@@ -1,17 +0,0 @@
#define COMPONENT video
#define COMPONENT_BEAUTIFIED Video Streaming
#include "\armatak\armatak\addons\main\script_mod.hpp"
// #define DEBUG_MODE_FULL
// #define DISABLE_COMPILE_CACHE
// #define ENABLE_PERFORMANCE_COUNTERS
#ifdef DEBUG_ENABLED_MAIN
#define DEBUG_MODE_FULL
#endif
#ifdef DEBUG_SETTINGS_MAIN
#define DEBUG_SETTINGS DEBUG_SETTINGS_MAIN
#endif
#include "\z\ace\addons\main\script_macros.hpp"

1
app/.gitignore vendored
View File

@@ -1 +0,0 @@
/build

View File

@@ -1,55 +0,0 @@
plugins {
alias(libs.plugins.android.application)
alias(libs.plugins.jetbrains.kotlin.android)
}
android {
namespace = "com.armatak.simtak"
compileSdk = 34
defaultConfig {
applicationId = "com.armatak.simtak"
minSdk = 29
targetSdk = 34
versionCode = 1
versionName = "1.0"
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
}
buildTypes {
release {
isMinifyEnabled = false
proguardFiles(
getDefaultProguardFile("proguard-android-optimize.txt"),
"proguard-rules.pro"
)
}
}
compileOptions {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = JavaVersion.VERSION_1_8
}
kotlinOptions {
jvmTarget = "1.8"
}
viewBinding {
enable = true
}
}
dependencies {
implementation(libs.androidx.core.ktx)
implementation(libs.androidx.appcompat)
implementation(libs.material)
implementation(libs.androidx.activity)
implementation(libs.androidx.constraintlayout)
implementation(libs.okhttp)
//Vision - Qr/BarCodeScanner
implementation(libs.play.services.vision)
testImplementation(libs.junit)
androidTestImplementation(libs.androidx.junit)
androidTestImplementation(libs.androidx.espresso.core)
}

Some files were not shown because too many files have changed in this diff Show More