Introduction to GPS and GNSS
The United States Government operates a set of satellites providing positioning, navigation and timing services to users on Earth, in Earth's atmosphere and orbit. This satellite-based Global Positioning System is also known as "GPS Constellation". Other Global Navigation Satellite Systems (GNSS) exist e.g., the Russian GLONASS system, or the European Galileo system.
Each satellite has an internal atomic clock and transmits a signal specifying the time and satellite position. The GPS constellation consists of 24 satellites plus several spares flying in Mid-Earth Orbits (MEO, ~20,000 km), orbiting the earth at a rate of approximately twice per day.
You can determine your position on Earth by listening to four or more satellites, using a GPS receiver. Each satellite transmits a “pulse” at exactly the same time. Depending on your distance from each satellite, you will receive those “pulses” at different times, based on the propagation delay of the radio signal traveling at (near) the speed of light. For the GPS receiver, there are four unknowns in this process – x, y, and z for its position, and the time mark for the start of transmission – hence four satellites minimum are required to obtain a 3D fix by simultaneously solving four equations in order to resolve four unknowns.
The “pulse” is transmitted in the form of a spread spectrum Code Division Multiple Access (CDMA) signal with each satellite using a different Pseudo Random Noise (PRN) code. The CDMA process spreads the “pulse” energy over a long period of time by modulating it into “chips”, allowing for a weak signal to be transmitted efficiently by the satellite and reconstructed by the receiver.
The GPS satellites transmit their signals on two different frequencies, L1 (1575 MHz) and L2 (1227 MHz), using two different spread code chip rates: The Coarse/Acquisition (C/A) code is at 1M chips/sec and the Precision (P) code is at 10M/chips/sec. Many commercial receivers in use today only use the L1 C/A signal and can get sufficient accuracy, but a receiver using the P code will get higher accuracy. One that receives both frequencies can further improve accuracy by compensating for variations in propagation delay through the ionosphere.
On top of these timing signals, a low speed data stream (50 bps) is impressed containing the Almanac and Ephemeris data. The Almanac data contains the planned orbital information for each satellite and is valid for many days. The Ephemeris data contains the precise orbital positions of each satellite and is considered valid for about 4 hours. Once the receiver has the position data of the satellites in view, plus the range measurements (sometimes called “pseudo-ranges” because they are only measured estimates, not exact true ranges) to at least four of them, it can then calculate its position on earth.