> For the complete documentation index, see [llms.txt](https://veriny.gitbook.io/berkeley/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://veriny.gitbook.io/berkeley/eecs16b/trilateration-and-correlation.md).

# Trilateration and Correlation

Adapted from UC Berkeley's EECS 16A notes.

## Trilateration

**Trilateration** is a technique that involves using the geometry of circles to find an approximate or exact location of an object.&#x20;

![Source: https://www.researchgate.net/figure/The-Trilateration-algorithm\_fig4\_224144937](https://2947382171-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M6XPH5Qvmbnhx_A2DDH%2F-MPMzT3tHRcEdd0TqYc3%2F-MPN0O1YRAz53DrcmO5m%2Fimage.png?alt=media\&token=f17acb74-3bb0-41c9-b136-fffd9bae7403)

Geometrically, this means that if you know the position of three points and each of their distances to a point that you want to find, you can create three circles, the intersection of which is the location that you want to find.

Here's how it works mathematically. Let's take the distances and points below, and assume that we know the positions of the points and the distances to our desired object.

![Credit: EECS 16A course staff](https://2947382171-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-M6XPH5Qvmbnhx_A2DDH%2F-MPMzT3tHRcEdd0TqYc3%2F-MPN1z0e-zIIrEYZEXkI%2Fimage.png?alt=media\&token=d8664516-c44e-43ea-9de7-4900f22fd297)

We can write the distances as a set of vector equations.

$$
||\vec{x}  - \vec{a}\_1||^2 = d\_1^2\\
||\vec{x}  - \vec{a}\_2||^2 = d\_2^2\\
||\vec{x}  - \vec{a}\_3||^2 = d\_3^2
$$

We can use distance formula with the components.

##
