1

Going through the working of GPS technology, I came to know that at least 4 satellites must be visible to solve for the location with considerable accuracy. Going through most of the resources, I can visualize how three coordinates of the location are determined.

But there is an error in this calculated location due to the timing offset. So this calculation is invalid. In order to make the calculation valid, the timing offset must be considered. And this is the propose of the 4th satellite.

How exactly does the 4th satellite know the timing offset? 

If we talk about the differential GPS, the actual base station's location is compared against the GPS determined location and the timing offset is calculated and transmitted to the receiver within certain coverage area. But if we talk about direct communication between the satellite and my mobile phone, the actual position is to be determined unlike the base station where it is already known.

Hoping for a clear and more visual answer (rather than mathematical) from this community as always. Thank you!!

G-aura-V
  • 1,079
  • 1
  • 8
  • 21
  • It would be the centroid of 4 time difference values with angular spacing of Sattelite ID. But in a high rise zone downtown 4 is not enough and reflections will place you a few blocks away. – Tony Stewart EE75 Mar 05 '21 at 16:39
  • Also check this answer https://electronics.stackexchange.com/a/271912/124276 for link to GPS docs. – Andreas Mar 05 '21 at 17:06

3 Answers3

12

The satellite doesn't know your timing offset. GPS is a one-way street: the satellites basically only transmit their own time. Your receiver needs to do the rest, as the satellites can't know you even exist.

So, you really need to re-visit what you've learned about GPS so far!

Regarding the timing offset estimation: Don't consider the timing as a separate thing from the position. Instead, consider the 3 dimensions of your location and the time as one estimation problem with 4 unknowns.

All you get from your satellites is the time it was when they transmitted a signal. Your receiver hence only sees a time difference of arrival between these four. Only after solving the equations that gives all four unknowns by inserting all four time differences can you answer any of the questions of "how far North am I? How far west am I? How high am I? What is the time?", and you can answer all of them. So, it's either "all" or "none", not "location separately from time".

