how to get Distance between wifi access point and Mobile Device

余生长醉 提交于 2019-12-03 09:11:37

This code:

double exp = (27.55 - (20 * Math.log10(freqInMHz)) + Math.abs(levelInDb)) / 20.0; double distanceM = Math.pow(10.0, exp);

Works under the assumption of free space path attenuation between two isotropic antennas and the AP transmitting at a power of 20dBm (and the math is not even correct; the frequency dependence of free space path loss is different; not that is matters for the bands of W-LAN, uses, the correction is in the 27.55).

In reality you're dealing with anisotropic antennas, obstacles in your path, diffraction effects and the AP varying it's power output to save energy if no high bandwidth is required.

Or in other words: It's totally impractical to obtain a reliable distance figure just looking at the received power. It can give you a ballpark, order of magnitude, but not something that's remotely accurate. This is just basic physics.

The only reliable way of measuring distance is time-of-flight. For this you have to measure the roundtrip time between the device and the access point. Since we're dealing with the speed of light and distances in the order of meters up to 100m (top), this means measuring nanoseconds. Can be done but requires some work. See the link SatelliteSD gave you (it's in German but the diagrams and keywords should be understandable).

It is possible, you could use the Time-of-Flight approach. Keep in mind that you can't rely on the messages recieved, but on the overhead received (like ACK) I can only come up with this reference (german language) measuring of signal runtimes And from a quick read I think it is a very tedious thing to do.

AADProgramming

No, it is not possible.

You'll not be able to find the hotspots distance from your current device location to the actual hotspot.

It seems that the hotspots don't report their coordinates.

Check the Link which has more detailed info.

There is a method called "triangulation" but for this case you have least 3 hotspot. You can answer with detail in this pdf.

http://www.see.ed.ac.uk/~slig/papers/ITM2010.pdf

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