Project 2: GPS, Conditioning, and Nonlinear Least Squares

Team members: Aidan Curran, Lindsey Wallace

Contents

Background

The global positioning system (GPS) consists of 24 satellites carrying atomic clocks, orbiting the earth at an altitude of 20,200 km. Four satellites in each of six planes, slanted at 55 degrees with respect to the poles, make two revolutions per day. At any time, from any point on earth, five to eight satellites are in the direct line of sight. Each satellite has a simple mission: to transmit carefully synchronized signals from predetermined positions in space, to be picked up by GPS receivers on earth. The receivers use the information, with some mathematics (described shortly), to determine accurate (x,y,z) coordinates of the receiver. At a given instant, the receiver collects the synchronized signal from the ith satellite and determines its transmission time ti, the difference between the times the signal was transmitted and received. The nominal speed of the signal is the speed of light, c ? 299792.458 km/sec. Multiplying transmission time by c gives the distance of the satellite from the receiver, putting the receiver on the surface of a sphere centered at the satellite position and with radius cti. If three satellites are available, then three spheres are known, whose intersection consists of two points, as shown in Figure 4.16. One inter- section point is the location of the receiver. The other is normally far from the earth?s surface and can be safely disregarded. In theory, the problem is reduced to computing this intersection, the common solution of three sphere equations.

View Reality Check 4.

Part 1-- Solve the system using Multivariate Newtons Method.

Find the receiver position (x,y,z) near earth and time correction d for known, simultaneous satellite positions (15600,7540,20140), (18760,2750,18610), (17610,14630,13480), (19170,610,18390) in km, and measured time intervals 0.07074,0.07220,0.07690,0.07242 in seconds, respectively. Set the initial vector to be (x0,y0,z0,d0) = (0,0,6370,0). As a check, the answers are approximately (x,y,z) = (-41.77271,-16.78919,6370.0596), and d = -3.201566 × 10-3 seconds.

View the GPS Newtons function.

We want the output to be as requested above: x = -41.77271 y = -16.78919 z = 6370.0596 and d = -3.201566 × 10-3 seconds.

gpsNewtons(0,0,6370,0)
xv =
   1.0e+03 *
  -0.041772709570824
  -0.016789194106523
   6.370059559223344
  -0.000003201565830
x =
 -41.772709570824013
y =
 -16.789194106523418
z =
     6.370059559223344e+03
d =
  -0.003201565829594

As we can see, out values from the Multivariate Newtons Method give the same as the given check: x = -41.77271 y = -16.78919 z = 6370.0596 and d = -3.201566 × 10-3 seconds

Part 2-- Repeat part 1 but solve via the quadratic equation

This step is revised from the current textbook version (2nd edition) Click on the link to take you to the revised step.

Revised Part 2 of Reality Check 4

View the quadratic function.

gpsQuadratic takes a value d and then computes the quadratic formula of the initial function in respect to d. The ouput gives the + and - from the quadratic function.

gpsQuadratic(0)
d1 =
  -0.003201565829594
x1 =
 -41.772709570835708
y1 =
 -16.789194106525994
z1 =
     6.370059559223344e+03
d2 =
   0.185173047095946
x2 =
 -39.747837348164673
y2 =
    -1.342741443606669e+02
z2 =
    -9.413624553735766e+03

Part 3-- Skipped

Step 3 is not required for this reality check.

Part 4-- Testing the GPS conditions

We are determining the spherical coordinates for 4 satellites and determining what error comes from the grouping. If the satellites are spread out, what sort of error are you expecting/how far off will the GPS calculations be.

View the GPS Newtons 4 function.

Testing with a d that is not 0

This function had d subtracting and adding the error (10^-8) for different satellites

The Satellite 1 with d + 10^-8

The Satellite 2 with d + 10^-8

The Satellite 3 with d - 10^-8

The Satellite 4 with d + 10^-8

+ + - +

gpsNewtons4(0,0,6370,0.0001)
deltaXYZ =
  -0.005090889144533
   0.001440618661976
  -0.004081159111593
fe =
   0.005090889144533
emf =
   1.696963048177566

We also did it a few more times changing the + and - order.

- - + +

deltaXYZ = 0.003301303727678, 0.004110673551411, -0.000040051929318

fe = 0.004110673551411

emf = 1.370224517136917

- - - +

deltaXYZ = -0.001789585469530, 0.005551293165365, -0.004121211562961

fe = 0.005551293165365

emf = 1.850431055121784

- + + +

deltaXYZ = 0.001088495524270, -0.000121920374234, -0.005135897871696

fe = 0.005135897871696

emf = 1.711965957232072

The largest EMF was 1.850431055121784 with the format being (- - - +) i.e. d-10^-8, d-10^-8, d-10^-8, d+10^-8

Part 5-- Testing specific GPS conditions

We repeat part 4 but with the coordinates within 5% of eachother.

View the GPS Newtons 5 function.

Testing with a d that is not 0

This function had d subtracting and adding the error (10^-8) for different satellites

The Satellite 1 with d + 10^-8

The Satellite 2 with d + 10^-8

The Satellite 3 with d - 10^-8

The Satellite 4 with d + 10^-8

+ + - +

gpsNewtons5(0,0,6370,0.0001)
deltaXYZ =
   1.636821468555766
   4.212384665645632
 -16.551309291831785
fe =
  16.551309291831785
emf =
     5.517103097277261e+03

We also did it a few more times changing the + and - order.

- - + +

deltaXYZ = -0.990233993423691, -2.822685539902142, 9.317679662708542

fe = 9.317679662708542

emf = 3.105893220902848e+03

- - - +

deltaXYZ = 0.645878466863195, 1.387775763925702, -7.227958000847138

fe = 7.227958000847138

emf = 2.409319333615713e+03

- + + +

deltaXYZ = 0.344744912925631 1.435889600388647 -3.255544370555072

fe = 3.255544370555072

emf = 1.085181456851690e+03

The largest EMF was 5.517103097277261e+03 with the format being (+ + - +) i.e. d-10^-8, d-10^-8, d-10^-8, d+10^-8

Part 6-- Adding more satellites

We repeat part 4 but with 5-12 satellites instead of only 4.

View the Final GPS function.

For the last part, we chose 7 satellites.

gpsNewtons6(0,0,6370,0.0001)
x =
    -1.218314640530268e-12
y =
    -2.193014096445225e-12
z =
     6.370000000000003e+03
d =
     1.000000000000106e-04
deltaXYZ =
   0.001986360084266
   0.003068059874210
  -0.000731171730877
fe =
   0.003068059874210
emf =
   1.022686624736675

The EMF = 1.022686624736675

This is our lowest EMF which we can conclude that more satellites are optimal to reduce error.