且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何知道定位模式是WIFI或2G / 3G手机信号塔的机器人?

更新时间:2023-02-27 08:34:10

这是正确的,Android不明确地给出一个方法来确定网络位置是如何计算出来的。网络提供商的原理是收集设备上的所有相关数据,然后把它们发送到谷歌的服务器,你的位置被计算并送还给你。我不知道,但网络位置也可能使用加速计/陀螺仪/指南针数据,以提高定位的精度,尤其是当你不断地计算出自己的位置。 因此,我相信它可以同时使用手机信号塔和无线信息。

This is correct, Android does not explicitely give a way to determine how the network location is computed. The principle of the network provider is to collect all the relevant data on the device, and then send it all to the Google servers, where your location is computed and sent back to you. I am not sure, but the network location might also use the accelerometer/gyro/compass data to improve the accuracy of the location, especially when you compute your location continuously. So I believe it can use simultaneously cell tower and Wifi info.

您精确度的方法应该在大多数情况下,但不是100%可靠。

Your accuracy method should work in most cases, but is not 100% reliable.

另一种可能性是打开WiFi关闭,计算第一定位,然后再次打开它,并给它一个尝试。通过比较这两个位置,其精确度估算,你可能猜到的Wi​​Fi上的定位引擎的影响在当前位置。

Another possibility is to turn the wifi off, compute a first location fix, then turn it on again and give it another try. by comparing the two locations and their accuracy estimates, you can probably guess the influence of wifi on the location engine at your current location.

出于好奇,你为什么需要这个?

Out of curiosity, why do you need this for?