All GPS satellites transmit on the same frequencies. So how does the receiver tell them apart? With CDMA (Code Division Multiple Access): each satellite modulates its signal with a unique, pseudo-random PRN code (Pseudo-Random Noise). The receiver knows all those codes and can recover each satellite signal separately through correlation — even though they lie on top of each other and below the noise (The fundamental vulnerability).
The code determines three things at once: the accuracy (a faster code = a sharper range measurement), the jam resistance (a wider code = more processing gain) and the access (open or encrypted). GPS has three main codes.
C/A code
The C/A code (Coarse/Acquisition) is the open, civil code on L1. Characteristics:
- Chip rate 1.023 Mcps (mega-chips per second) — relatively slow.
- A short code of 1023 chips that repeats every 1 ms; this makes it quick to find ("acquisition") for a cold receiver.
- Publicly known: anyone can receive it — and therefore also imitate it. That makes C/A the easiest to spoof (Spoofing and meaconing).
- Narrow spectrum (~2 MHz) → the lowest processing gain → the most vulnerable to jamming of the three.
The C/A code is therefore the weakest link: open, narrow and short. Almost all "civil" GPS interference incidents and spoofing attacks target C/A on L1.
P(Y) code
The P code (Precise) is the military precision code on L1 and L2. Characteristics:
- Chip rate 10.23 Mcps — ten times faster than C/A → a more accurate range measurement and a wider spectrum (~20 MHz).
- A very long code that only repeats after ~a week.
- Encrypted: the P code is encrypted with the secret W code to form the Y code; together this is called P(Y). This is anti-spoofing (A-S): without the key you cannot imitate the signal. Reception requires a crypto key (classically through SAASM receivers).
- Higher processing gain than C/A → more robust against jamming, and the use of two frequencies (L1+L2) enables ionospheric correction and extra resilience.
A practical drawback: P(Y) is hard to find "cold" because of the very long code. Classically, military receivers therefore find the C/A code first and then hand over to P(Y) — but that means a C/A jammer can also block access to P(Y). The M code solves exactly that.
M code
The M code (Military) is the modern military code (part of GPS modernisation), on L1 and L2. It was designed with the lessons of C/A and P(Y) in mind:
- New, stronger encryption and a design that allows direct acquisition: the M code can be found directly, without first having to pick up the C/A code. That closes the C/A-jammer back door from P(Y) code.
- BOC modulation (Binary Offset Carrier, BOC(10,5)): instead of one lobe in the centre of the band, the M code splits its energy into two lobes on either side of the band centre. This places it spectrally "next to" the C/A and P(Y) energy — less mutual interference, and harder to jam selectively.
- Spot beams: modern satellites can transmit the M code in a directed, more powerful beam over an area of operations, which gives extra power against jamming (a higher J/S threshold, GNSS jamming).
- High processing gain and autonomous, secure operation → the most jam-resistant and spoof-resistant GPS code.