TrackDrone

Track detected drone

Usage: Used in 0 task(s)

Lua Implementation

-- Track Drone
function execute(params)
    local drone = params.drone

    if drone and drone:isValid() then
        local trackingSystem = this:getSystem("Tracker")
        if trackingSystem then
            trackingSystem:setAttribute("Target", drone)
            trackingSystem:setAttribute("TrackingMode", "continuous")
        end

        this:setStateProperty("TrackedDrone", drone:getObjectId())
        return true
    end
    return false
end

This action is not currently used by any tasks.