Friday, September 28, 2012

How GPS Work?

GPS applications are very popular today. Ever wondering how it works?

Here are simple explanation on how GPS works:

1. First we need GPS Satellites that orbit the earth and GPS Receiver / Device

2. GPS Satellites broadcast GPS Signals that contains Satellite ID and Time

3. From the Satellite ID and Time, the distance between receiver and the satellite can be determined
GPS Receiver will now know that it can be anywhere within X km distance from the satellite.

4. Now, GPS Receiver will calculate signal from 2nd satellite

5. Next, the 3rd satellite

6. GPS Receiver need at least 4 satellites to determine its location

How to ensure that the time is accurate?

The accuracy of the clock on the satellite and receiver is important. This is because the time is used to measure distance from the satellite to the receiver.

To ensure the accuracy of the time, an atomic clock is used on GPS Satellites. But expensive atomic clock is not practical for consumer GPS device.

GPS Receiver use normal inexpensive quartz clock. Therefore it need to periodically synchronize it's time. GPS Receiver calculate / estimate current time by comparing GPS Signal it received from several satellites. The correct time is the one that cause all the spheres (explained above) to align at a single point.

Type of data sent by GPS Satellite

Basically there are 3 types of data sent by GPS Satellites:

1. Almanac Data (sent every 12.5 minutes)

Tell us about approximate location of all satellites.
Tell the GPS Receiver which satellites it should expect to see from it's current location.

2. Ephemeris Data (sent every 30 seconds)

Contains detail satellite orbit information

3. Pseudo Random Code

Contains Satellite ID and Time

How long it took to get first fix?

1. Cold or Factory (15 mins)

Occurred when the last GPS Fix is more than 180 days.
The receiver need to download almanac data which is sent every 12.5 mins and valid for 180 days.

2. Warm or Normal (1 mins)

Occurred when the receiver has approximate time accuracy of ± 20 secs, position ± 100 km from the last GPS Fix, speed < 90 km/h, and a valid almanac data.
The receiver need to download ephemeris data which is sent every 30 secs and valid for 4 hours.

3. Hot or standby (<30 secs)  

The receiver has valid time, position, almanac, and ephemeris data.

How to improve the time to first fix?

Assisted GPS / AGPS that provide Almanac and Ephemeris Data on demand to the GPS Receiver.

Source of GPS Error

What cause the GPS location shown by the device to be inaccurate?

1. Multi-path effect

When the GPS Receiver is placed between tall buildings or urban canyon, the GPS Signal form satellite will hit the tall buildings and bounce before hitting the receiver. This will cause the time calculation to be inaccurate, therefore the location calculated will be inaccurate.

2. Atmospheric effect

Atmospheric condition may effect the GPS Signal travel time.

3. Clock inaccuracy

4. Rounding effect

How to improve GPS accuracy?

Generally, GPS accuracy is between 5-15m.

1. Differential GPS

Produce 3-5m accuracy.

2. Wide Area Augmentation System

Produce 1-3m accuracy.