Take the 2-minute tour ×
Android Enthusiasts Stack Exchange is a question and answer site for enthusiasts and power users of the Android operating system. It's 100% free, no registration required.

I was wondering how Google Maps on my Android phone can locate me with a good accuracy when my GPS is disabled.

At first I though it was with the cell tower but I'm not sure it can achieve this precision and it is way better when the wireless is enabled (the accuracy go from 1600m to 100).

What I don't understand is that I have a dynamic IP - it's not supposed to be linked to my address. For example wolframalpha locates me with a very bad precision (the country is correct) and it's the same for all other IP location services.

How does this work?

share|improve this question
    
See also Why does Google Maps Need Wifi? and What is assisted GPS –  GAThrawn Oct 26 '11 at 16:10
    
See also: How does Android get the coarse location? –  Al E. Oct 26 '11 at 19:53
add comment

2 Answers 2

up vote 17 down vote accepted

Google and others like Apple and Skyhook build a Database which links WLAN BSSIDs to a geographic location. A BSSID is like the MAC Address of a access point that gets broadcasted by that access point. It is therefore "public viewable" if the BSSID broadcast is enabled, which is the default for most access points. The BSSID operates on a lower layer as the IP stack, you don't even have to be connected to an access point to receive these broadcasts.

Every time you run Google Maps or Navigation with enabled GPS and WiFi and if your device is able to get a good GPS fix, the current visible WLAN networks and your current location (the GPS fix) are uploaded to Google to build and update the database. This technique is sometimes called crowdsourcing. Every Android device acts therefore as data collector.

Since most access points are static in their position and only cover a small area - the coverage radius is approximately 100m - they are ideal anchors for a good location fix without GPS.

share|improve this answer
    
Thanks but how can they match a BSSID and a location at first ? I've a new wireless hotspot in my house for only about a month and it's already inside the database... –  Martin Trigaux Oct 31 '11 at 8:50
    
@MartinTrigaux See my update :) –  Flow Oct 31 '11 at 12:41
    
note that Google StreetView cars also carries a GPS and Wifi for the same purpose. –  Lie Ryan Oct 31 '11 at 15:25
    
It can also use cell towers. Turn off gps and WiFi, you'll still get location data. –  devnul3 Nov 1 '11 at 5:36
    
Ok thanks, nice trick, just a bit terrifying for the privacy... Concerning the cell towers there is something I don't get. If I don't have wireless and just know the cell id, how can it find the corresponding position of the tower. I guess there is a cache of last seen but so for new ones, no way to know ? –  Martin Trigaux Nov 1 '11 at 19:22
show 4 more comments

I think they use mainly cell towers in that case. They locate three towers (which provide your cellphone's calling/receiving connection) that are close to you, and then use the respective distances from the towers to you to calculate your exact location. That was how location of cellphones were done before the wide spread of GPS and WiFi technology.

share|improve this answer
    
In my experience, cell tower triangulation is not used for Google's LBS. It's done the same way as with the WLAN geo-location data, just instead of the BSSID they use the cell tower's GSM ID and map it to the location of the tower and it's estimated coverage. Which is sometimes very inaccurate. For example in urban areas where the area is to big and in rural areas the towers have a bigger coverage as what, for example Google Maps, tells you. –  Flow Nov 1 '11 at 21:37
    
Thanks but I'm not sure you can achieve a 50m accurate location with cell tower triangulation –  Martin Trigaux Nov 1 '11 at 22:41
    
Under certain circumstances it is possible to achieve this accuracy. But triangulation can not be done by the GSM device itself. Only the carrier can do that and provide this information to the device. But given the fact that most smartphones don't need LBS from the carrier to provide a decent location information, most carriers turned off their LBS interface. At least that's the situation in Germany. –  Flow Nov 2 '11 at 7:39
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.