DetectDrone
Detect enemy drone/UAV
Usage: Used in 0 task(s)
Lua Implementation
-- Detect Drone
function execute(params)
local contacts = this:getContactList()
local detectedDrones = {}
local droneThreshold = params.size_threshold or 100 -- Small RCS
for _, contact in ipairs(contacts) do
if contact:isValid() then
local entityType = contact:getEntityType()
-- Check if UAV/drone based on entity type
if entityType[2] == 50 then -- Unmanned air vehicle domain
table.insert(detectedDrones, contact)
end
end
end
params.detectedDrones = detectedDrones
return #detectedDrones > 0
end
This action is not currently used by any tasks.