Trilateration in 2D Space - Need Formulas

조회 수: 15 (최근 30일)
Vincent
Vincent 2013년 1월 27일
I'm starting to write a program which will fine the location of a point on a cartesian plane using the radius of 3 circles. I already have a lot of the formulas and steps, but I need to find the formula for the X coordinate(s).
y = +/- sqrt(r^2 + (x-i)^2) + j
This is the formula to find the distance between the center of the circle and the circumference.
i = x coord of inner circle
j = y coord of inner circle
I understand that I need to compare(make them equal to each other) the two equations, simplify until i get a trinomial and the use the quadratic formula to solve for x.
I need help with the formula to find x using this equation.
Thanks!

답변 (1개)

Matt J
Matt J 2013년 1월 27일
You're trying to find the intersection of 2 circles? Three circles won't necessarily have a simultaneous intersection....
For 2 circles, you should be able to put the equations for each in the form
x^2 +y^2 +LinearTerms1(x,y) = R1^2
x^2 +y^2 +LinearTerms2(x,y) = R2^2
Subtracting these equations will therefore give you a linear equation in x and y which you can solve for one or the other. Substitute back into one of the original equations to obtain your quadratic.
Incidentally, you don't really have to use the quadratic formula. MATLAB has a ROOTS command to do this for you.
  댓글 수: 2
Vincent
Vincent 2013년 1월 28일
I'm quite new to MATLAB, maybe you can tell me what the LinearTerms mean and how this works? xD
Matt J
Matt J 2013년 1월 28일
It's not a MATLAB thing. If you expand out
(x-2)^2
to obtain
x^2-4*x+4
then the linear terms are the -4*x+4 part.

댓글을 달려면 로그인하십시오.

Community Treasure Hunt

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

Start Hunting!

Translated by