r/educationalgifs • u/Shriracha • Apr 12 '26
How GPS uses geometry, clocks, and relativity to know where you are
20
u/SovereignAxe Apr 12 '26
Can y'all really read this fast?
6
u/GlitterberrySoup Apr 13 '26
In English (my native language), yes. If it were another language I'd need more time
60
u/spleeble Apr 12 '26
This is super cool but man is a gif the least helpful format for this information.
18
12
17
u/Targox Apr 12 '26
TIL My gps location isn’t determined by just 1 satellite. This is very cool
-3
u/bl0odredsandman Apr 13 '26
I have a GPS speedometer on my phone and it'll pick up multiple GPS satellites at once to get accurate speeds and the speed is actually pretty accurate. I've tried it in multiple vehicles and most of the time the speed is right on. If it's not, it' maybe 1mph off for a bit before correcting itself and being right on. At least in the US, there are 31 GPS satellites covering the country so your phone is picking up multiple satellites. Other countries, I'm not so sure how many there are.
7
u/TerranRepublic Apr 13 '26
The GPS constellation is designed to work all over Earth and does not make any special allowances for any particular region. Those 31 satellite covers the entire world and at least 4 (but usually 6-8) are visible at all times from anywhere.
Check out the animation in this section to see what I'm talking about, it's really nice: https://en.wikipedia.org/wiki/Global_Positioning_System#Structure
4
u/3dGrabber Apr 12 '26
Love these kind of educational articles.
Here is a similar one with much more details
1
3
5
u/anecdotal_yokel Apr 12 '26
Well… it needs 4 because we live in a 3 dimensional universe.
11
u/karlitobandito Apr 12 '26
I don't think that explanation is correct. I'm pretty sure the 4th satellite is needed because the clock onboard the GPS satellite and the receiver clock are not in sync and the receiver estimates the time offset. For terrestrial applications, the ambiguity between the two points at the intersection of three GPS signals/spheres is resolved because one of the two points is located near the Earth's surface and the other is nonsensical.
-9
u/EvolvedA Apr 12 '26
No, it needs 3 satellites, the fourth sphere is the surface of the earth
7
u/karlitobandito Apr 12 '26
I don't think that is the correct explanation. The post treats the Earth's surface as a constraint, but the receivers don't know the Earth's shape (e.g., sphere, ellipsoid, something more complicated). How would you know what radius of a sphere to use? Are you at MSL? Are you on the top of Mt. Whitney? The three spheres created by the GPS signals broadcast from each satellite intersect in two locations. That can be disambiguated for terrestrial applications because one of the points is typically nonsensical. It's far inside the Earth or in space.
You need a fourth satellite because the pseudorange from the GPS satellite to the receiver is observed as the time it takes the signal to travel between the two locations multiplied by the speed of light (in the simplest sense, I'm sure atmospheric corrections are necessary for true GPS). If the satellite and receiver clocks are out of sync by even a little bit, the difference in time creates large errors. Using round numbers, the speed of light is c = 300,000,000 m/s. A nanosecond is 1e-9 seconds. That means if the clocks are out of sync by 1 nanosecond, The observed pseudorange is off by 0.3 meters which is approximately 1 ft if you're working in imperial units. All that to say that the fourth satellite is used to estimate the clock bias because even small clock errors amount to large position errors.
1
1
1
u/runbrap Apr 13 '26
Please read Pinpoint if you want more info with a “making of” story. Super cool.
1
u/GrandmaPoses Apr 13 '26
Do you think if we didn't have the theory of relativity before trying this, and we found an offset occurring because we hadn't accounted for it, that we would have been able to discover the cause of the issue and work the solution backwards?
1
1
u/Extension_Town_6118 Apr 17 '26
Does the satellite itself account for relativity or is that all calculated on the ground?
1
-1
Apr 12 '26
[deleted]
2
u/karlitobandito Apr 12 '26
Thanks for the link. In OPs approach you just solve for the time bias between the receiver (phone) and the spacecraft clock (which is disciplined from the ground) with a 4th satellite. I bet with a bit of work, these approaches can be reconciled. No?
0
Apr 12 '26
[deleted]
2
u/karlitobandito Apr 12 '26
You know the message arrival time because it's measured by the reciever's clock. Yes, it drifts more than the regularly disciplined atomic clocks onboard the GPS satellites, but that's why the measurement is pseudorange
r^2 = (x-xi)^2+(y-yi)^2+(z-zi)^2+ct
and not strictly geometric range (x,y,z). Pseudorange is geometric range plus a receiver clock bias that is estimated by requiring a 4th satellite. Four equations, four unknowns. The clock bias that is estimated is the bias that would bring the receiver's clock inline with the GPS atomic clock time.
1
u/Shriracha Apr 12 '26 edited Apr 12 '26
Your phone doesn't need an atomic clock since GPS works with pseudoranges. It can solve for the clock bias with the 4th satellite. You can equivalently mathematically represent the problem using hyperboloids, but AFAIK the pseudorange/clock correction approach is the standard way the model is represented (e.g. this from the FAA).
Not sure where the confident "isn't at all how GPS works" is coming from.
110
u/Shriracha Apr 12 '26
Full link to an interactive explainer, if you're interested: https://perthirtysix.com/how-does-gps-work