Categories
Ramblings

GPS–As it it today

GPS has freed us…it gives us the ability to go anywhere knowing that we will not get lost. It gives us the freedom to explore knowing that we can always find our way back. There are may sites that you can go to and get a really good idea of how GPS works. This post is about how it works for us today.

A primer: GPS stands for Global Positioning System. It is a set of 24 to 32 satellites up there helping us figure out where we are. For a more comprehensive idea on this go to http://en.wikipedia.org/wiki/Global_Positioning_System, don’t forget to read the section on Basic concept of GPS.

We are used to our cell phones being our GPS devices, and they get a position so quickly. But if you have used an independent GPS which requires to get a lock you would have noticed that you have spent minutes either driving around or waiting for the unit to lock before you started driving before it was able to figure out where it was.

Getting a GPS lock from the satellites takes time. We live in a very RF Noisy environment. GPS is about listening for a radio signal. The Satellites are up there constantly transmitting their ID number, the time (based on an atomic clock) and where they are.

Your GPS chipset is listening for a radio signal. It needs to hear from at least three satellites to be able to triangulate a position. The concept is that if I see satellite x, y and z based on the difference in the time that they are sending me I can figure out where I am (and using their position information). If it can see 4 satellites then you also are able to compute height (not just lat/long).

This takes time. It can take up to 45 seconds from a cold start to have a position fix. Likely you need to more time if you are in an urban canyon where you will get the same RF signal from multiple directions because it is bouncing of buildings before it reaches you. This is called a cold start because you are starting stone cold. It’s like waking up and trying to figure out where you are. You need to get a point of reference before you absolutely know. That frame of reference is seeing three/four satellites.

There is also a “warm start”. Since the devices are sending you time, if you know what time it is you will be able to lock on faster. Some GPS devices have a battery backed RTC and that helps so much in quickly understanding which satellites are nearby. This can take up to 15 seconds or so to get a fix.

Then there is the “Hot start”. And this is a little freaky. This can get a fix in one second or less. How does it work…

  1. The device needs to have time
  2. It also needs to have what is called ephemerous data

The satellites are not going round and round the earth in a monotonous circle with no changes. Their trajectory is adjusted over time, and the GPS needs to cover this. the ephemerous data is essentially trajectory data that is available and is stored. So if you have time, and the ephemerous data then as soon as you get a satellite ID you can say, if I can see satelite 4, 7, and 3, and I have the time them I must be here.

Sounds simple…then comes the real world.

45 seconds to wait to get a fix is too long. A lot of GPS devices started putting in an RTC so that time is maintained and the wakeup is essentially a cold start. Then they started saving the ephemerous data so that the start is faster.

But today is the day of power management, you don’t want the GPS in your phone to be active all the time. If there is a processor running then there is power being consumed. There must be a better way. And there is…

The cell phone tower…

Your cell phone depends on being hooked to a cell tower. Typically your cell phone will be in range with atleast three maybe more towers. Each of those towers is also transmitting AGPS data. Which is simply saying, I am tower number x, and I am here. So based on the RSSI (Received Signal Strength Indicator) you can figure out how far you are from the tower and get an approximate location.

You wont believe how fast it is…

So when you start google maps on your phone you see a big blue circle. That is actually drawing a circle based on the GPS data that it got from the Cell Phone towers and drawing that. Then it uses the RSSI information to figure out where it really is and you see that circle becoming smaller and smaller till it becomes the little blue dot that we depend on.

So did it really use GPS. Its possible that it did not. But GPS has an accuracy up to 10 feet, cell tower accuracy is usually at about 150 to 200 feet. The google maps application shows that by a little blue circle around the blue dot. Not really good enough for driving but a start.

But there are other ways too…

WIFI Based positioning

You remember a couple of years ago where there was a big brouhaha about googles mapping vans saving wifi data that they had gathered. What was all that about???

Wifi, ethernet, bluetooth etc all depend on an ID. Each device that has a bluetooth or wifi or ethernet has a MAC ID. This is an ID that is preprogrammed into the bluetooth/wifi/ethernet IC before a device is sent to you. So whether you are a wireless gateway or a phone you have a unique MAC ID.

Now when was the last time you moved your wifi router…likely never???

So the google mapping vans were sniffing the airwaves for wireless routers, and when they saw a MAC ID that they did not recognize they looked at their GPS position and stored it away. (the legal noise was that they stored the data they saw, not very useful, but they stored data. And this was the time that most people never bothered to have encryption enabled on their wifi netwirs).

So when you start the GPS application, it says…hmm, I am on this network and sends the MAC ID to google, which says, oh this mac ID, we saw it here so you are likely at this location. Now isnt this cool.

It doesn’t end there. Now the google mapping vehicles (notice you arent seeing them so often now) don’t need to look for MAC id’s. When you start google maps, it takes your WIFI access point mac ide and stored it away based on the GPS position your GPS (or should I start calling it your Location service IC in your phone).

Have you wondered that google maps once in a while gives a message that GPS accuracy is improved if you turn on WIFI in your network settings…now you know why.

Net…net…

So GPS no longer needs to spend the time to get a GPS lock, except when you are using it for navigation because you need better accuracy there. But you also need to know where you are heading…and that’s another story.

Leave a comment