Nav-Soft an OpenSource Software GNSS company.


Home > GPS Data Encoding

GPS Data Encoding Scheme

The GPS satellites transmit signals at 2 or 3 different frequencies, 2 for the older satellites and 3 for the newer. However most commercial GPS Recievers only use the 1575.42 Mhz frequency signal, know as the L1 signal. To allow the Receiver to determine the users position a lower frequency binary sequence is used to modulate the RF carrier signal using Binary Phase Shift keying commonly abbreviated to BPSK. To send a data message this binary sequence is then further modulated by simply inverting it, or not, based on a 0 or 1 being present in a 50 Hz data message binary waveform.

GPS Signal Modulation

The GPS RF carrier is modulated at a frequency of 1.023MHz with a bit pattern called the C/A or Coarse Acquisition code. This consists of a 1023 bit binary sequence that repeats every millisecond, this 1023 bit sequence is a Gold code that differs for each satellite.

A Gold code was used because they have some very useful properties that aided in the design of the GPS system.

Firstly when you combine 2 different Gold codes the result is always close to zero, since each satellite uses a different gold code this properties provides a means to determine which satellite is transmitting the signal.

Secondly when you combine 2 copies of the same Gold code the same also holds true except when they are within 1 bit of being in sync, when they are within 1 bit the combination goes from close to 0 to the number of bits in the sequence.This provides a means to determine the relative transmission time of the signal from different satellites to a high precision.

Thirdly by combining the modulation sequence from the satellite with a local copy of the same sequence it boosts the strength of the recieved signal above the background noise floor.

The C/A code available for civilian GPS receivers is a 1023 bit Gold code and the individual Gold codes for each satellite are generated as the Modulo-2 sum of two 1023 bit linear patterns, G1 and G2i. The G2i sequence is formed by delaying the G2 sequence a different number of bits for each satellite.

GPS Data Message

The GPS Data message is broadcast at 50 Hz and consists of 5 frames with each frame having 10 words each 30 characters long. So at 6 seconds per frame that means it takes 30 seconds for all 5 frames to be broadcast.

However that does not mean a full set of data, frames 4 and 5 each consist of 25 pages, this means a full 12 1/2 minutes are needed to gather a full set of data.

The first 3 frames contain the full Ephemeris message for the satellite broadcasting the message, this is the data that allows a very accurate position for the satellite to be calculated.

The Almanac for satellites 1-24 are broadcast one page at a time in frame 5 with pages 2-5 and 7-10 of frame 4 containing almanacs for satellites 25-32.

Page 25 of frames 4 and 5 contain satellite health and anti-spoofing statuses (anti-spoofing is now permanently disabled) and page 18 of frame 4 contains ionospheric delay model parameters and UTC or time conversion parameters. What's in the other frame 4 messages? We don't know, it's secret.

Word 1 Word 2 Word 3 Word 4 Word 5 Word 6 Word 7 Word 8 Word 9 Word 10
Word 1 Word 2 Word 3 Word 4 Word 5 Word 6 Word 7 Word 8 Word 9 Word 10
Word 1 Word 2 Word 3 Word 4 Word 5 Word 6 Word 7 Word 8 Word 9 Word 10
Word 1 Word 2 Word 3 Word 4 Word 5 Word 6 Word 7 Word 8 Word 9 Word 10
Word 1 Word 2 Word 3 Word 4 Word 5 Word 6 Word 7 Word 8 Word 9 Word 10

The first two words of each frame are the Telemetry Word and the Handove Word. The Telemetry word starts with the Preamble followed by the TLM message, then 2 reserved bits and 6 parity bits. The HOW or Handover Word, contains the 17 MSB of the 19 Bit time of the week or TOW for the start of following frame, 2 flag bits, 3 subframe bits, 2 more reserved bits and then 6 parity bits.

PREAMBLE TLM MESSAGE R R PARITY
1 2 3 4 5 6 7 8
9 10 11 12 13 14 15 16 17 18 19 20 21 22
23
24
25 26 27 28 29 30

Bits 23 & 24 are Reserved Bits

TOW-COUNT MSG R R SUBFRAME ID R R PARITY
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17
18
19
20 21 22
23
24
25 26 27 28 29 30

