← Back to context

Comment by petee

2 days ago

Maybe i missed it, but the first step kinda skips over how the inital time is calculated - the cell can't know when the signal was transmitted without some prior time or location knowledge?

> the cell can't know when the signal was transmitted without some prior time or location knowledge?

The signal that GPS satellites broadcast includes the current time, so knowing when the signal was transmitted is easy.

Knowing when it was received is harder, you would need a calibrated, synchronized clock. But you need to receive multiple signals to figure out your clock, so keep reading for that.

Good catch. The trick is you don’t need a good clock on the phone. Really all you’re measuring is the difference in time signals between the satellites. The clocks on the satellites are (effectively) perfectly synced with each other. So what you measure is that one satellite is ### meters further away from another. Not absolute distance to each satellite.

It means you need to connect to one more satellite to remove that extra degree of freedom. If your phone had an atomic clock you could get your absolute position in 3D only listening to three GPS satellites, but because of local clock skew you need a signal from a fourth satellite.