Link to home
Start Free TrialLog in
Avatar of alexey_gusev
alexey_gusevFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Determine GPS coordinates by IP

I know Google does it, so that's possible, and what I'd like to know is how to obtain the location without GPS, probably by IP address of the caller.

Any ideas? Are there any web sites that provide such services?
Avatar of Nosekz
Nosekz
Flag of Czechia image

Google maps can locate phone by signal of Mobile Operator. Every phone can "see" many BTS (transmitters of MO) and calculate position by known position of the BTS.
This type of location is less accurate than GPS is.
Avatar of alexey_gusev

ASKER

ok, I see I wasn't very clear with my question: I want to do it from cf.net app, under Windows Mobile, so I need to do it somehow otherwise than using Javascript. Is it possible to use Google's API this way?

Accuracy is less important in this case, I just want to know how to detect my location programatically
I need some clarification:  

Do you want to locate and use an existing database that stores the geographic information of any given IP address around the world?  Meaning, My IP address is assigned to me by Telmex(aDSL provider), and is located in the City of Cabo San Lucas, Baja California Sur, Mexico.  If I go a particular website that knows where I am at, it is because that website is subscribing to a company's database that contains IP addresses associated with coordinates.  Take note; Whist this information is available for US IPs from a number of sources, you will find it is not available for other countries/areas that are less developed, more obscure, etc.  For example; in the US, Google has most addresses geo-coded, wherein users may easily cross reference an address with a coordinate, or a coordinate with an address, or direction To or direction From(routing).  Whereas in Mexico, Google does not have this feature in place, not because for lack of wanting, but rather and instead, because it is simply not available, or is only available from third parties/sources on local, or perhaps at most, regional levels.

You indicate that you wish to utilize this on your Windows Mobile hand held?  And you wish to obtain this information when someone calls you on this hand held?  If someone is calling you using GSM, then there is obviously no IP address to associate.  In this case, you would need to tap into third party databases that maintain land-line and cellular telephone numbers(white/yellow/blue pages or directory) that are cross referenced with a physical address.  However, again, in this scenario, the telephone number would have to be listed in this directory, and the address it is associated to might not actually be the most updated/current address info for that particular telephone number(person/business).  

If you could expand/explain/articulate exactly what it is you wish to do, then I will respond explaining exactly what is and what is to possible, along with provide references and examples of others who are doing the same thing, or something similar.   Also, we can delve into triangulation(approximate geo-locations based on a user's location with respect to the surrounding cellular towers with which the user's cellular phone communicates) and geo-coded WiFi APs(Access Points), both of which can provide you with the user's general location, but would require specific solutions for each respective hand held type.  

Eric Jarvies
hello Eric,

my goal is to provide tracking info similar to Google Maps Mobile, where it can determine your position even without GPS device available.

I have an application that among other functionality sends GPS coordinates of the Windows Mobile 6.0 PDA to the server. This application is used to visualise the route of the customer engineers in UK, for my client wants to know where their engineers are located at any point in time. Accuracy is less important in such case. They use WM60 Phone edition with various operators, so they have embedded GPS device and so forth.

All is well, until at one moment GPS device stops returning valid GPS coordinates for whatever reason. In such situation, 800 meters accuracy from Google is more than welcome :)

Since Google does it even when I connect over WiFi from the PDA device without SIM, I conclude they do it using IP address of the PDA. As a matter of general interest, I'd like to know how to do it using CellID as well (as I can easily obtain it on e.g. Symbian Phone, don't remember if there is similar API under WinMobile), but for the recent issue Google-like technique would cover all my needs.

So if you could explain me how can I achieve above result for UK locations, or point me to the public websites/webservices/API where I can connect to and get approximate location - that would be awesome.

I hope it's clearer now :)

BR,
Alex
Hello Alex,

Thanks for the additional information.  Lets see if I can add anything useful...

