Monday, July 2, 2007

GPS working





Trilateration is a basic geometric principle that allows you to find one location if you know its distance from other, already known locations. The geometry behind this is very easy to understand in two dimensional space.
This same concept works in three dimensional space as well, but you're dealing with spheres instead of circles. You also need 4 spheres instead of three circles to find your exact location. The heart of a GPS receiver is the ability to find the receiver's distance from 4 (or more) GPS satellites. Once it determines its distance from the four satellites, the receiver can calculate its exact location and altitude on Earth! If the receiver can only find three satellites, then it can use an imaginary sphere to represent the earth and can give you location information but no altitude information.

For a GPS receiver to find your location, it has to determine two things:
The location of at least three satellites above you
The distance between you and each of those satellites
Measuring Distance
Do You Own a GPS???Do you own a GPS? If so, millions of How Stuff Works readers would love to know how you like it, and what you think are the best and worst features of your GPS. If you don't own a GPS but know someone who does, encourage him or her to enter a review for the rest of us to read.
GPS satellites send out radio signals that your GPS receiver can detect. But how does the signal let the receiver know how far away the satellite is? The simple answer is: A GPS receiver measures the amount of time it takes for the signal to travel from the satellite to the receiver. Since we know how fast radio signals travel -- they are electromagnetic waves and so (in a vacuum) travel at the speed of light, about 186,000 miles per second -- we can figure out how far they've traveled by figuring out how long it took for them to arrive.
Measuring the time would be easy if you knew exactly what time the signal left the satellite and exactly what time it arrived at your receiver, and solving this problem is key to the Global Positioning System. One way to solve the problem would be to put extremely accurate and synchronized clocks in the satellites and the receivers. The satellite begins transmitting a long digital pattern, called a pseudo random code, as part of its signal at a certain time, let's say midnight. The receiver begins running the same digital pattern, also exactly at midnight. When the satellite's signal reaches the receiver, its transmission of the pattern will lag a bit behind the receiver's playing of the pattern. The length of the delay is equal to the time of the signal's travel. The receiver multiplies this time by the speed of light to determine how far the signal traveled. If the signal traveled in a straight line, this distance would be the distance to the satellite.
The only way to implement a system like this would require a level of accuracy only found in atomic clocks. This is because the time measured in these calculations amounts to nanoseconds. To make a GPS using only synchronized clocks, you would need to have atomic clocks not only on all the satellites, but also in the receiver itself. Atomic clocks usually cost somewhere between $50,000 and $100,000, which makes them a little too expensive for everyday consumer use!
The Global Positioning System has a very effective solution to this problem -- a GPS receiver contains no atomic clock at all. It has a normal quartz clock. The receiver looks at all the signals it is receiving and uses calculations to find both the exact time and the exact location simultaneously. When you measure the distance to four located satellites, you can draw four spheres that all intersect at one point, as illustrated above. Four spheres of this sort will not intersect at one point if you've measured incorrectly. Since the receiver makes all of its time measurements, and therefore its distance measurements, using the clock it is equipped with, the distances will all be proportionally incorrect. The receiver can therefore easily calculate exactly what distance adjustment will cause the four spheres to intersect at one point. This allows it to adjust its clock to adjust its measure of distance. For this reason, a GPS receiver actually keeps extremely accurate time, on the order of the actual atomic clocks in the satellites!
One problem with this method is the measure of speed. As we saw earlier, electromagnetic signals travel through a vacuum at the speed of light. The earth, of course, is not a vacuum, and its atmosphere slows the transmission of the signal according to the particular conditions at that atmospheric location, the angle at which the signal enters it, and so on. A GPS receiver guesses the actual speed of the signal using complex mathematical models of a wide range of atmospheric conditions. The satellites can also transmit additional information to the receiver.
From this discussion you have learned several important facts about the Global Positioning System:
The Global Positioning System needs 24 satellites so it can guarantee that there are at least 4 of them above the horizon for any point on earth at any time. In general there are normally 8 or so satellites "visible" to a GPS receiver at any given moment.
Each satellite contains an atomic clock.
The satellites send radio signals to GPS receivers so that the receivers can find out how far away each satellite is. Because the satellites are orbiting at a distance of 11,000 miles overhead, the signals are fairly weak by the time they reach your receiver. That means you have to be outside in a fairly open area for your GPS receiver to work.