# Trilateration

This online calculator solves the problem of trilateration - determining the coordinates of a point by the distance from that point to three other points with known coordinates.

The result of solving the problem can be one of three:

1. There is no point the distances from which to the other three correspond to the given ones
2. There is exactly one point, the distances from which to the other three correspond to the given ones.
3. There are two points whose distances to the other three correspond to the given ones

Calculation formulas and illustrations for each case are given below the calculator. #### Trilateration

Result

Solutions

Digits after the decimal point: 2

### Trilateration

The locus of points lying at a given distance r from a point with coordinates (x, y, z) is the surface of a sphere of radius r with the center at point (x, y, z). Thus, from the point of geometry, the problem of trilateration is to find the coordinates of the intersection of three spheres. These coordinates are found by solving a system of equations based on the following reasoning1:
Each pair of spheres intersect in a circle. Its center is on a straight line connecting the centers of the spheres. The circle itself lies in a plane perpendicular to that line. Consider three spheres: sphere 1 with radius r1 centered at the point O1(x1, y1 >, z1), sphere 2 with radius r2 centered at point O2(x2, y2, z2) and sphere 3 with radius r3 centered at O3 >(x3, y3, z3).

The equation of the plane in which the circle formed by the intersection of spheres 1 and 2 lies is as follows:

The equation of the plane in which the circle formed by the intersection of spheres 1 and 3 lies is as follows:

The equation of the plane of the triangle formed by the centers of the spheres:

The intersection of the first two planes gives a line perpendicular to the last plane. The intersection of this line with the plane of the triangle is the perpendicular from the desired point of intersection of the spheres to the plane of the triangle formed by the centers of the spheres. This intersection point belongs to all three planes, and its coordinates are the solution of the system of three linear algebraic equations given above.

Having solved this system, we obtain the coordinates of the point O (x0, y0, z0).
Then the coordinates of the intersection point of the three spheres are determined by the following formulas:

The expression for calculating k determines the number of solutions. If the difference under the square root is positive, then we have two solutions (+k, -k) - two intersection points of the three spheres, illustrated by the picture below

If the difference under the root is zero, then we have exactly one point of intersection of two spheres:

Finally, if the expression under the root is negative, then there are no solutions - the spheres do not intersect