Win a copy of Five Lines of Code this week in the OO, Patterns, UML and Refactoring forum!
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
Marshals:
• Campbell Ritchie
• Bear Bibeault
• Ron McLeod
• Jeanne Boyarsky
• Paul Clapham
Sheriffs:
• Tim Cooke
• Liutauras Vilda
• Junilu Lacar
Saloon Keepers:
• Tim Moores
• Stephan van Hulst
• Tim Holloway
• fred rosenberger
• salvin francis
Bartenders:
• Piet Souris
• Frits Walraven
• Carey Brown

# How to implement cell triangulation in mobile phones to track location?

Rancher
Posts: 1369
1
I recently read a wiki entry about triangulation and how it, in theory, can be used to locate objects. Google Maps, on most of the mobile phones, points to the current location of the user even when there is no GPS(location data provider in these phones). Google(the search) told me that it creates a database of cell tower locations and that database is built from people using Google Maps for Mobile. There are others(Navizon) that have been doing this for some time.

I am interested in learning HOW all of this works? What sort of data needs to be obtained from cell towers? Can this be implemented on a smaller scale using Java and a small database?

Any pointers or links to reference material that can answer my questions above will be great help. I will be happy to read more about triangulation and stuff alike, so if you have anything you want to share please do.

author
Posts: 15385
6
It is very basic speed calculation and geometry that give you the answer.

The cell callers distance can be calculated because the speed of the radio signal is known.

Steps

1. Calculate distance from the first tower based on speed which gives a radius value.

2. Draw a circle with the distance radius around the first tower with than distance.

3. Calculate distance from the second tower.

4. Draw a circle around this tower which results in 2 points where the user may be[maybe 1 if you happen to be in the exact middle!]

5. Calculate the distance with the third tower

6. Draw a circle. The point where circle 1, circle 2 and circle 3 meet is where the cell phone is located.

So if the phone gives you any of this info [speed, tower locations], you can do the triangulation.

Eric

Monu Tripathi
Rancher
Posts: 1369
1

I found a blog entry that gives an overview of how location based services work (no specifics of triangulation as such but still worth reading)...

Saloon Keeper
Posts: 22248
151
The technical name for this is "trilateralization" (or trilateration, I forget which). As I understand it, only signal strength is used as a means to determining distance. In the case of my cellphone provider, the accuracy is supposed to be within 1500 feet or less except in areas that don't have enough nearby towers (in which case you might not get anything).

Ironically, there's a whole set of phones that have built-in GPS chips but Sprint and Verizon have them disabled at the hardware level and use trilaterization instead. No explanation given, though it may be because GPS requires more battery power. At any rate, whatever they did has made it impossible to use the onboard GPS; no one's been able to hack around it. Though there are rumors that a 911 call may switch it on.

Monu Tripathi
Rancher
Posts: 1369
1
On Android handsets, we can get a cell Id using the LocationManager APIs. If only we could get to know about other cell-IDs, (probably two more?) and have a database which maps Towers to latitude-longitudes(do service providers share this data?), we could triangulate the location.

It would be reasonable and more logical to implement this sort of thing on the service provider side where they would have to just *use the info* they already have. But it would be fun if I could write an application that runs on the device and can tell the location without using GPS.

Bartender
Posts: 4179
22
Mobiledia seems to have a database for cell phone tower locations, so that would be a place to start.

Tim Holloway
Saloon Keeper
Posts: 22248
151
I think that onboard GPS is part of the Android standard, so looking for towers on an Android phone would be king of pointless - GPS is considerably more precise. And databases are places where you store incorrect information.

As I mentioned, Nokia expressed the intent to GPS-enable all their future phones, and HTC seems to be be doing something similar. Apparently, adding GPS capability to the chipset is quite cheap, or Sprint and Verizon wouldn't be selling phones that keep it switched off.

Monu Tripathi
Rancher
Posts: 1369
1

Tim Holloway wrote:I think that onboard GPS is part of the Android standard, so looking for towers on an Android phone would be king of pointless - GPS is considerably more precise. And databases are places where you store incorrect information.

As I mentioned, Nokia expressed the intent to GPS-enable all their future phones, and HTC seems to be be doing something similar. Apparently, adding GPS capability to the chipset is quite cheap, or Sprint and Verizon wouldn't be selling phones that keep it switched off.

Tim: I agree with what you have said here but lets just consider this as a small experiment. Since, I have some time to kill why not give it a try? Will let you know if I reach somewhere with this.

Steve: thanks for the link !

 It's a tiny ad. At least, that's what she said. Thread Boost feature https://coderanch.com/t/674455/Thread-Boost-feature