So I've been struggling with this issue for a while now:I have a raspberry pi with wifi sensors on it and I need them to get the RSSI (signal strength basically) of the wifi-direct signal transmitted by a different AP. Since these will be used to get distance measurements (between the pi and the AP), I need to get them with a high frequency within one second (or, ideally, I want an average of the RSSI within 100ms or within a second). I know I can get RSSI using wpa_supplicant's p2p functions, but the frequency there is around 6-12 measurements/second, with a pretty high variance. Does anyone know of any other tool/way that could help? If wpa_supplicant provides 'average measures' that would be great as well.NOTE: I do not fully understand the math/science behind how the distance/angle will be computed, as I'm only in charge of getting a head start on implementation. It might be that these values are good enough. I might be missing something conceptually. If so, please let me know :). 
Get RSSI indicators from WiFi Direct with high frequency
wifi;wpa supplicant
Don't use wpa_supplicant, go one level lower. I just tried while true ; do date -Ins ; /sbin/iw wlan0 station dump | grep signal ; doneon my desktop which gives me more than 100 measurements per second, with not a particular high variance.So I guess if you grep for signal avg instead of signal once every second, you should be fine. Though it might look different on the RaspPi because of less processing power.Note that those values are computed by black magic inside the driver, differ from hardware to hardware and driver to driver, and should only be used as a rough indication, and don't assume the values are linear with distance.So you'll need lots of measurements to pinpoint the source with any accuracy.As for the maths, you should assume a monotone function to map signal strength to distance or vice versa, maybe make some assumptions how this function could look like (e.g. quadratic/cubic, maybe do some measurements first), derive some error value for given source coordinates, and look for coordinates that minimize the error.If you happen to make an open-source project for this, I'd be interested in seeing a link. :-)