How GPS works (was Bus Information Signs)
On Mon, 28 Apr 2008, Clive D. W. Feather wrote:
In article ,
Mr Thant writes
I think how it works is the receiver has to jump between frequencies
on the same pattern as the satellite it wants to listen to.
True, I believe.
I believe it's actually CDMA rather than frequency-hopping. Although the
two are probably equivalent in some deep way.
The receiver therefore needs to know which pattern each satellite is
using,
But this will be pre-programmed in some way.
Yes, this isn't complicated. There's a pseudo-random number generator
algorithm, for which each satellite has its own seed, and the receiver
knows the algorithm and the seeds. The generator and seed are used to
produce a 1023-bit code which is used to modulate the carrier in the CDMA
scheme.
and it also needs a separate tuner for each satellite. Because
most have far fewer tuners than there are satellites (usually 12, vs
30ish) they need to know in advance which satellites are overhead.
So this means a receiver needs to already know current approximate
location and the current time, and the orbit and frequency pattern
information about the satellites. This is why it takes ages for a
brand new or freshly reset GPS unit to get any sort of lock (up to an
hour).
That's not my experience, nor do I see why it needs to be like that.
You listen in on one of the frequencies (call it A) and look for a
regular "blip" (the frequency hopping sequence repeats every
millisecond). If 8 satellites are visible you should get 8 such blips at
various points in the cycle. You choose one of them and pick another
frequency (B) and start listening in an
ABBBBB...BBABBBBB...BBABBBBB...BBABBBB pattern until you get two blips
per millisecond. Hopefully only one or two satellites are using a
pattern which matches that and you can quickly find which. If the
ABBBBB... pattern gives you more than two blips, you've been unlucky and
found two satellites hitting A at exactly the same moment, but again you
pick one of the B hits and go for a third frequency.
For that matter, once you've locked in on an A signal at regular
intervals, you can simply try each of the 31 sequences and see which
ones work.
[Since there are less frequencies than there are steps in the sequence,
it's a bit more complicated than this. But that's the principle.]
That would make perfect sense if the satellites used frequency hopping.
Rather, there's one frequency, producing a stream of bits which are the
sum of the signals from all the satellites. CDMA lets you filter that
stream and recover a single satellite's signal. Basically, the CDMA
decoder takes the raw, summed signal, plus one of the 1023-bit codes, and
gives you back the satellite signal that was modulated with that code. The
code input and satellite signal need to be in sync, so this takes some
time to get right: the modulation is at 1.023 MHz, so it takes 1 ms for a
repetition of the code, and there are 1023 possible offsets of the code
and signal inputs, which will thus take 1.023 seconds to work through.
Once you've got one, you remember it, and try another code, until you've
got enough satellites. Even running through all 30 of the satellite codes
will only take 30 seconds to do this.
I believe most of the delay in syncing up with satellites is reading all
the data from the signal, which is transmitted at a relatively slow
rate.
That's certainly what wikipedia says: the 'navigation message' goes at 50
bits per second, and carries 1500-bit frames, each of which takes 30
seconds to transmit. 600 bits of that are a segment of the 'almanac',
which is a collection of information you need to work out position; the
almanac is 15 000 bits long, so it takes 25 frames to transmit the whole
thing. That's 12.5 minutes. Once you have a copy of the almanac, you can
use the transmitted segments to keep it up to date, but you never have to
do the 12.5 minute wait again. Unless you stop getting updates for some
period of time, eg because the receiver's switched off. The almanac is
valid for 180 days, though, so if it's switched on again inside this time,
it can go straight into action.
Although the 12.5 minute figure is based on receiving all the segments one
after another. Since each satellite is transmitting segments
independently, if they were arranged cleverly, you should be able to
receive several at once, which would reduce the time taken. I don't know
if they are arranged cleverly, or if the satellites transmit in sync with
each other.
tom
--
megaptera novae angliae, soundwork chris draper, push, pull, open, ..
|