Probably the third circle is used to select which of the two points is the wanted solution. What you have to is testing which of the points is a member of the third circle
There are a number of possibilities with 2 circles
the circles do overlap and have 2 points in common
the circles touch and have one point in common
the circles do not overlap/touch
in case (1) The third circle can be used to choose one of the two points under the assumption that the 3rd circle also goes through one of these points.
in case (2) same
in case (3) you might check if the 3rd circle touches or overlaps the other circles.
it is simple to check if two circles overlap:
if (distance(midpoint-a , midpoint-b) < Ra + Rb) ==> overlap
if (distance(midpoint-a , midpoint-b) == Ra + Rb) ==> touch
if (distance(midpoint-a , midpoint-b) > Ra + Rb) ==> no overlap/touch
these formulas does not say anything about the intersection points (except in case 2)
but give you a quick check if doing all the math makes sense
Yes, we’re looking for a code to solve this problem.
Like one of you said, we wanted to use the equation of the third circle to select one of the 2 points we found with the first 2 equations. But we don’t how to program this… Can x have two values ?
Maybe if I explain our complete project you will understand better:
We put 3 ultra sound transmitters and we want to know where our lost object which have recievers on him is.
So knowing the amplitude use by the transmitters and the amplitude recieve by the reciever on the object and a formula we can find the distance between transmitter A and the object = rA, the distance between transmitter B and the object = rB, the distance between transmitter C and the object= rC
(Xa, Ya) the coordinate of Transmitter A etc…
So at the end we want to know the coordinate of our object. We know this coordinate can’t be very precise that’s why we decided to put cases on our model like a Battleships game.
Like this :
So at the end, we want arduino to tell us on a little screen the position of our object, here : B3 for exemple.
Oh this is distance/signal triangulation. See this here, Triangulation Algorithm . Its not arduino code, but it can be converted to be used on the arduino.
Actually you might want Trilateration, it fits more to your previous posts.
The centers of the 3 circles form a triangle, the radius of the circles is your coverage area. Now what you need to do is measure the distance from the object to the 3 circles and first see if it is within the overall triangle area. If so then you narrow it down to a particular circle (if possible).
The information at http://www.ambrsoft.com/TrigoCalc/Circles2/Circle2.htm gives equations which allow you to determine the coordinates of the two points of intersection of two circles. If you write code to figure out the intersecting points for Ta and Tb and compare them to the points for Tb and Tc and/or Ta and Tc, you should be able to sort out the info you require.