# Trilateration

**Trilateration** is a method for determining the intersections of three sphere surfaces given the centers and radii of the three spheres. Trilateration is used by GPS devices to compute exact location based on signals received from a satellite and the time that signal takes to get from the satellite to the receiver.

## Contents

## Derivation

A mathematical derivation for the solution of a three-dimensional trilateration problem can be found by taking the formulae for three spheres and setting them equal to each other. To simplify the calculations, we apply three constraints to the centers of these spheres; we assume all three spheres are centered on the z=0 plane, one is at the origin, and one other is on the x-axis. It is possible to transform any set of three points to comply with these constraints, find the solution point, and then reverse the translation to find the solution point in the original coordinate system.

We start with the equations for the three spheres

- ,

and

- .

We need to find a point located at (*x*, *y*, *z*) that satisfies all three equations.

First we subtract the second equation from the first and solve for *x*:

- .

We assume that the first two spheres intersect in more than one point, that is that d-r1 < r2 < d+r1. In this case substituting the equation for x back into the equation for the first sphere produces the equation for a circle, the solution to the intersection of the first two spheres:

- .

Substituting : into the formula for the third sphere and solving for y there results:

- .

Now that we have the *x*- and *y*-coordinates of the solution point, we can simply rearrange the formula for the first sphere to find the *z*-coordinate:

Now we have the solution to all three points *x*, *y* and *z*. Because *z* is expressed as the positive or negative square root, it is possible for there to be zero, one or two solutions to the problem.

This last part can be visualized as taking the circle found from intersecting the first and second sphere and intersecting that with the third sphere. If that circle falls entirely outside of the sphere, *z* is equal to the square root of a negative number: no real solution exists. If that circle touches the sphere on exactly one point, *z* is equal to zero. If that circle touches the surface of the sphere at two points, then *z* is equal to plus or minus the square root of a positive number.

## Error model

When measurement error is introduced into the picture, things become a little more complicated. If we know that the distance from *P* to a reference point lies in a range (a closed interval) [*r*_{1}, *r*_{2}], then we know that *P* lies in a circular band between the circles of those two radii. If we know a range for another point, we can take the intersection, which will be either one or two areas bounded by circular arcs. A third point will usually narrow it down to a single area, but this area may still be of significant size; additional reference points can help shrink it further, but as the area shrinks more measurements quickly become less useful. In three dimensions, we are instead intersecting spherical shells with thickness, similar to bowling balls.

This new model emphasizes the importance of choosing three points that are in very different directions — if the points are relatively close together and all far from the point being located, it will take very precise measurement to find the point using trilateration.

## Application

Trilateration can be used in lightning strike location detection. Detectors operating on a common clocking system can use the variation in arrival time of the radio-frequency emissions accompanying a strike to determine the distances from each detector to the strike. Such systems can be useful in forestry for fire prevention and in storm tracking.

A GPS receiver uses trilateration to determine its location from satellite data.

## See also

- Multilateration - position estimation using measurements of time difference of arrival at (or from) three or more sites.
- Resection
- Triangulation
- Global positioning system