Global Positioning System (GPS) is a satellite navigation system consisting of at least 30 satellites revolving around the Earth at an altitude of 20,000 km. The GPS operates anywhere in the world, 24 hours a day, free of charge. The US Department of Defense originally put satellites into orbit for military use, but in the 1980s they were put into public use.
How does this system work?
Wherever you are on the planet, at least four GPS satellites are “visible” at all times. The GPS receiver (e.g. the phone or other GPS device) receives a signal from each visible satellite. The satellites transmit the exact time of sending the signals. By subtracting the transmission time of the signal from the moment it was received, the GPS can tell how far it is from each satellite. The GPS receiver also knows the precise position in the sky of the satellites at the time they sent their signals. So, given the travel time of GPS signals from three satellites and their exact position in the sky, the GPS receiver can determine your exact location. Once your position is determined, the GPS device can calculate other information such as speed, travel distance etc.