# Three-dimensional positioning given the distances from well-known fixed stations

I need to compute the position of a static object based on the distance to multiple fixed stations (it the same thing we do to calculate the GPS receiver position based on the satellites position).

I found this article with a nice algorithm withe an analytical solution based only on four fixed stations: Exact Solution of a Three Dimensional Hyperbolic Positioning System.

What I need to do is generalize this to multiple fixed stations (can be 8, 9, 13, or $n$). So I imagine it should be an inversion problem, but I couldn't formulate a matrix for it.

It comes to solve a set of equation of the form

\begin{align} (x-x_1)^2+(y-y_1)^2+(z-z_1)^2-D_1^2 &= 0 \\ (x-x_2)^2+(y-y_2)^2+(z-z_2)^2-D_2^2 &= 0 \\ \vdots \\ (x-x_n)^2+(y-y_n)^2+(z-z_n)^2-D_n^2 &= 0 \\ \end{align}

where $x_i$, $y_i$, $z_i$, and $D_i$ are known, and we need to find $x$, $y$ and $z$.

-

## migrated from stackoverflow.comJun 6 '13 at 14:56

This question came from our site for professional and enthusiast programmers.