# Thread: GPS - Finding a quadratic equation from three linear equations

1. ## GPS - Finding a quadratic equation from three linear equations

The problem is regarding GPS equations with four satellites with their location denoted as (Ai, Bi, Ci).
the transmission speed is approximately c (speed of light).
ti is the measured time intervals.
x, y and z is the receiver location, and d is the difference between the synchronized time on the four sattelite clocks and the earth-bound receiver clock.

(x - A1)2 + (y - B1)2 + (z - C1)2 = [c*(t1 - d)]2
(x - A2)2 + (y - B2)2 + (z - C2)2 = [c*(t2 - d)]2
(x - A3)2 + (y - B3)2 + (z - C3)2 = [c*(t3 - d)]2
(x - A4)2 + (y - B4)2 + (z - C4)2 = [c*(t4 - d)]2
I am to find the quadratic equation obtained from subtracting the last three equations from the first, and use those new three linear equations to eliminate x, y and z before finally substituting into any of the original equations. This is said to produce a quadratic equation in the single variable d.

I tried to do this by hand, and it got ugly, really ugly. Now I am stuck trying to figure out an easier way to accomplish this. Any ideas?

2. ## Re: GPS - Finding a quadratic equation from three linear equations

With this kind of question it really helps to break it down into bite-sized chunks to make it easier to write out. If you look at this carefully, you really have to do the difficult task once, and the rest will follow by analogy. For example, when you are subtracting equation 2 from equation 1, you have to calculate $(x-A_1)^2-(x-A_2)^2$. In general, this is what we get from a term like that

$(u-a_1)^2-(u-a_2)^2 = u^2 - 2ua_1 +a_1^2 -u^2+2ua_2-a_2^2= 2(a_2-a_1)u+(a_1^2-a_2^2)$

You can substitute anything for $u$ and anything for $a_1,a_2$. For example, this immediately gives the LHS of the first linear equation

$2(A_2-A_1)x + 2(B_2-B_1)y+2(C_2-C_1)z + (A_1^2-A_2^2+B_1^2-B_2^2+C_1^2-C_2^2)$

The RHS for this equation can be obtained by using $u = cd, a_1 = ct_1, a_2 = ct_2$. We have the RHS

$2c^2d(t_2-t_1)+c^2(t_1^2-t_2^2)$

Here is what happens when you subtract the 2nd, 3rd and 4th equations from the 1st respectively. The LHSs are

$2(A_2-A_1)x + 2(B_2-B_1)y+2(C_2-C_1)z + (A_1^2-A_2^2+B_1^2-B_2^2+C_1^2-C_2^2)$
$2(A_3-A_1)x + 2(B_3-B_1)y+2(C_3-C_1)z + (A_1^2-A_3^2+B_1^2-B_3^2+C_1^2-C_3^2)$
$2(A_4-A_1)x + 2(B_4-B_1)y+2(C_4-C_1)z + (A_1^2-A_4^2+B_1^2-B_4^2+C_1^2-C_4^2)$

The RHSs are

$2c^2d(t_2-t_1)+c^2(t_1^2-t_2^2)$
$2c^2d(t_3-t_1)+c^2(t_1^2-t_3^2)$
$2c^2d(t_4-t_1)+c^2(t_1^2-t_4^2)$

Granted, these are quite a bit more unappetizing in terms of their content, but their form is superb because they are all linear. And with linear equations it is relatively you can use linear algebra to solve them.

3. ## Re: GPS - Finding a quadratic equation from three linear equations

Thanks that really helps. A hint in the problem says that a formula for x, y and z in terms of d can be obtained from:

0=det[uy|uz|xux + yuy + zuz + dud + w]

I am not sure where to go from here, as I am having trouble understanding how this square matrix (uy|uz|xux + yuy + zuz + dud + w) is supposed to look like.
uy, uz, ux and w are all vectors.

4. ## Re: GPS - Finding a quadratic equation from three linear equations

Im closing in on the deadline for the delivery of my problems, and the teacher is of course unavailable. Any help would be appreciated.