y(1)=12000;
for i=1:200
x(i+1)=x(i)+v*cos(a)*t;
y(i+1)=y(i)+v*sin(a)*t;
end
for i=1:200
xradarpositon=0;
yradarpositon=0;
Zmeasure(1,i)=atan((y(i)-yradarpositon)/(x(i)-xradarpositon))+random('Normal',0,azimutherror,1,1);
Zmeasure(2,i)=sqrt((y(i)-yradarpositon)^2+(x(i)-xradarpositon)^2)+random('Normal',0,rangeerror,1,1);
xx(i)=Zmeasure(2,i)*cos(Zmeasure(1,i));%%观测值
yy(i)=Zmeasure(2,i)*sin(Zmeasure(1,i));
measureerror=[azimutherror^2 0;0 rangeerror^2];
processerror=tao*processnoise;
vNoise = size(processerror,1);
wNoise = size(measureerror,1);
A=[1 t 0 0;
0 1 0 0;
0 0 1 t;
0 0 0 1];
Anoise=size(A,1);
for j=1:2*L+1
Wm(j)=1/(2*(L+ramda));
Wc(j)=1/(2*(L+ramda));
end
Wm(1)=ramda/(L+ramda);
Wc(1)=ramda/(L+ramda);%+1-alpha^2+belta; %%%权值
if i==1
xerror=rangeerror^2*cos(Zmeasure(1,i))^2+Zmeasure(2,i)^2*azimutherror^2*sin(Zmeasure(1,i))^2;
yerror=rangeerror^2*sin(Zmeasure(1,i))^2+Zmeasure(2,i)^2*azimutherror^2*cos(Zmeasure(1,i))^2;
xyerror=(rangeerror^2-Zmeasure(2,i)^2*azimutherror^2)*sin(Zmeasure(1,i))*cos(Zmeasure(1,i));
P=[xerror xerror/t xyerror xyerror/t;
xerror/t 2*xerror/(t^2) xyerror/t 2*xyerror/(t^2);
xyerror xyerror/t yerror yerror/t;