Graphics Programs Reference
In-Depth Information
% OUTPUTS
%
% name dimension explanation units
%------ ---------- --------------- ------
% times 1 X samplingtime/deltat vector of times
% corresponding to samples sec
% trajectory 3 X samplingtime/deltat trajectory x,y,z m
%
times = 0: deltat: samplingtime ;
x = start_loc(1)+xvelocity.*times ;
if yperiod~=0
y = start_loc(2)+yamp*cos(2*pi*(1/yperiod).*times) ;
else
y = ones(1, length(times))*start_loc(2) ;
end
if zperiod~=0
z = start_loc(3)+zamp*cos(2*pi*(1/zperiod).*times) ;
else
z = ones(1, length(times))*start_loc(3) ;
end
trajectory = [x ; y ; z] ;
Listing 9.7. MATLAB Function Ðaddnoise.mÑ
function [noisytraj ] = addnoise(trajectory, sigmaaz, sigmael, sigmarange )
% addnoise.m
% by David J. Hall
% for Bassem Mahafza
% 10 June 2003
% 11:46
% USAGE: [noisytraj ] = addnoise(trajectory, sigmaaz, sigmael, sigmarange )
% INPUTS
% name dimension explanation units
%------ ------ --------------- -------
% trajectory 3 X POINTS trajectory in radar reference coords [m;m;m]
% sigmaaz 1 standard deviation of azimuth error radians
% sigmael 1 standard deviation of elevation error radians
% sigmarange 1 standard deviation of range error m
%
% OUTPUTS
% name dimension explanation units
%------ ------ --------------- -------
% noisytraj 3 X POINTS noisy trajectory [m;m;m]
noisytraj = zeros(3, size(trajectory,2)) ;
Search WWH ::




Custom Search