Dylan Kilpatrick and Wonjun Lee

Project 2: GPS, Conditioning, and Nonlinear Least Squares

Part 2

Parts 1, 4, 5, and 6

Part 2 asked us to use 4 satelite positions and time to determine location using algebra and the quatdratic equation. The equations relating the satelite positions and times to our location on Earth can be seen in the figure below.

Part 2 Image A
Figure 4.38
Numerical Analysis: 2nd Edition

These equations begin in terms of x, y, z, and d (the error of our clock on earth). The squared terms can be removed by subtracting any of the last 3 equations from the first. This yields 3 linear equations. Using our knowledge of matricies, we can get equations in terms of only x, y, or z, and d.

Part 2 Image B

This can be easily rearanged to solve for x. Once x, y, and z are in terms of d, replacing any of the equations in figure 4.38 yields a quadratic equation in terms of d. After rearranging the equation to determine the coefficients for the quadratic, the equation can be solved simply with the quadratic formula. The matlab code file here performs all of these steps.

The code gave us the following:

d = -.0032
x = -41.7727
y = -16.7892
z = 6370.1

Parts 1, 4, 5, and 6

Credit for Part 2 goes to Dylan. Credit for parts 1, 4, 5, 6 goes to Wonjun.