Calculate GPS coordinates

223 Views Asked by At

There are 3 satellites with coordinates $(x_i,y_i,z_i)$ for $i=1,2,3$

Sat1 = (-11, -10, 21) Sat2 = (-12, -20,11) Sat3 = (14,-10,19)

There is a receiver, somewhere in the middle with certain distance to Sat 1,2 and 3

d$_1$ = 22,1, d$_2$ = 21,5 and d$_3$ = 21,5.

I want to determine the coordinates $x, y,z$ of the receiver. So we have to solve the system of equations:

$(x-x_1)^2 + (y-y_1)^2 + (z-z_1)^2 = \text{d}_1^2\qquad$ (E1)

$(x-x_2)^2 + (y-y_2)^2 + (z-z_2)^2 = \text{d}_2^2\qquad$ (E2)

$(x-x_3)^2 + (y-y_3)^2 + (z-z_3)^2 = \text{d}_3^2.\qquad$ (E3)

To eliminate the quadratic terms in E1, E2 and E3 we will create three new equations without any quadratic variables, namely: E1-E2, E1-E3 and E2-E3.

Putting these 3 equations in matrix notation we will find that $ \begin{pmatrix} d_1^2 - d_2^2\\ d_1^2 - d_3^2\\ d_2^2 - d_3^2 \end{pmatrix} = \begin{pmatrix} -2(x_1-x_2) & -2(y_1-y_2) & -2(z_1-z_2) \\ -2(x_1-x_3) & -2(y_1-y_3) & -2(z_1-z_3) \\ -2(x_2-x_3) & -2(y_2-y_3) & -2(z_2-z_3) \end{pmatrix} \begin{pmatrix} x\\ y \\ z \end{pmatrix} + \begin{pmatrix} x_1^2-x_2^2+y_1^2-y_2^2+z_1^2-z_2^2\\ x_1^2-x_3^2+y_1^2-y_3^2+z_1^2-z_3^2 \\ x_2^2-x_3^2+y_2^2-y_3^2+z_2^2-z_3^2 \end{pmatrix}. $

SciLab now tells me that the matrix is singular, how?!

2

There are 2 best solutions below

0
On

This matrix is singular because the 2nd row minus the 3rd row equals the 1st row. $$ \begin{pmatrix} x_1-x_2 & y_1-y_2 & z_1-z_2 \\ x_1-x_3 & y_1-y_3 & z_1-z_3 \\ x_2-x_3 & y_2-y_3 & z_2-z_3 \end{pmatrix} $$ So what you've done is, for example, to solve the below system of equations: \begin{align} x^2+x&=2\\ x^2+y&=3\\ x^2+z&=4\\ \end{align} you subtracted to get: \begin{align} y-x&=1\\ z-y&=1\\ z-x&=2\\ \end{align}

You can't do this way. You should solve at least one quadratic equation to get the solution.

0
On

Of course, your problem has two solutions. The planes $E_1-E_2$ and $E_1-E_3$ intersect in a line $D$. Find the intersection of $D$ and $E_1$ ($2$ points) and you are done.