44 lines
1.2 KiB
Matlab
44 lines
1.2 KiB
Matlab
% echo_r_mtx: range processing echo data
|
|
% target_list_RD: target list include range and doppler information
|
|
% d: antenna spacing
|
|
% fc: carrier frequency
|
|
% acc: angle estimation accuracy
|
|
|
|
% target_list_RDA: target list include range, doppler and angle information
|
|
% RA_map: range-angle map
|
|
% THETA: scale of angle
|
|
|
|
|
|
function [ target_list_RDA, RA_map, THETA ] = angle_est(echo_r_mtx, target_list_RD, d, fc, acc)
|
|
|
|
% parameters
|
|
if nargin < 5
|
|
acc = 181;
|
|
end
|
|
[lenA, lenR, lenP] = size(echo_r_mtx);
|
|
c = 3e8;
|
|
lambda = c / fc;
|
|
|
|
% initialization
|
|
echo_mtx = squeeze(echo_r_mtx(:, :, 1));
|
|
|
|
% CBF
|
|
THETA = linspace(-90, 90, round(acc));
|
|
RA_map = zeros(length(THETA), lenR);
|
|
for i = 1: length(THETA)
|
|
a = exp((0: lenA - 1)' * -1j * 2 * pi / lambda * d * sin(THETA(i) / 180 * pi));
|
|
RA_map(i, :) = a'* echo_mtx;
|
|
end
|
|
RA_map = transpose(RA_map);
|
|
|
|
% calculate angle
|
|
range_angle = zeros(1, lenR);
|
|
for j = 1: lenR
|
|
[v, num] = max(abs(RA_map(j, :)));
|
|
range_angle(j) = THETA(num);
|
|
end
|
|
targets_angle = range_angle(target_list_RD(:, 2));
|
|
target_list_RDA = [target_list_RD, transpose(targets_angle)];
|
|
|
|
end
|