A Random Code?
The Pseudo Random Code (PRC, shown above) is a fundamental part of GPS. Physically it's just a very complicated digital code, or in other words, a complicated sequence of "on" and "off" pulses as shown here:
The signal is so complicated that it almost looks like random electrical noise. Hence the name "Pseudo-Random."
GPS Signals in Detail:
The GPS satellites transmit signals on two carrier frequencies. The L1 carrier is 1575.42 MHz and carries both the status message and a pseudo-random code for timing.
The L2 carrier is 1227.60 MHz and is used for the more precise military pseudo-random code.
There are two types of pseudo-random code (see tutorial for explanation of pseudo random codes in general). The first pseudo-random code is called the C/A (Coarse Acquisition) code. It modulates the L1 carrier. It repeats every 1023 bits and modulates at a 1MHz rate. Each satellite has a unique pseudo-random code. The C/A code is the basis for civilian GPS use.
The second pseudo-random code is called the P (Precise) code. It repeats on a seven day cycle and modulates both the L1 and L2 carriers at a 10MHz rate. This code is intended for military users and can be encrypted. When it's encrypted it's called "Y" code. Since P code is more complicated than C/A it's more difficult for receivers to acquire. That's why many military receivers start by acquiring the C/A code first and then move on to P code.
There is a low frequency signal added to the L1 codes that gives information about the satellite's orbits, their clock corrections and other system status.
There are several good reasons for that complexity: First, the complex pattern helps make sure that the receiver doesn't accidentally sync up to some other signal. The patterns are so complex that it's highly unlikely that a stray signal will have exactly the same shape.
Since each satellite has its own unique Pseudo-Random Code this complexity also guarantees that the receiver won't accidentally pick up another satellite's signal. So all the satellites can use the same frequency without jamming each other. And it makes it more difficult for a hostile force to jam the system. In fact the Pseudo Random Code gives the DoD a way to control access to the system.
GPS was developed by the Defense Department primarily for military purposes. And even though it's been estimated that there are ten times as many civilian receivers as military ones the system still has considerable military significance.
To that end the military maintains exclusive access to the more accurate "P-code" pseudo random code. It's ten times the frequency of the civilian C/A code (and so potentially much more accurate) and much harder to jam. When it's encrypted it's called "Y-code" and only military receivers with the encryption key can receive it. Because this code is modulated on two carriers, sophisticated games can be played with the frequencies to help eliminate errors caused by the atmosphere.
But there's another reason for the complexity of the Pseudo Random Code, a reason that's crucial to making GPS economical. The codes make it possible to use "information theory" to "amplify" the GPS signal. And that's why GPS receivers don't need big satellite dishes to receive the GPS signals.
We glossed over one point in our goofy Star-Spangled Banner analogy. It assumes that we can guarantee that both the satellite and the receiver start generating their codes at exactly the same time. But how do we make sure everybody is perfectly synced? Stay tuned and see.