plotting of graph/TDOA localization
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
HELLO EVERYONEONE
hope everyone is fine and doing great.just need some help guys.
this is my code based on TDOA(Time Difference Of Arrival) and it localizes an RF transmitter which is the output in 3D coordinates.now i want to plot the accuracy of my algorithm on matlab.i want to plot a graph of accuracy vs an array of increasing values from current values and increasing 150km.
CODE:
x_p = 4000; y_p = 5000; z_p = 20;
x_1 = 8000; y_1 = 9000; z_1 = 50;
x_2 = 2000; y_2 = 5000; z_2 = 10;
x_3 = 6000; y_3 = 1000; z_3 = 30;
c=3.0*10^8;
t1 = 2.923281245*10^-6;
t2 = -1.284077874*10^-6;
t3 = -1.40649205*10^-5;
syms xs ys zs %our unknowns
eqn1 = sqrt((xs-x_p)^2+(ys-y_p)^2+(zs-z_p)^2)-sqrt((xs-x_1)^2+(ys-y_1)^2+(zs-z_2)^2)-(c*t1);
eqn2 = sqrt((xs-x_p)^2+(ys-y_p)^2+(zs-z_p)^2)-sqrt((xs-x_2)^2+(ys-y_2)^2+(zs-z_2)^2)-(c*t2);
eqn3 = sqrt((xs-x_p)^2+(ys-y_p)^2+(zs-z_p)^2)-sqrt((xs-x_3)^2+(ys-y_3)^2+(zs-z_3)^2)-(c*t3);
sol = solve([eqn1, eqn2, eqn3], [xs ys zs]);
m = 1;
for n = 1:length(sol.xs)
possibleSol(1,m) = double(sol.xs(n));
possibleSol(2,m) = double(sol.ys(n));
possibleSol(3,m) = double(sol.zs(n));
m=m+1
end
idx = any(possibleSol < 0) | any(imag(possibleSol) ~=0);
possibleSol(:, idx) = []
OUTPUT:

BEST REGARDS
0 Kommentare
Antworten (0)
Siehe auch
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!