Game Development Reference

In-Depth Information

Figure 22-2. Satellite coordinate system

The equations of the three circles are therefore:

r
2
1
= x
2
+y
2

r
2
2
= (x-d)
2
+y
2

r
2
3
= (x-i)
2
+(y-j)
2

Each radius is found by subtracting the transmission time,
t
i
, from the current time and

multiplying by the speed of light. As the speed of light is very large, and our current

time is only a rough estimate, these radii are commonly referred to as
pseudoranges
to

remind us they are still approximate. The
x
and
y
values that satisfy these equations are

our current location in two-dimensional space. We now subtract the second equation

from the first:

r
1
2
- r
2
2
= x
2
+ y
2
- (x-d)
2
- y
2

r
1
2
- r
2
2
= x
2
- (x-d)
2

Solving for
x
gives:

x
= (r
1
2
- r
2
2
+d
2
) / 2d