How Google Gears Geo Location Works by MHefny

VIEWS: 3,457 PAGES: 4

									How Google Gears Geo-location Work?!

I knew about Google Latitude from a friend when I bought my HTC mobile. I used it few times before I
update my ROM to a cooked ROM that has no Google latitude app installed. The story begins when I
noticed by chance that my Google latitude gadget on iGoogle reflects my location although I had not
accessed google latitude from my mobile recently. I googled for geo features of Google gears and
discovered that they are able to give you your location using wifi-towers only.

In the following are discussion about Google Gears geo features and a proposal of how might it works.


First try to connect your computer to a wired network –no wifi- and then try to know your location using
google latitude, google will give you “Unknown Location” as it is not able to locate your location. Switch
the very same computer to Wifi connection and use google latitude again, now the result will be
completely different google can give you an accurate coordinates of your location. That means location
cannot be determined by IP address only. Using IP you can know the country, city and regions in case
you know from ISPs how they distribute their IPs geographically.

The second thing I heard about is that BBC has a service that gives you weather information based on
your location that gets it from Google Gear. I decided to monitor HTTP traffic using tool such as Fiddler, I
was looking for:

        1- What data is retrieved from my PC in order to locate my location?
        2- How does BBC communicate with Google location service via my PC ?

The BBC weather site downloads javascript to my PC that calls locally Google Gears, and then Google
calculates my location then it is sent to BBC website.

The following figure shows this information. As we can see Google Gears collects all wifi towers that can
be detected from my PC in the following form { mac_address , signal_strength, SSID}

                                                                                                Page 1 of 4
                                                                              {         "access_token"          :
                                                                              GVfypazxVp",           "host"     :
                                                                              "radio_type"     :      "unknown",
                                                                              "request_address"         :   true,
                                                                              "version" : "1.1.0", "wifi_towers"
                                                                              : [ { "mac_address" : "00-18-6e-
                                                                              ca-8d-44", "signal_strength" : -
                                                                              70, "ssid" : "TTT" }, {
                                                                              "mac_address" : "00-90-d0-f2-
                                                                              02-3d", "signal_strength" : -86,
                                                                              "ssid" : "High jacker" }, {
                                                                              "mac_address" : "00-b0-0c-00-
                                                                              f2-f5", "signal_strength" : -48,
                                                                              "ssid" : "HProg" } ] }

This data is sent in JSON format to and google replies with my latitude,
longitude and even my own address .

The above information that is sent to Google is good enough to roughly locate your position relative to
these wifi-towers, but to locate the absolute location you need to know the absolute location of these
wifi-towers!! Again this is not clear to me how Google can know such information.

I made some more investigation and found that in case GSM data is available, then this data is sent also
together with the wifi information.

How does Google Gears Geo Location Work?
From here I try to describe based on the above info how google might uses this information to give
location information.

        In case of GPS data is sent to google contains:

            a. GPS data
            b. GSM towers
            c. Wi-fi towers.

        In Case mobile support A-GPS it is enough to determine GSM towers to have accurate info about
location. This info is sent to Google as part of the request. But as we can see this information already
contains Geo location, so google might do the following:

                                                                                                  Page 2 of 4
                1- Calculate you location [latitude & longitude]
                2- Use wifi data to calculate your relative position to each wifi.
                3- Calculate absolute position of each wifi-tower based on a & b:
                       a. Mobile absolute location is already known.
                       b. Wifi relative location from the mobile is known.

Now google stores mac_address & SSID together with absolute location in a geo database that is kept
updated when possible.

In case you open your laptop and connect
to Google latitude google can determine
your absolute location using wifi-towers
only because it already knows from other
queries from you and different persons the
absolute location of wifi-towers.

As we can see in the following figure, the
blue person sends GPS, GSM-Towers info &
Wi-Fi towers info. Google calculate the wifi
towers info. Now the green person can
know his location by query google with wifi-
towers only.

Other Useful Links - you can translate into English using Google Translate.

         The above technique is only a guess by me based on simple evidence and logic thinking. This
document describes the analytical thinking and how I deduced this technique that could be partially or
totally untrue.

About Author:
        Mohammad Said Hefny

        Computer Engineering works in Software field.

        Contact me @

                                                                                             Page 3 of 4
Page 4 of 4

To top