Talk:Global Positioning System/Proposed refactoring

''This page contains fragments intended as proposals for refactoring some of the content in the article. This is related to a discussion that began in May/June 2010.''

Communication
The navigational signals transmitted by the GPS satellites encode a variety of information including satellite positions, the state of the internal clocks, and the health of the network. These signals are transmitted on two separate carrier frequencies that are common to all satellites in the network. Two different encodings are used, a public encoding that enables lower resolution navigation, and an encrypted encoding used by the U.S. military.

Message format

 * {| class="wikitable" style="float:right; margin:0 0 0.5em 1em;" border="1"

! Subframes !! Description
 * + GPS message format
 * 1 || Satellite clock, GPS time relationship
 * 2–3 || Ephemeris (precise satellite orbit)
 * 4–5 || Almanac component (satellite network synopsys, error correction)
 * }
 * 4–5 || Almanac component (satellite network synopsys, error correction)
 * }
 * }

Each GPS satellite continuously broadcasts a navigation message at a rate of 50 bits per second (see bitrate). Each complete message is composed of 30-second frames, distinct groupings of 1,500 bits of information. Each frame is further subdivided into 5 subframes of length 6 seconds and with 300 bits each. Each subframe contains 10 words of 30 bits with length 0.6 seconds each. Each 30 second frame begins precisely on the minute or half minute as indicated by the atomic clock on each satellite.

The first part of the message encodes the week number and the time within the week, as well as the data about the health of the satellite. The second part of the message, the ephemeris, provides the precise orbit for the satellite. The last part of the message, the almanac, contains coarse orbit and status information for all satellites in the network as well as data related to error correction.

All satellites broadcast at the same frequencies. Signals are encoded using code division multiple access (CDMA) allowing messages from individual satellites to be distinguished from each other based on unique encodings for each satellite (which the receiver must be aware of). Two distinct types of CDMA encodings are used: the coarse/acquisition (C/A) code, which is accessible by the general public, and the precise (P) code, that is encrypted so that only the U.S. military can access it.

The ephemeris is updated every 2 hours and is generally valid for 4 hours, with provisions for updates every 6 hours or longer in non-nominal conditions. The almanac is updated typically every 24 hours. Additionally data for a few weeks following is uploaded in case of transmission updates which delay data upload.

Satellite frequencies
All satellites broadcast at the same two frequencies, 1.57542 GHz (L1 signal) and 1.2276 GHz (L2 signal). The satellite network uses a CDMA spread-spectrum technique where the low-bitrate message data is encoded with a high-rate pseudo-random (PRN) sequence that is different for each satellite. The receiver must be aware of the PRN codes for each satellite to reconstruct the actual message data. The C/A code, for civilian use, transmits data at 1.023 million chips per second, whereas the P code, for U.S. military use, transmits at 10.23 million chips per second. The L1 carrier is modulated by both the C/A and P codes, while the L2 carrier is only modulated by the P code. The P code can be encrypted as a so-called P(Y) code which is only available to military equipment with a proper decryption key. Both the C/A and P(Y) codes impart the precise time-of-day to the user.

Demodulation and decoding
Since all of the satellite signals are modulated onto the same L1 carrier frequency, there is a need to separate the signals after demodulation. This is done by assigning each satellite a unique binary sequence known as a Gold code. The signals are decoded, after demodulation, using addition of the Gold codes corresponding to the satellites monitored by the receiver.

If the almanac information has previously been acquired, the receiver picks which satellites to listen for by their PRNs, unique numbers in the range 1 through 32. If the almanac information is not in memory, the receiver enters a search mode until a lock is obtained on one of the satellites. To obtain a lock, it is necessary that there be an unobstructed line of sight from the receiver to the satellite. The receiver can then acquire the almanac and determine the satellites it should listen for. As it detects each satellite's signal, it identifies it by its distinct C/A code pattern.

As the receiver continues to read successive PRN sequences, it will encounter a sudden change in the phase of the 1,023 bit received PRN signal. This indicates the beginning of a data bit of the navigation message. This enables the receiver to begin reading the 20 millisecond bits of the navigation message. There can be a delay of up to 30 seconds before the first estimate of position because of the need to read the ephemeris data before computing the intersections of sphere surfaces.

Then the orbital position data, or ephemeris, from the navigation message is used to calculate precisely where the satellite was at the start of the message. A more sensitive receiver will potentially acquire the ephemeris data more quickly than a less sensitive receiver, especially in a noisy environment.

This process is repeated for each satellite to which the receiver is listening.