如何获取wifi热点的位置?

发布于 2024-09-30 02:29:31 字数 147 浏览 5 评论 0原文

我想编写一个应用程序,它可以记录我们正在访问的wifi热点的位置并在地图上显示它们。但问题是 - 我如何获得 wifi 热点的位置? 我想我可以使用wifi信号来获取wifi热点的位置,但第一次可能不太准确。如果没有其他解决方案,我可以在第一次访问wifi热点时记录GPS的位置。

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.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

意中人 2024-10-07 02:29:31

您将无法找到热点位置,也无法确定从当前位置到实际热点的方向和距离。

热点不报告它们的坐标(我的 wifi 盒子甚至不知道它自己的地理坐标)。谷歌在街景任务中捕获了热点,并利用结果对 WiFi 热点的位置进行了三角测量,其他公司也采取了同样的做法来建立数据库。

因此,要获取信息,您需要访问知道热点坐标的数据库。

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.

﹎☆浅夏丿初晴 2024-10-07 02:29:31

TL;DR

此类服务 (1、 2) 和 应用 存在,您只需下载和/或随时使用即可。

本地化的技术可能性

  1. 通过 IP 地址可以进行非常粗略的本地化。从技术上讲(并非总是),这仅允许您找到 ISP 的位置,通过该位置访问互联网,而不是 AP/热点本身(因为某个 IP 地址池 被分配给给定的 ISP)。然而,除非使用 VPN,否则通常至少会告诉您所在国家/地区,甚至通常精确到 50 公里以内(因为 ISP 通常距离互联网接入节点较近)。许多现成的服务可用于此目的,只需搜索“免费的 ip 到位置 API”之类的内容即可产生良好的结果。

  2. 正如您自己所想的那样,以及已经提到的其他答案(以模糊的术语),但是还有一个更好的(或至少是附加的)选择。您可以使用许多设备来记录接收到的 WiFi 信号,并将信号强度与位置相关联。有了这样的数据库,您就可以根据接收到的信号依次定位设备。实际上有几种这样的服务,其中最突出的是由谷歌创建的服务,并且几乎所有 Android 手机都使用(并提供数据)。幸运的是,其中一些是开放且免费使用(并贡献)的,例如 mozilla 提供的 和 另一个

  3. 蜂窝塔(以及根据数据库)通常允许定位到数十或数百米。

  4. 在一些地方,使用专用的蓝牙AP来提高定位精度,特别是在室内。

  5. 如果您有很多时间(几个小时到几天)并且时间或多或少准确,您还可以使用光线(来自太阳和月亮)来获取位置。即使使用最简单的方法,您也可以到达几十公里。< /p>

  6. 结合相应数据集观察地磁场相对于重心的倾角< /a> (非常不准确,但便宜)。

  7. 当然是专用的卫星导航系统,例如 GPS (~5m)、北斗 (10m~10cm)、伽利略 (1m~1cm)、GLONASS (7~3m),其中括号中较低的数字仅适用于商业/军用系统。然而,每一个都需要专用的接收器。

  8. 这些卫星导航系统通常由地面增强系统 (GBAS) 进行增强,需要额外的接收器。

因此,现在您可以为您的应用程序挑选对您最有用的选项。

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.

漫漫岁月 2024-10-07 02:29:31

我不这么认为。我使用 iPod touch 地图和 Samsung Galaxy Wonder 作为热点。 iPod 可以告诉我的位置!我的猜测是三星正在悄悄效仿苹果通过 Wi-Fi 传递地理信息的做法。

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.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文