Tuesday, January 15, 2008

iPhone uses WiFi as well as cell signals to determine location

I just went out for a walk around my neighborhood in downtown Denver to test out the new "locate me" capability on my iPhone, and discovered something rather interesting: apparently the system is using not just cell phone signals but also WiFi to determine location, which explains the unexpectedly good first test result I mentioned in my previous post. I discovered this somewhat accidentally, but turning WiFi on and off on the phone made a big difference to accuracy. You do not have to be connected to a WiFi network in order to use WiFi for location determination.

Since I am in a WiFi-rich downtown location, using WiFi gives much more accurate results than triangulating cell phone signals. From a quick walk around the neighborhood here, I am consistently getting within half a block, or perhaps about 50 meters accuracy most of the time, and as good as 10-20m in some instances, when I have WiFi turned on. Of course it won't be nearly that good if you don't have a dense WiFi network, but this is much better than I expected. If I turned off the WiFi on the phone, the results were less accurate. It is a little hard to gauge the accuracy as the map display is zoomed out depending on the level of accuracy that the system thinks it can obtain (and there is a variable size circle displayed). But generally speaking, even without WiFi, the location generally seems to be within a block or two (say 100-200 meters) of the right location - though again this is in a downtown location with a high density of cell towers, so in a rural location it will be significantly less accurate.

If you look at Google's explanation of how "My Location" works, they only mention using cell tower location. I suppose that most of the other phones which have previously run Google Maps Mobile do not support WiFi, so this makes sense. Other vendors such as Navizon have used WiFi location for a while, and indeed they announced a version for the iPhone a little while ago (if you had hacked your phone, since of course it is still officially closed to third party applications at this point). But in general I haven't seen anything saying that Google was using WiFi for location determination.

I did find that the accuracy varied a fair amount from one attempt to another - I could stand on the same street corner and locate myself multiple times in quick succession, and get three different map scales (representing different accuracy levels) back. The true geo-geeks among you can check out this flickr album, which shows photos of the location given by my iPhone as I walked around the neighborhood, and each one is geotagged using my Garmin handheld, which gives a pretty accurate location. I have added various notes as I went through. On an individual photo you can click the map link to get an accurate view of where the photo was taken (you'll need to zoom in a little), and you can also see a map of the whole set.
Screen shot of the flickr map of my iPhone location test

Anyway, in summary, I am very pleasantly surprised with the performance of the location capabilities so far - the use of WiFi gives a much higher accuracy than I had expected. Not good enough for in-car navigation applications, but definitely good for local search applications.

Update on my original post: Slashgeo reports that the WiFi positioning technology used in the iPhone is from Skyhook Wireless. One other comment I forgot to make before is that the location determination is pretty quick - typically 3-5 seconds for the map to refresh with the location, most of which is probably just the time to redisplay the map using the EDGE network.

6 comments:

Nixta said...

Irritatingly, my iPod touch, although it can detect 10s of wireless networks (I don't want to think about the effects of that on my insides), cannot locate me to better than 2 miles away.

I'm in Manhattan. Could things get any denser?

Looked at the skyhook pages hoping to be able to give them some hint as to where I am for their database, but no luck. Any idea how they gather their info?

dave said...

I love how the iPhone determines your location, I think it works fairly well. A wifi location is much better (resolution) than the cell location though.

Anonymous said...

>> Any idea how they gather their info?

Yes - Skyhook actually drives around streets with WiFi scanners and GPS, and builds a huge database relating MAC addresses to lat/lng!

I've used Skyhook in my apps www.trapster.com and www.jotyou.com for a while now. Works great! Check them out... you can compare GPS to WiFi using those too. Only on Windows Mobile right now, but Symbian soon and of course iPhone as soon as it's open for dev (I'm not the hacker type so I guess I have to wait for official blessing).

I don't know if it will work on the Touch though - first, not sure it is even in that code release, second Skyhook (although doesn't need to connect to WiFi for scan) needs a 3G etc Internet connection for the queries... so it would only work if you are connected to hotspot, not say driving around using map.

Cheers,
pete at trapster dot net

Anonymous said...

sorry for broken links... now can't edit.
Trapster and JotYou if you want to try WM version of Skyhook WiFi plus GPS location

Nixta said...

I've noticed that a big pitfall of the Skyhook system is that it doesn't work off the ground. I live on the 9th floor, some 50 yards from the nearest street. I suppose that makes it rather difficult to find signals unless people have their routers in their windows, and even then I doubt it would reach.

Consequently, the best fix I get when I'm at home (and have WiFi connectivity) is Times Square (49th and Broadway), even though I'm a couple of miles away from there in Stuyvesant Town down on 14th Street and Avenue B.

Turns out Stuyvesant Town has free WiFi in the oval (it's provided by RCN and I thought you had to be an RCN subscriber to use it) and when I was there I finally got what you were all talking about - it's remarkably accurate. It put me about 25 yards from where I actually was, but perfectly accurate enough for LB services, if not directions.

Now for New York to get city-wide free WiFi. Then my iPod Touch will start to become the WiFi platform that Apple have been talking about.

This connectivity is all stuff that Simon Barber was excited about 5 years ago. For once, we should have been excited with him.

Anonymous said...

If you are interested in adding or updating your home Access Point in the Skyhook database there is a form available now.

Here is the raw url: http://skyhookwireless.com/howitworks/submit_ap.php
or
Click here