mirror of
https://github.com/valmojr/armatak.git
synced 2026-06-14 02:43:28 +00:00
Added initial COT Sensor payloads to support UAV Tools integration for Arma Drones
This commit is contained in:
30
addons/main/functions/api/fn_send_uas_video_cot.sqf
Normal file
30
addons/main/functions/api/fn_send_uas_video_cot.sqf
Normal 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]];
|
||||
Reference in New Issue
Block a user