Bit 18 of the Telemetry word contains the Momentum flag for satellite config 000 or the Alert flag for satellite config 001.
Bit 19 of the Telemetry word contains the Synchronization flag for satellite config 000 or the Anti-Spoof flag for satellite config 001.
Bits 23 & 24 are used to preserve parity with Bits 29 & 30 set to 0.

Parity Logic

The parity algorithm links 30 bit words within and across subframes of 10 words, using (32,26) extended Hamming code logic. The parity bit D*30 is used for recovering raw data. The parity bits D*29 and D*30, along with the recovered raw data (dn), are Modulo-2 added in accordance with the following equations which provide computed parity to compare with the transmitted parity D25, D26, . . . . D30.

If the last bit of the previous subframe D*30 = 1 then bits D1, . . . D24 transmitted by the satellite must first be complemented to recover the raw or source data, d1, . . . d24, used to calculate the parity value.
Di = di ⊕ D*30 for i = 1,24

D25 = D*29 ⊕ d1 ⊕ d2 ⊕ d3 ⊕ d5 ⊕ d6 ⊕ d10 ⊕ d11 ⊕ d12 ⊕ d13 ⊕ d14 ⊕ d17 ⊕ d18 ⊕ d20 ⊕ d23
D26 = D*30 ⊕ d2 ⊕ d3 ⊕ d4 ⊕ d6 ⊕ d7 ⊕ d11 ⊕ d12 ⊕ d13 ⊕ d14 ⊕ d15 ⊕ d18 ⊕ d19 ⊕ d21 ⊕ d24
D27 = D*29 ⊕ d1 ⊕ d3 ⊕ d4 ⊕ d5 ⊕ d7 ⊕ d8 ⊕ d12 ⊕ d13 ⊕ d14 ⊕ d15 ⊕ d16 ⊕ d19 ⊕ d20 ⊕ d22
D28 = D*30 ⊕ d2 ⊕ d4 ⊕ d5 ⊕ d6 ⊕ d8 ⊕ d9 ⊕ d13 ⊕ d14 ⊕ d15 ⊕ d16 ⊕ d17 ⊕ d20 ⊕ d21 ⊕ d23
D29 = D*30 ⊕ d1 ⊕ d3 ⊕ d5 ⊕ d6 ⊕ d7 ⊕ d9 ⊕ d10 ⊕ d14 ⊕ d15 ⊕ d16 ⊕ d17 ⊕ d18 ⊕ d21 ⊕ d22 ⊕ d24
D30 = D*29 ⊕ d3 ⊕ d5 ⊕ d6 ⊕ d8 ⊕ d9 ⊕ d10 ⊕ d11 ⊕ d13 ⊕ d15 ⊕ d19 ⊕ d22 ⊕ d23 ⊕ d24

Where D*29 and D*30 are from the previous subframe.

Almanac Pages Layout

Word 1 Word 2 Word 3 Word 4 Word 5 Word 6 Word 7 Word 8 Word 9 Word 10
TLM C P
HOW C P
1 2 3 P
1 2 P
1 2 P
1 P
1 P
1 P
1 P
1 2 3 4 5 P

Table of Almanac Parameters

DescriptionParameterNo of BitsScale FactorRangeUnitsPosition
Data Version IdDATA ID2Word3,Field1
Satellite IdSV ID6Word3,Field2
Eccentricitye162-21dimensionlessWord3,Field3
Time of Almanactoa8212602112secondsWord4,Field1
Inclination Angle i0 = 0.3 + delta i0delta i0162-19semicirclesWord4,Field2
Rate of Right AscensionOmegadot162-38semicircles/secondWord5,Field1
Satellite HealthSV Health8Word5,Field2
Square Root of Semi-major axisA½242-11meters½Word6,Field1
Longitude of Ascending NodeOmega0242-23semicirclesWord7,Field1
Argument of Perigeeomega242-23semicirclesWord8,Field1
Mean AnomalyM0242-23semicirclesWord9,Field1
Clock Correction 1st termaf0112-20secondsWord10,Field1&4
Clock Correction 2nd termaf1112-38s/sWord10,Field2&3
Parity Computation bits2Word10,Field5

An example of how to transform the raw/binary message into values useable in a program to calculate the satellite position is available here.

Useful Links

Navstar Almanac records are available for download from this location.GPS Almanacs

Back to Top of Page