trilateration with dimensionless distances

617 Views Asked by At

I am trying to figure out how to calculate the coordinate of a point P using the coordinates of three nearby points (A, B and C). The only problem is that I don't know the actual distances to P, only the ratio between them.

For example:

A(19.5mm,9mm)
B(120mm,40mm)
C(46mm,62.5mm)

With as distances to P:

AP = 0.5
BP = 1/3
CP = 1/6

Does anyone know how i get the coordinates of point P?

EDIT

Graphical representation

enter image description here

If it helps, that is a graphical representation of what is going on. I added the distances from the A, B and C to P in black but they can just as well be the ones in red with the same points A, B and C. The value of the distances A-P, B-P and C-P don't matter, only the ratio between them.

EDIT PT2.

I found a part of the solution:

Since the distance between A and B is known (can be calculated) and the ration between AP and BP is known, a triangle should be able to be calculated. But I don't know how yet...

2

There are 2 best solutions below

2
On

The locus of points, whose distance to two given points is in a given ratio, is a circle.

enter image description here

In the above figure we have your three points A, B and C. We also have the circle with points D and E. This circle is the locus of points which has a distance from B which is $\frac{2}{3}$ the distance from A. Likewise, we have the circle with points G and H. This circle is the locus of points which has a distance from C which is $\frac{1}{3}$ the distance from A.

The two circles do not intersect, which means there is no point which fulfills your requirements.

It is of course possible to find a point which almost fulfills your requirements, by selecting a point close to where the two circles almost intersect.

1
On

The trilateration problem asks us to intersect two ellipses (which may not intersect, for certain values of the problem data, and which may otherwise give more than one point of intersection). EDIT: As @Jens points out, these are actually circles. That makes finding their intersection easier than what I thought (see below).

Let's illustrate with the data given in the Question. We are given points $A,B,C$ and seek point $P$ such that the ratios of distances are prescribed:

$$ \frac{d(A,P)}{d(B,P)} = \frac{0.5}{1/3} $$

$$ \frac{d(A,P)}{d(C,P)} = \frac{0.5}{1/6} $$

If those two "ratios" are satisfied, the third "ratio" condition is also satisfied:

$$ \frac{d(B,P)}{d(C,P)} = \frac{1/3}{1/6} $$

As we unpack the algebra, we will see it can get a bit hairy. If $P = (x,y)$:

$$ \frac{(x-19.5)^2 + (y-9)^2}{(x-120)^2 + (y-40)^2} = \left(\frac{0.5}{1/3}\right)^2 $$

$$ \frac{(x-19.5)^2 + (y-9)^2}{(x-46)^2 + (y-62.5)^2} = \left(\frac{0.5}{1/6}\right)^2 $$

Without working through all the details, the first curve is an ellipse whose major axis is a segment of the line $AB$. The endpoints of the major axis are easily found. There exists a point between $A$ and $B$ whose distance to $A$ is three-fifths of the way toward $B$, and it follows that this point gives the required ratio of distances $0.5:1/3$ (because the distances are respectively $3/5$'s and $2/5$'s of the length of $AB$). There exists another point on the far side of $B$ from $A$ where the correct ratio (closer to $B$ than to $A$) is also realized, also easily found.

Similarly the second curve is an ellipse whose major axis is a segment of the line $AC$, with one endpoint between $A$ and $C$ and the other endpoint on the far side of $C$ from $A$.

That said, the algebra of finding the intersection between the two ellipses will generically involve solving a quartic polynomial equation. It can be done by eliminating one or the other variables $x,y$ and solving a quartic equation for the other. This is what I meant by saying the problem can get hairy. EDIT: Actually the intersection can be found by solving an easy quadratic, per the Answer given by Jens.

If the above is the correct interpretation of the problem, then there is little we can do to simplify the solution. (One thing we would do it to translate the points $A,B,C$ so that $A$ becomes the origin, but we still wind up with a quartic polynomial.)

There is a special case of geometric note when all the "ratios" are equal. Then of course the point $P$ we seek is unique, the circumcenter of triangle $ABC$, i.e. the intersection of the perpendicular bisectors of its three sides. (As above, it suffice to find $P$ by intersecting any two of these lines.)


The complexity of that procedure inclines me to highlight a much easier problem of barycentric coordinates that is posed with much the same data (but a different solution).

In taking convex combinations of $A,B,C$ we frequently use three nonnegative values, like the "ratios" given in the Question, which add to $1$. Any point inside the triangle $ABC$ (including boundary edges) can be uniquely determined by coefficients $k_A,k_B,k_C \ge 0$ such that $k_A+k_B+k_C = 1$ and:

$$ P = k_A A + k_B B + k_C C $$

So the problem of finding point $P$ in triangle $ABC$ with barycentric coordinates $(k_A,k_B,k_C)$ is an easy one. We just compute the coordinates of $P$ by taking the appropriate convex combination of the coordinates of $A,B,C$.