Re: end UK dependance on GPS?
But how does your device know the distance to each satellite?
It doesn't (initially). The calculation is very much chicken-and-egg. Initially you only know the approximate *difference* in distance between you and each satellite being received - this being calculated from the difference in the time-stamps each satellite sends from its on-board atomic clock. (It is approxiate because the amount of refraction of each signal is at that point unknown). The latest time stamp being from the satellite closest to you, and the earliest time-stamp from the most distant satellite. As you do not know the absolute distance between you and any satellite, you also do not know the real time to any great accuracy, and hence the exact position of each satellite in its orbit.
But so long as the geometary (relative positions) of the satellites are favourable, then there will only be one place on the surface of the Earth where any particular combination of distance differences between 3 or more satellites can occur. So if you are receiving 3 or more suitably placed satellites you can calculate your approximate position. Then you can reverse calculate the distance to any satellite, also its elevation to get a more accurate figure for the amount of refraction of its signal as it passes through the ionosphere, and from that calculate the time its signal took to reach you, and hence get a more accurate real-time as given by the satellite's atomic clock.
So the whole thing is re-calculated with the more accurate information. Do this several times (iterations) and the position will (should) converge until it stops changing between iterations or reaches the desired accuracy.
Note that the refraction amount is not an accurate variable even if you know your time & position 100% because the ionosphere is constantly changing in strength, height and thickness in a way that cannot be accurately determined, and so the amount of refraction cannot be known with absolute accuracy. This puts a limit on the best positional accuracy possible with the system, especially if all the satellites used are low to the horizon.
If you have an accurate real-time clock, then you could calculate position with only 2 satellites rather than 3 (Add one satellite if you are not on the surface of the Earth).