Go Down

Topic: i need RSSI value to distance calculation formula (Read 822 times) previous topic - next topic


any formula for finding distance from rssi values


There isnt one .
RSSI is useless for measuring distance.


Any other methods for finding distance between access point and client device??


Any other methods for finding distance between access point and client device??
A tape measure.
The art of getting good answers lies in asking good questions.


Mar 06, 2018, 12:45 pm Last Edit: Mar 06, 2018, 12:52 pm by NicoleClicquot
Funny question... :)
No there is not a general formula as RSSI is different in every location.

However, on 1 local fixed location:
It is possible to measure RSSI with most devices/libraries....
It is also possible to measure actual distance with a tape measure....
So just move your device away from the access point in a straight line and write down the RSSI values with every meter further away from the access point.

You could then display that saying something like
if (RSSI > 10) then 1 meter
if (RSSI > 20) Then 2 meters

However, it is not linear and has a lot of other variables.
RSSI is not stable so your outcome would be a ball park number.
However, could be fun to play around with it, dependent on your application.
Let us know you progress and application / project...


I'll be happy to explain the reasons RSSI is bad at distance and why it fluctuates so much. I actually researched this area quite extensively.  I.e. huge difference between dry day and rain day "moister in air" doors opening and closing, there are many reasons. If you insist on going this route I suggest

First recommendation: you stick to proximity, forget the concept of distance instead if you get _x_ reading or better then you are close (in room).

Second recommendation: Use https://www.internalpositioning.com/ the public server is down right now, I crashed it by mistake, but when the owner figures it out probably in a week i'm sure it will be up again. This works okay to find room. There is a free app for android phones called FIND - WiFi based local GPS by Hypercube Platforms that will let you see how accurate it is using a phone and wifi modems before you spend a lot of time programming this to your own systems. There is a newer version by the creator that uses 10 ai methods instead of 3 but it doesn't work nearly as well. The way he set up his test on the newer version, it expected you to tell it the real location every time during the test and the real location was factored into the answer it gave. If you didn't tell it the real location each time you ask, it is less than 50% correct which is the results you can expect in the real world from a system that doesn't know where you really are. The original FIND is about 75% correct when used with 4 wifi modems in the house and trained 4 separate times (different days i.e. one dry day, one rain day, one day after rain) in 3 minute intervals. Note, when training stay at least four feet from walls/boundaries of the room.  When I confronted the creator about the newer app not being nearly as accurate he accused me of wanting free work and he said I could pay him $150/hour for "consulting" when I was just trying to help. - Trust me, the original app is much more accurate. However, it is worth considering that the the newer app documentation https://www.internalpositioning.com/doc/ shows you how to set up passive scanning which might be worth looking into. Note: do not reference this post or reference me if you contact the creator of internalpositioning for help. He already blocked what he thought was my ip address from his server once because I wasn't interested in paying him $150 per hour and he got offended. If he found out I was still using it or was responsible for crashing his server by mistake he would block it again and it would take me 20 minutes to set up a different ip address again.

Third recommendation:Wait for 802.11mc to come out. It reduces cross talk and other reasons why traditional wifi isn't good for distance. You can get accurate readings within 1 to 3 meters. Android P already has built in support for it so smart phones coming out in third quarter this year may have the hardware to support it. Keep in mind that android O which had built in support for BLE 5 coded (long range bluetooth that has 300 ft range) came out 18 months ago with built in support yet still no phones on market hardware to support it. I think it's more likely that next phones will have 802.11 ax support which would not provide distance accuracy but would be more useful for homes that are going smart which have more devices that need to connect to internet.

Looking at your post, I wanted to bring attention to your JSON's question as well. Why do you have device id and device name which are both unique? Seems like one serves the purpose of the other.

Good luck in your project. Hope it turns out well. - Motion sensors might also be worth looking into STTR Phase I: Occupancy Estimation and Energy Savings with True Presence Sensors I talked to program investigator Ehsan Yavari, hes on Hawaii time but he was nice enough to have a phone call and explain what he was doing. I won't go into detail of what he told me because I'm not sure if he wanted me to keep that confidential but basically he went the motion sensor route instead and it seems to be working for him. His number and email is in that link.

Heres a good link for experts in the area. https://www.nsf.gov/awardsearch/simpleSearchResult?queryText=indoor+location+sbir Click on a topic if it is similar and the contact information for the person in charge of the topic both their email and cell number is on the report. I've called several and explained what I was doing and asked if they could provide guidance on what worked or didn't work for them. Some will talk with you if you are polite and make it clear that you aren't a competitor of what they are doing.

Go Up