-
Notifications
You must be signed in to change notification settings - Fork 0
/
Clutter_Generation.m
27 lines (26 loc) · 1.35 KB
/
Clutter_Generation.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
function ClutterStruct = Clutter_Generation(TarMaxRho,clutterDensity,impInstVec)
% areaSquare = (2*TarMaxRho)^2;
% ptsGen = ceil(areaSquare*clutterDensity);
% n = size(impInstVec,1);
% xClutter = -TarMaxRho + 2*TarMaxRho*rand(ptsGen,n); %This is uniform distributiom
% yClutter = -TarMaxRho + 2*TarMaxRho*rand(ptsGen,n); %This is uniform distributiom
%
% for i = n:-1:1
% [thetaClutter,rhoClutter] = cart2pol(xClutter(:,i),yClutter(:,i));
% indx = find(rhoClutter<=TarMaxRho);
% ClutterStruct(i).thetaClutter = thetaClutter(indx,:);
% ClutterStruct(i).rhoClutter = rhoClutter(indx,:);
% noClutterPts = length(indx);
% ClutterStruct(i).rangeRateClutter = 5*randn(noClutterPts,1);
% end
area = pi*TarMaxRho^2;
points = ceil(area*clutterDensity);
n = size(impInstVec,1);
thetaClutter = 2*pi*rand(points,n); %This is uniform distributiom
rhoClutter = TarMaxRho*rand(points,n); %This is uniform distributiom
rangeRateClutter = 5*randn(points,n);
for i = n:-1:1
ClutterStruct(i).thetaClutter = thetaClutter(:,i);
ClutterStruct(i).rhoClutter = rhoClutter(:,i);
ClutterStruct(i).rangeRateClutter = rangeRateClutter(:,i);
end