问题
For some reason a friend and myself were talking about calculating the distance between yourself (laptop, phone, etc.) and an AP based of the info you get from the devices (RSSI, freq, SNR, etc...). So, after spending sometime researching about trilateration, triangulation, and free-space path loss. (with the help of some blog posts and wiki) I was able to get a distance in meters from the AP to my laptop and the results were a lot better then what I thought they would be. Whenever I'm in the same room or there's a line of sight to the AP, the accuracy is about a foot.
But now, I want to take it one step further... I want to be able to account for walls and other obstructions. I think this might be possible or at least give me a better results then the FSPL formula when there is obstructions and I was thinking/researched that it might be possible by calculating in the signal-to-noise ratio. But, I was unable to find anything on how to do this correctly. There was always a problem but never a solution to this idea (or I was unable to find anything on the web because my knowledge about this subject is very little. about a days worth.). So, here I am turning to stack overflow to see if you guys can help me out in solving this.
So, this is what I have so far (in python)....
import math
freqInMHz = 2462
levelInDb = -83
SNR = -87
result = (27.55 - (20 * math.log10(freqInMHz)) + math.fabs(levelInDb)) / 20.0
meters = math.pow(10, result)
feet = meters * 3.2808
print meters
print feet
I am from the US, so I printed both meters and feet out. Just because I can visually measure out feet better than I can meters.
So, with that formula it does a great job of finding the distance in an open room or clear view of the AP. If anyone has any ideas or comments I would greatly appreciate it. Because I'm currently stuck on a wall! (joke punch line drums sound)
Thanks, Throdne
回答1:
I am not sure if SNR can be so helpful in this case as different receivers will have different SNR which might vary by couple of dB.
The SNR is measured at a user device and it varies as the user moves. Logically it should decrease as the distance between the transmitter and receiver increases. Since SNR relies on two factors Received Signal Strength (RSS) and Noise (N) it can get affected by various reasons, such as interference! Interference can affect the N and as a result SNR. Also Multipath, Scattering, Diffraction and etc can affect RSS readings.
So if your formula works for Direct line of sight use it and try to work on a formula for NLOS not necessarily based on RSS and SNR.
You might wanna look into the Time methods rather than RSS methods as they don't get affected as much by noise and they can even filter out multipath.
Also the SNR value which you have in your code it can not be really SNR as it does not appear normally as a negative number specialty in 802.11. Having a negative SNR means you have more noise than Signal.
来源:https://stackoverflow.com/questions/23125264/calculating-distance-of-an-ap-including-signal-to-noise-ratio