how to get wifi hotspot's location?

只谈情不闲聊 提交于 2019-12-17 19:54:29

问题


I want to write an application that it can record the wifi hotspot's location we are accessing and display them in map. But the problem is - how do I get wifi hotspot's location? I think I can use the wifi signal to get the wifi hotspot's location, but it may not be very accuracy at first time. And if there is no other solution, I could record the location of GPS when access wifi hotspot at the first time.


回答1:


You'll not be able to find the hotspots location and you'll not be able to determine the direction and distance from your current position to the actual hotspot.

The hotspots don't report their coordinates (my wifi box doesn't even know it's own geographical coordinates). Google captured hotspots during their streetview missions and used the results to triangulate the positions of wifi hotspots and other companies did the same to build up databases.

So to get the information, you'll need access to a database that knows the coordinates of hotspots.




回答2:


TL;DR

Such services (1, 2) and apps exist and you can just be downloaded and/or readily used.

Technical possibilities of localization

  1. A very rough localization is possible via the IP address. This technically (and not always) only allows you to find the location of the ISP through which the internet is accessed, not the AP/hotspot itself (since a certain IP address pool is assigned to a given ISP). However, unless a VPN is used, that will usually at least tell you the country and often be even accurate to less than 50km (since ISPs are usually somewhat close to the internet access node). Many readily avaiable services are available for this, simply searching for something along the lines of "ip to location API free" should yield good results.

  2. As you thought yourself, and as other answers already mentioned (in vague terms), there is however a better (or at least additional) option. You could just use the many devices out there to record the received WiFi signals and associate the strength of the signal with locations. With such a database, you could then in turn located devices, based on the received signals. Actually there are several such services, most prominently the one created by google and used (and fed with data by) pretty much any android phone out there. Fortunately, some of these are open and free to use (and contribute to), such as the one provided by mozilla, and another one.

  3. Cell towers (and according databases) often allows localization down to tens or hundreds of meters.

  4. In some places dedicated bluetooth APs are used to increase localization accuracy, especially indoors.

  5. If you have a lot of time (several hours to days) and a more-or-less accurate time, you can also use the light (from sun and moon) to get a location. Even with the simplest means you can get down to a few dozen kilometers.

  6. Watching the inclination of geomagnetic field against center of gravity in combination with an according dataset (very inaccurate, but cheap).

  7. Of course dedicated satellite navigation systems such as GPS (~5m), BeiDou (10m~10cm), Galileo (1m~1cm), GLONASS (7~3m), where the lower numbers in the brackets are commercial/military only-systems. However, each of these require dedicated receivers.

  8. These satellite navigation systems are often augmented by Ground Based Augmentation Systems (GBAS), which require additional receivers.

So now you can pick and chose for your application, which of these are most useful to you.




回答3:


I don't think so. I use iPod touch maps and Samsung Galaxy Wonder as hotspot. iPod could tell my location! My guess is Samsung stealthily follow Apple's doing of communicate geo info through wi-fi.



来源:https://stackoverflow.com/questions/4086009/how-to-get-wifi-hotspots-location

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!