Google uses both WiFi APs(Access Points & GSM cellular towers that have been previously geo-coded by way of Skyhook found at http://www.skyhookwireless.com ).  Skyhook offers an API that you can use in your own application, and you can learn more about that at their website.  Another alternative is Navizon ( http://www.navizon.com/ ), wherein they too offer an API that you can integrate into your own application, and run as a background process.  In both cases, you can establish licensing based on providing them(Skyhook and Navizon) with reciprocal data, aka geo-coded APs.  For any hand held that has embedded WiFi & GPS, that hand held can also serve as an AP geo-coder/collector, wherein that data will sync-back to the Skyhook/Navizon server/central repository, thus adding to their data store, whilst making more current and accurate the data your application will be using(meaning, if Skyhook/Navizon has an entry for AP BLAHBLAH that was registered 6 months ago with signal strength 6 and x and y coordinates, then your app may have re-registered it yesterday with a stronger signal strength of 8 with a revised x and y coordinates, the assumption being that your current information is the more accurate of the two, thus it is used).  So, in this case, the benefit is reciprocal... you/your app has access to ALL of their(Skyhook/Navizon) APs, which are updated by them themselves, as well as all their users(meaning all Google Maps users, and all the third party applications like yours that are installed on devices with embedded WiFi and GPS, and are actively collecting and sync'ing their data back to their server repositories).

If you go to http://www.skyhookwireless.com/developers/ you can download the Skyhook SDK and also check out some code/app examples.  You can do the same for Navizon at http://www.navizon.com/fordevelopers.asp and in both cases, you will likely get the functionality you are looking for.  I will say that Skyhook clearly has the larger AP repository, but depending on your own programming abilities, you may wish/be able to add both to your one application, in which case you take advantage of/benefit from the best of both worlds.

I hope this was helpful, and if so, please click the button saying so :)

Best of luck and do not hesitate asking me additional questions should you need some more clarification/help.

Eric Jarvies
I forgot to mention something... depending on your actual location, and the area you wish to have coverage, both Skyhook and Navizon my or may not have good existing coverage for that area.  This depends on your location.  for example, I am in Cabo San Lucas, Baja California Sur, Mexico, and neither have good coverage here, with the exception of what I have provided them, which leads me to what I forgot to mention previously; Using either Skyhook's or Navizon's compiled/exiting application, you may wish to do a day or week worth of Wardriving in your area using your own WiFi/GPS enabled hand held, so you may collect all of those APs and get them registered in their respective AP repos.  You will be surprised at how many APs there are in your area as you Wardrive.  Naturally, the more APs you register in your area, the more accurate your positioning application will place it's users.  You may think; well, instead of me Wardriving the area, why not have the users of my software do the Wardriving?  Well, of course they can, but the initial weeks/months as they use it, it will not be as accurate as if you had Wardriven it before hand.  Also, only your users with hand helds with embedded WiFi and GPS who are running you software in active seek and record mode will be able to do the collecting, otherwise, if they only have just WiFi, or do not have WiFi at all on their hand held, then those users cannot contribute to the AP repo... they can only benefit from the existing AP repo.  

Another thing worth mentioning, is if neither Skyhook or Navizon licensing/SDK/API works for you/your app, you may consider doing it yourself.  It's not too difficult, which is to say, it's not too difficult creating a Wardriving application, in fact, you can take a look at Aeromap, WiFiFoFum, et, al, and see how those WM applications collect APs and Geo-code them with coordinates based on AP signal strength.  You could grab the source from one of these projects, and then roll your own proxy server/MySQL(or PostgreSQL dB), along with creating code on your hand held WM app that essentially compares GSM and WiFi broadcast signals against your own GSM tower/WiFi AP database, that can be entirely access remotely on your PostgreSQL server(or MySQL would work too, as the data need not be spatically enabled), or your WM app could periodically download the GSM/AP records to the WM device itself, and your app would compare the received signals against the local(hand held/device itself) dB, thus the user would not need to always be connecting to the network.  In this case, perhaps your application updates the hand held every hour, or in interval periods based on the data and it's changes.  If your coverage area for your users/WM app is a fixed geographic area, that will remain that way, and that is not too large(meaning perhaps 100 x 100 miles or so), then you could initially Wardrive the area, creating a good, well populated initial dB, and then your users over time would keep it updated.  In this case, you would own/maintain the GSM tower/WiFi AP records/data, and would not need to license Skyhook/Navizon software.  Again, this largely depends on your coverage area, your intended use, your programming abilities, and other variables, but I wanted to make mention of it none the less so you at least know the option exists.  

Eric Jarvies
well, building proprietary geo-code database is not an option. I would like to use free services or not too expensive 3rd party APIs from CF.NET application or some other technique I could develop myself under Compact Framework or using Win32 API (if any).
ASKER CERTIFIED SOLUTION
Avatar of ericjarvies
ericjarvies
Flag of Mexico image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
ok, Eric, I will have a look at these SDKs and then come back to you if I still have questions.

thanks for the pointers :)
thanks, Eric