Game Development Reference
In-Depth Information
where d is the distance between the known locations of satellite 1 and satellite 2. We
now substitute our x coordinate back into the first circle's equation:
y 2 = r 1 2 - [((r 1 2 - r 2 2 + d 2 ) 2 ) / (4d 2 )]
and finally after we take the square root:
y = ± r 1 2 - ( r 1 2 - r 2 2 + d 2 ) 2
4 d 2
notice that the y value is now expressed as a positive or negative square root. This means
there can be zero, one, or two real-number solutions. If the circles do not intersect, then
the quantity under the square root will be negative and the y value will have zero real
solutions. This is unlikely for the first two satellites because you have already received
pseudoranges to them in the form of r 1 and r 2 , which the algorithm assumes to have
zero error. If the two circles happen to intersect at only a single tangent point, the y will
have one solution and will be equal to 0. This is also unlikely. The most likely result will
be that y will be the set of two values, plus or minus the square root of a positive value,
and that those two points will be widely separated.
Now if we included the assumption that we were on the earth's surface, we could already
break the tie between the two points by picking whichever was closest to the earth's
surface. However, we still would have to deal with the likelihood that there is a large
error in our position given the imprecise clock in the receiver.
We can fix our position ( x,y ) with no assumptions and account for clock bias by intro‐
ducing the third point and its pseudorange. Now, it was very likely that the circles
obtained from the first two satellites would intersect because of the way that GPS sat‐
ellites are arranged around the earth. However, because our calculations use pseudor‐
anges, it is relatively unlikely that the third circle will pass directly through one of the
two points defined by the intersection of the first two circles. To remove such clock-
related distance errors, we first calculate which point ( x,y ) or ( x,-y ) is closer to ( i,j ) and
choose that to be our assumed location. The difference between the smaller of these two
distances and the pseudorange r 3 is then our distance correction, d a . As the signal is
traveling at the speed of light, the following quotient provides an estimate of the error
between the correct time and the receiver's time:
b = d a /c
As all the GPS satellites have synchronized atomic clocks, the same bias exists for each.
This means that the bias we calculated would actually affect the first pseudoranges we
used to find our initial bias. Therefore an iterative approach is required to adjust all the
variables in real time until they converge. A more direct, but less obvious, algebraic