資源簡介
一種對Toa定位算法進行性能分析的算法源代碼,圖形展示了Toa的性能,希望采納
代碼片段和文件信息
clear;
%huatu
theta=linspace(02*pi7);
theta1=linspace(02*pi4);
d=5000;
D=d/sqrt(3);%bianchang
X=D;%zhongxinhenzuobiao
Y=0;
plot(D*cos(theta)+XD*sin(theta)+Y‘g-‘);
hold?on
plot(D*cos(theta1+pi/3)+XD*sin(theta1+pi/3)+Y‘b-‘);
%基站
x2?=?d*cos(pi/6);
y2?=?d*sin(pi/6);
x3?=?d*cos(pi/6);
y3?=?-d*sin(pi/6);
hold?on
plot(00‘y*‘x2y2‘y*‘x3y3‘y*‘);
%noise
n=randn(13);
n=n/std(n);
n=n-mean(n);
r_mean=1;
r_var=2;
n=r_mean+sqrt(r_var)*n;
%sadian
i?=?0;
M?=?1;
while?i?????x?=?[2*D*rand(12)-1*D];
????if(abs(x(1))+abs(x(2))/sqrt(3))<=D?&&?abs(x(2))<=D*sqrt(3)/2
????????i?=?i+1;
????????hold?on
????????plot(x(1)+Xx(2)+Y‘r+‘);
????end
end
x?=?x?+?[X?Y];
K2=x2^2+y2^2;
K3=x3^2+y3^2;
H=[x2?y2;x3?y3];
r1=sqrt(sum(x.^2))+n(1);
r2=sqrt(sum((x-[x2?y2]).
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件????????1079??2013-12-17?20:01??TOA.m
評論
共有 條評論