How GPS works
To understand how a GPS works it is important to first see what the system is made of. Essentially a Global Positioning System has three units: a constellation of satellites, a monitoring system and finally, a GPS handset.
The satellites (presently there are 29) orbit the earth at various pre-determined planes, transmitting ranging signals on two frequencies in the microwave part of the radio spectrum. They circle the earth twice daily at an altitude of 20,000 km above earth's surface and have the whole planet in their range.
Now, at any point of time, if a GPS receiver is switched on, it picks up the unique digital code sequences that the satellites continuously transmit. It matches the sequence picked with the ones generated by itself. By thus matching the signals, the GPS receiver is able to calculate how long it takes the signals to travel from the satellite to the receiver. The time is then converted to distance using the speed of light. This is because light and radio waves travel at the same speed.
The receiver is thus able to determine the distance and the location at which the four, or more satellites that it has picked signals from, are placed. This data helps the receiver to calculate its own longitude, latitude and altitude and also to synchronize its time with the GPS time standard.
This process of deducing one's position based on distance measurements is called trilateration and forms the basis of GPS .
This system is for civilian as well as military use and is controlled by a joint board in the US. It is, however, maintained by the US Air Force. The signals that are transmitted for civilians is different from the ones used by the military.
The civil GPS receivers can access the C/A - code which is the coarse/acquisition code transmitted on the L1 frequency. The military has an additional code called the P or the Precision code. This is transmitted on L1 and L2 frequencies. The military usually picks up the C/A code and then transfers it to the P code. There are some receivers, which can access the P-code directly.
It is important to note that GPS receivers do not transmit or bounce signals off the satellites; they simply receive the signals passively. This helps the satellites support an unlimited number of users, both military and civilian. The US Department of Defense that runs the satellites does not levy any fees from the civilian users.