function tracks = LEM_radar_tracks(res)
% LEM_radar_tracks - get radar tracks from simulation result
% On input:
%     res (res struct): simulation result info
% On output:
%     tracks (nx3 array): x,y,z locations of radar hits
% Call:
%     tr = LEM_radar_tracks(res);
% Author:
%     T. Henderson
%     UU
%     Fall 2020
%

tracks = [];
trace = res.trace;
num_trace = length(trace);

for t = 1:num_trace
    targets = trace(t).targets;
    num_targets = length(targets);
    for tt = 1:num_targets
        tracks = [tracks; targets(tt).x, targets(tt).y, targets(tt).z];
    end
end
