GPS receivers calculate the position of objects in two dimensional or three dimensional space using a mathematical process called trilaterlation. Trilateration can be either two dimensional or three dimensional. Let us examine how 2-D and 3-D trilateration work.
The concept of trilateration is easy to understand through an example. Imagine that you are driving through an unfamiliar country and that you are lost. A road sign indicates that you are 500 km from city A. But this is not of much help, as you could be anywhere in a circle of 500 km radius from the city A. A person you stop by to ask for directions then volunteers that you are 450 km from city B. Now you are in a better position to locate yourself- you are at one of the two intersecting points of the two circles surrounding city A and city B. Now if you could also get your distance from another place say city C, you can locate yourself very precisely, as these three circles can intersect each other at just one point. This is the principle behind 2D trilateration.
The fundamental principles are the same for 2D and 3D trilateration, but in 3D trilateration we are dealing with spheres instead of circles. It is a little tricky to visualize. Here, we have to imagine the radii from the previous example going in all directions, that is in three dimensional space, thus forming spheres around the predefined points. Therefore the location of an object has to be defined with reference to the intersecting point of three spheres.
Thus if you learn that the object is at a distance of 100 km from satellite A, it simply says that the object could be on surface of a huge imaginary sphere of 100 km radius around satellite A. Now you are also informed that the object is 150 km from satellite B. The imaginary spheres of 100km and 150 km around satellites A and B respectively intersect in a perfect circle. The position of the object defined from a third satellite C intersects this circle at just two points. The Earth acts as the fourth sphere, making us able to eliminate one of the two intersection points of the first three spheres. This makes it possible to identify the exact location of the object.
However GPS receivers take into account four or more satellites to improve accuracy and provide extra information like altitude of the object.
Thus the GPS receiver needs the following information for its calculations.
The GPS receiver works this out by analyzing high-frequency radio signals from GPS satellites. The more sophisticated the GPS, the more its number of receivers, so that signals from a larger number of satellites are taken into account for the calculations.