Clear Filters
Clear Filters

My algorithm for hyperbolic localization not working while testing on known data set

3 views (last 30 days)
I am trying to build a code that uses hyperbolic locationing using 3 'antennas' and one 'transmitor' all of known location to me and I try to see if my code can use the antena locations and the difference in distances of the transmitor to each couple of antennas to figure out where the transmitor is (I hope I was clear enough).
When I try it in 2D it works great.
When I expand it to 3D problems start.
I will add the code but first outline the problem -
the transmitor is located at (5,3,4) arbitrary units for now.
What my code gives back is: (5,5,4i)
So my issue is first that the y location is wrong and second that while the value of the z coordinate is correct it is imaginary whis is not good.
Can anyone maybe help me figure out how to fix it?
The code:
syms x y z
% coordinates of receivers
x1 = 1;
y1 = 6;
z1 = 0;
x2 = 4;
y2 = 1;
z2 = 0;
x3 = 9;
y3 = 5;
z3 = 0;
% distance to receivers
d1 = 6.48;
d2 = 4.61;
d3 = 6.02;
% equations for 3 hyperbulas
eq1 = sqrt((x-x1)^2 + (y-y1)^2 + (z-z1)^2)-sqrt((x-x2)^2 + (y-y2)^2 + (z-z2)^2)==(d1-d2);
eq2 = sqrt((x-x2)^2 + (y-y2)^2 + (z-z2)^2)-sqrt((x-x3)^2 + (y-y3)^2 + (z-z3)^2)==(d2-d3);
eq3 = sqrt((x-x3)^2 + (y-y3)^2 + (z-z3)^2)-sqrt((x-x1)^2 + (y-y1)^2 + (z-z1)^2)==(d3-d1);
% finding location of transmitter.
S = solve(eq1,eq2,eq3, [x y z]);
Again it works great when I do it only in 2D but thats not real life and my project where this will be implemented is in our 3D world.
Will apreciate any help
Thank you
  4 Comments
David Goodmanson
David Goodmanson on 13 Dec 2018
o.k. good although I don't know how you will get a well defined answer in 3d without adding a 4th receiver.
Shachar Givon
Shachar Givon on 13 Dec 2018
I have a 4th reciever, I just used only 3 in my analysis up to now. Just upgraded it to 4.

Sign in to comment.

Answers (0)

Categories

Find more on Mathematics in Help Center and File Exchange

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!