On Monday while riding into the city (the city = San Francisco for those not from this area), I took the opportunity to play with my iPad. Needing an internet connection and not having a 3G model yet, I used my iPhone + MyWi to get online. Randomly, I decided to open up the maps app and hit the location finder button. Much to my amazement, not only did it find me, it did so with amazing accuracy and even roughly tracked the progress of my movement. Being impressed, I tweeted about it and people had a number of theories why it worked.
One of the leading theories people had was that the iPad was using SkyHook to do a lookup based on cell tower triangulation. I knew this was an immediately flawed concept based on prior knowledge of how it works. What Skyhook and similar services do is interface with the gsm modem to get the towers in the area. It’s not even really triangulation, basically they get the cell tower ID from the modem and then lookup that in their database. This is why you see a relatively big circle on 1st gen iPhones, as it’s not a very precise lookup since towers cover a several square mile area each. Not only was my location being shown with pinpoint accuracy, since my iPad was talking to my iPhone via wifi there is no possible way for it to have gathered the gsm data directly.
Another theory was that the iPad was doing a lookup on the IP address. While this method is a last ditch fallback employed by SkyHook, this is also flawed because one can drive a long way and still retain the same IP. As previously indicated, the location pinpointed me following a curve in the road, something even triangulation couldn’t do let alone IP lookup.
Not having an explanation which seemed plausible, I decided to do some experimentation this evening with the help of a friend. Over dinner, we found the location was perfectly spot on (see second photo below). Firing up an app which showed the location data directly, I observed a couple curious things. The first thing was that altitude data wasn’t being reported. Based on this, our assumption was that it wasn’t getting actual gps data from the phone via some “magical” method. The second thing was that the location accuracy was <300ft (see the first photo below). This further confirmed the hypothesis that tower data was not being used.
Still stumped, we decided to drive around and see if any patterns emerged. Driving around, the accuracy wasn't as accurate as before and would jump every few seconds to where we were. When it did track the road, updating in virtual realtime, we were in densely residential areas. The farther we were from any homes or buildings, the less accurate it was, leading up to a total loss of location when we were on the 280 heading north.
That's when it dawned on me how it worked and I was embarrassed to have not immediately thought of it before. Just because I was associated to the wifi access point created by MyWi running on my phone, doesn't mean the iPad can't see the numerous other access points in the area. One of Skyhook's differentiating features is that they have one of the largest databases in the world mapping wifi access points to their geo location. Using technology they call WPS (short for "wifi position system"), it can then triangulate my location with much greater accuracy (since wifi aps have a very small coverage area compared to a cell tower) than any other non-gps based solution and hence what I was observing.
All in all nothing extraordinary or new, but still a nice unexpected surprise none the less!
P.S. This blog post 100% penned via the Wordpress app running on my iPad using the onscreen keyboard. Surprisingly easy to do even without a physical keyboard.