function conflicts = UTM_conflicts(flights,lanes)
%

conflicts = [];

num_flights = length(flights);
num_lanes = length(lanes(:,1));
lane_info = [];
del_x = 0.1;

for f = 1:num_flights
    traj = flights(f).traj;
    for e = 1:length(traj)
        lane_info = [lane_info; traj(e),f,flights(f).TOD(e),flights(f).TOA(e)];
    end
end

for k = 1:num_lanes
    indexes = find(lane_info(:,1)==k);
    if ~isempty(indexes)
        k_info = lane_info(indexes,:);
        num_indexes = length(indexes);
        for ind1 = 1:num_indexes-1
            P0 = [k_info(ind1,3),0];
            P1 = [k_info(ind1,4),10];
            for ind2 = ind1+1:num_indexes
                Q0 = [k_info(ind2,3),0];
                Q1 = [k_info(ind2,4),10];
                if ((P0(1)<Q0(1)&P1(1)>Q1(1)))|((Q0(1)<P0(1)&Q1(1)>P1(1)))
                    conflicts = [conflicts; k,k_info(ind1,2),k_info(ind2,2)];
                end
            end
        end
    end
end

tch = 0;