Marcus Müller
  • 88,280
  • 5
  • 131
  • 237
  • I got your point about the 4 equations and 4 variables. "Your receiver hence only sees a time difference of arrival between these four." If I consider the time of arrival of signal (t+dt) where t is the actual time difference in the atomic clock and dt is the error, I have 5 unknown parameters including previous 3. So, the receiver needs to know either t or dt. But, I don't know t since there is no atomic clock in receiver and I don't know dt because none of the satellite has sent it. A visual approach would be of great help. Thank you @MarcusMuller. – G-aura-V Mar 05 '21 at 17:00
  • 4
    @G-aura-V: As I understand it, your receiver adjusts its own clock, thereby changing the apparent distance to each satellite, until the spheres of position from all satellites intersect at a point (or as small a volume as possible). This will result in the receiver's clock matching the GPS system clock. – Peter Bennett Mar 05 '21 at 17:12
  • Exactly, Peter. It is fair to assume the receiver has *absolutely* no notion of "world time" before it has acquired a full GPS lock incorporating signals from at least 4 satellites. (In fact, for people like me that sometimes need to care about exact frequencies: A GPS fix gives me exact time information, and for that to work the receiver needs to reconstruct the GPS chip frequency pretty exactly, which is great, because it means GPS can be used as frequency standard. Who cares about *where* you are if you can have a 20 ppb-accurate frequency?) – Marcus Müller Mar 05 '21 at 17:20
  • 2
    @G-aura-V I can't visualize this great, because time isn't very visual, unless you find it easy to visualize spheres in four-dimensional spaces ... I don't. I see an invertible system of equations (neglecting noise/pertubations) with four unknowns and four knowns, and my receiver simply solves that. Can't solve it with only three knowns, not even for only three unknowns, since they all depend on each other. – Marcus Müller Mar 05 '21 at 17:21
  • 1
    The spheres peter sketches in his comment are cool, *but your receiver can't know their diameter*. It can only say "OK, let's call the satellites A, B, C, and D. I know that I'm on a sphere with unknown radius R from A, I can tell you that the sphere I'm on around satellite B is R+100 km in radius, and for C it's R+4000.1233 km in radius, and around D it's R+2202.22 km". But you don't know the absolute radius of these spheres, before you use this knowledge from all four satellites and combine it to calculate one absolute distance. Then, the rest (all four distances + time at your receiver). – Marcus Müller Mar 05 '21 at 17:29
  • 1
    @MarcusMüller It's not that difficult to use Minkowski space-time diagrams here. I've seen really good visuals done before. [This one isn't the best case](https://arxiv.org/pdf/1408.1280.pdf), but it gets part of it across pretty well as a start and it was easily found. If I re-find some of the better ones, I'll drag them over here. There's also this one with a Penrose diagram of Minkowski \$\mathscr{R}^{3+1}\$. – jonk Mar 05 '21 at 17:49
  • @jonk good idea to reduce the location problem to two dimensions first to make visualization easier! Yeah, that way G-aura-v could visualize this (at least deferring the problem of extending their understanding to 3D + time space to after the principle of space-time estimation is understood)! Nice. – Marcus Müller Mar 05 '21 at 17:53
  • @MarcusMüller When I was first exposed to Minkowski's mathematization of Einstein's special theory as a teenager, it was really nice to have. Then I got all excited by [Kaluza and Klein](https://en.wikipedia.org/wiki/Kaluza%E2%80%93Klein_theory). Kaluza, with the cylindrical constraint introduced a 5D approach and then Klein took this into quantum mechanics! The ideas were interesting and Klein's ideas still inform the idea of curled dimensions present in M- (string-) theories. Off-topic, though. Oh, well. – jonk Mar 05 '21 at 18:02
  • @jonk you're very much overestimating the mental access I have to special relativity there :) But this gives me something for long weekend evenings to read up on. – Marcus Müller Mar 05 '21 at 18:03
  • @MarcusMüller I always enjoyed math. Kaluza's first paper on this was 1919 and Klein's was in 1926, I think. One of the interesting aspects of M-theory is that it proposes that every elementary Fermion is matched by an elementary Boson (keep in mind that Fermions can become entangled into Bosons.) They are mapped to each other through a reflection-space. I remember getting into a late-night discussion with Dr. Saul-Paul Sirag (a string theorist) and realizing that what he was talking about looked a lot like "error-correction." That discussion became a chapter in his 2016 book! – jonk Mar 05 '21 at 18:13
  • @MarcusMüller He then related this back to the concept of "packing spheres" and we had a long discussion, that evening. I think I opened his eyes to the idea that M-theory may actually be proposing a quantum space-time that appears to possess self-correction dimensions to "correct" random errors that otherwise would unwind the universe we are in. He got kind of 'very interested' at that point. There are lots of interesting side-paths, too. Coxeter's Polytropes book is wildly abstract but actually relates to all this. I also found Gilmore's Lie Groups and Algebras really helpful. – jonk Mar 05 '21 at 18:18
  • @MarcusMüller That discussion with Dr. Sirag was circa 2005 or 2006, I think. We would meet at his home every month for many years. My wife would spend time with his wife while he and I would sit in a car, or outside, or in the house in the kitchen and just talk over ideas. Mostly, he was teaching me. But once in a while his discussions would resonate with something else I knew. It was really a very enjoyable period for me. – jonk Mar 05 '21 at 18:22
  • @PeterBennett I didn't get what you actually mean by adjusting the clock. What is the basis to adjust its clock? All it knows is the timestamp sent by the GPS satellite. What is the time in receiver after adjusting the clock? – G-aura-V Mar 06 '21 at 06:16
  • 1
    @G-aura-V again, that can only be answered by **combining** receptions of all four satellites. Before, the time is unknown to the receiver. See my [example in the comment I gave](https://electronics.stackexchange.com/questions/551458/how-does-the-4th-satellite-in-gps-know-the-time-offset/551462?noredirect=1#comment1436637_551462): the receiver knows it's "A's transmitted time + R/speed of light" now, but it doesn't know R at that point. Slightly repeating myself, the position and time together are the thing you need to estimate from the reception, you can't do one without the other, really! – Marcus Müller Mar 06 '21 at 12:26
  • Ah!! Got it. My mind just clicked what you are trying to convey. Thanks a lot!! – G-aura-V Mar 06 '21 at 12:29
  • @G-aura-V glad to hear that! With that in mind, maybe read through V.V.T's answer again, I think it will be easier to follow the flow there! – Marcus Müller Mar 06 '21 at 12:32
5

Although there are multiple timing offsets in the context of GPS operation with some of these parameters being measured and the others calculated, most probable you are talking about the timing offset of the receiver clock relative to the GPS time.

Theoretically, the receiver can calculate its coordinates from the time of flight (TOF) values, solving the geometry problem of trilateration. The TOFs are calculated as the differences between the time of arrival (TOA) and the time of transmission (TOT) values. The TOA is eventually read from the receiver clock for an idealized problem of the exact receiver clock, the TOT is encoded in the GPS signal received from the GPS satellite.

But the precision of the commercial receiver's clock is insufficient to get any meaningful result for the receiver position calculated in this way. In practical implementations, the receiver coordinates and the "precise" time at the receiver are computed in one batch by solving the navigation equations. By the "precise" time data at the receiver, I mean that the timing error is that small as if this data is read from the clock having a precision comparable to that of satellites' atomic clocks. Technically, there is a parameter called GPS time, a synthetic value maintained in the GPS control segment, and the purpose of solution of navigation equations is: in the user segment (receiver), to get to the timing precision comparable to the GPS time precision.

The navigation equations are nonlinear, and can be solved by analytical or numerical methods. The pseudoranges (TOFs divided by the speed of light) are used in both analytical (closed-form) or numerical (iterative) methods.

Let \$r_x, r_y, r_z\$ are the receiver's coordinates (unknowns); \$r_t\$ is a true reception time, also unknown. Notice that a character \$r\$ in \$r_{...}\$ variable designations is used to indicate that these parameters are representing the receiver's variables.

The values \$s_x, s_y, s_z\$, the satellite's coordinates, and \$s_t\$, the time when the message is sent from the satellite, are calculated using the data decoded from the received message. These are the known coefficients of the navigation equations. Notice that the \$s_t\$ value is measured in GPS time scale, GPS time is considered here to closely approximate "absolute time".

The equation relating the receiver's and the satellite's time and coordinate parameters is $$ (r_x - s_x)^2 + (r_y - s_y)^2 + (r_z - s_z)^2 = c^2(r_t - s_t)^2 $$ , \$c\$ is the speed of light.

To solve for four unknown variables (three coordinates and time), four equations are required, relating the four unknown parameters of the receiver to the time and coordinate parameters read from four messages received simultaneously from four different satellites: $$ (r_x - s1_x)^2 + (r_y - s1_y)^2 + (r_z - s1_z)^2 = c^2(r_t - s1_t)^2 \\ (r_x - s2_x)^2 + (r_y - s2_y)^2 + (r_z - s2_z)^2 = c^2(r_t - s2_t)^2 \\ (r_x - s3_x)^2 + (r_y - s3_y)^2 + (r_z - s3_z)^2 = c^2(r_t - s3_t)^2 \\ (r_x - s4_x)^2 + (r_y - s4_y)^2 + (r_z - s4_z)^2 = c^2(r_t - s4_t)^2 $$ Notice that, from a pure geometrical viewpoint, one can do without the receiver's clock entirely and solve the navigation equations in this form.

The receiver clock is necessary to implement a sequential logic of decoding navigation messages and keep track of telemetry and handover words and other data. Even if one chooses to solve navigation equations in closed form, one still needs the receiver clock in hardware, in the user segment.

For the iterative solutions, the use of pseudoranges helps in finding the first approximation step. With both calculation methods (analytical and numerical), the navigation equations can be rewritten using pseudoranges. Using a definition of the satellite pseudorange via the TOF, the RHS of navigation equations can be rewritten as \$c^2·(r{\text N}_t - s{\text N}_t - b)^2\$, where \$b\$ is a bias of the receiver's clock w.r.t. GPS time and \$r{\text N}_t - s{\text N}_t\$ is the TOF of the navigation message received from the N-th satellite, calculated without correction. The TOF is calculated as the difference between the receiver clock measurement, \$r{\text N}_t\$, and the TOT, \$s{\text N}_t\$, embedded in a message subframe, both \$r{\text N}_t\$ and \$s{\text N}_t\$ are given values derived from the measurements, and only the bias \$b\$ is unknown. The bias \$b\$ replaces the receiver time unknown of the "pure-geometrical" navigation equations.

To actually improve the position and time detection, the navigation messages from multiple (more than four) satellites can be used, if available. With more than four equations, the system is overdetermined and best-fitting solutions must be sought.

In some applications, the receiver can detect the position with only three satellites in sight, using an additional constraint of the receiver elevation received from the additional data source (a reference data of Earth's ellipsoid and topography) or alternative sensors.

Back to the pure geometrical problem with exact measurement data: the system of quadratic equations has two solutions. Two loci satisfy the navigation equations. For the receivers located at the Earth's surface and in the near-Earth orbiter, the criterion separating the real and the spurious solutions is evident.

To select the right solution of the two introduced by the quadratic form of navigation equations, one more independent equation must be added to the set of navigation equations, so that the number of reference points in the multilateration problem becomes equal to the space dimensionality plus one. For example, when we calculate the position of the point on a line (1D), the distances from the two fixed points of this line must be given, because we need to differentiate between two points located at equal distances but in opposite directions from the origin. Both these points satisfy one quadratic equation of one-dimensional problem, if we have only one reference point.

For trilateration in the plane (2D), three non-collinear reference points are needed; for each point located at given distances from two reference points there exists a symmetrical point w.r.t. the line connecting these two reference points; the distance from a fixed third point, non-collinear to the first two, removes the ambiguity. Notice also that the solution may not exist for some data sets; for example, when all the distances given are less than half the least distance between any pair of reference points.

Similarly, four non-coplanar points are needed for the uniqueness of the solution of the multilateration problem in three dimensions.

Viewed as the geometry problem of finding the unique solution, the global positioning system requires five reference points (satellites), because four variables (three coordinates and time) are to be found, and also the square root sign ambiguity of the quadratic equation solution must be resolved. Only because the spurious solution is usually far off the near Earth space, four satellites suffice.

For excellent visuals, see Multimedia sections of https://www.gps.gov, https://navcen.uscg.gov/, Wikipedia articles on GPS/GNSS, and websites of engineering schools, for example of the University of Colorado, Boulder.

V.V.T
  • 3,521
  • 7
  • 10
3

Your GPS receiver can measure time differences accurately, but doesn't know exactly when the satellites have sent their signals (or rather when the receiver exactly received the signal). The receiver knows the locations of the satellites, because it knows the schedules of the satellites and can determine the location of the satellites at the time of transmission from the schedule.

Consider a two dimensional simplified example with two satellites. Let's also assume the satellites send the signals at the exact same time.

We measure some time difference of Δt when receiving the signals. This means that the signal has travelled Δt * c (c is speed of light) longer from one satellite than the other. The coloured circles in the picture represent the signals from the satellites at different distances with the circles being Δt * c larger on the satellite whose signal was received later.

We now know that our receiver must be somewhere on an intersection of one pair of the circles, i.e. on the black curve (which is not actually a straight line).

Now what if we add a third satellite? It should be fairly clear that we are then left with only two possible points, one of which we can rule out by deduction (i.e. we're probably closer to the surface of the Earth rather than in outer space) or by including one more satellite. Also then we'll know the exact distance to any of the satellites and we can compute the exact time the signals were sent.

It's pretty easy to imagine how this works in three dimensions. You just need one satellite more than in the 2D case, which gives us the four satellites. Or five, if we can't otherwise rule out the second solution.

Two dimensional GPS

TrayMan
  • 216
  • 1
  • 4
  • First sentence: exactly the wrong way around: the receiver only sense when exactly the signals were sent. Without that, it couldn't have known the position of the satellites at that time! – Marcus Müller Mar 06 '21 at 12:33
  • With reference to it's own time keeping, the receiver doesn't know the precise time of the transmissions. With reference to the GPS system time, the time of reception is unknown. Either way the precise time coordinate can't be directly measured by the receiver. The GPS signals do contain time information, which the receiver can use to sync it's own clock for computing the satellite positions, but in principle, the receiver could use some other means of time keeping for that. Of course the schedule should tell the exact position when the signal was sent. – TrayMan Mar 06 '21 at 15:07
  • I think you need 4 satellites to solve for the 4 unknowns, \$X, Y, Z, T\$. The clocks in the receivers are generally not good enough without correcting them to GPS time. – Elliot Alderson Mar 06 '21 at 20:03
  • @ElliotAlderson Clarified that four satellites are needed. – TrayMan Mar 06 '21 at 20:17
  • My 2 cents: the black line in the otherwise nice picture is not two intersecting lines, but a hyperbola instead. – fraxinus Mar 06 '21 at 22:52
  • @fraxinus Good catch! I thought it might be, but of course didn't bother to check, just eyeballed it. – TrayMan Mar 07 '21 at 08:07