Finding Both Missing Co-ordinates in distance formula

80 Views Asked by At

Hi I am using this to find location of a device in a 2d plane based on the distance formula. The co-ordinates of reference points and the distance of the device from the device is known. How can we find the correct location of the device based on these equations where $x_1,y_1,x_2,y_2,x_3,y_3,d_1,d_2,d_3$ are known. The 2 unknowns are $x$ and $y$. \begin{align*} (x_1-x)^2+(y_1-y)^2 &= d_1^2 \\ (x_2-x)^2+(y_2-y)^2 &= d_2^2 \\ (x_3-x)^2+(y_3-y)^2 &= d_3^2 \end{align*}

1

There are 1 best solutions below

1
On

Overview:

Solve these equations in pairs: this will give you the equations of three straight lines. Pick any two of these lines and find their point of intersection.

Errors in measurement may mean that you get a slightly different answer depending on which two straight lines you choose. Excellent. Pick the centre of the three points. You now have an estimate of the position and an estimate of the possible error.

More detail:

Choose two circles

$(x_1-x)^2+(y_1-y)^2 = d_1^2$

$(x_2-x)^2+(y_2-y)^2 = d_2^2$

Expand

$x_1^2-2x_1x+x^2+y_1^2-2y_1y+y^2=d_1^2$

$x_2^2-2x_2x+x^2+y_2^2-2y_2y+y^2=d_2^2$

Subtract

$x_1^2-x_2^2-2\left(x_1-x_2\right)x+y_1^2-y_2^2-2\left(y_1-y_2\right)y=d_1^2-d_2^2$

Similarly with a different pair

$x_3^2-x_2^2-2\left(x_3-x_2\right)x+y_3^2-y_2^2-2\left(y_3-y_2\right)y=d_3^2-d_2^2$