RunwayClear

Check if runway is clear

Usage: Used in 6 task(s)

Lua Implementation

-- Runway Clear
function evaluate(params)
    local runway = params.runway_location

    -- Check for obstacles on runway
    local contacts = this:getContactList()
    for _, contact in ipairs(contacts) do
        if contact:isValid() then
            local distance = spatialUtil.distance(runway, contact:getLocation3D())
            if distance < 100 then  -- Within 100m of runway
                return false
            end
        end
    end

    return true
end