Click here to Skip to main content
14,449,862 members
Rate this:
Please Sign up or sign in to vote.
See more:
Hi everybody!
I'm working on an indoor localization project! Actually it's a small project for myself. I need to know how to calculate distance between client and access point using RSSI. I have signal strength in db, as an example -15db, but I don't know how to find the distance.
I need a sample code.

Many thanks.
Posted
Updated 6-Jul-12 7:22am
v2
Comments
lamiaa ashraf 10-Sep-17 11:19am
   
HI
I have the same problem , have you solved it .
if yes, please tell me
Rate this:
Please Sign up or sign in to vote.

Solution 1

Can it tell you the distance? RSSI is received signal strength indicator. This will only ever be db measurement which could also subject to the Fresnel effect by lots of things, walls, windows e.t.c. There are interference issues such as microwaves e.t.c.

If you want to estimate accurately you actually have quite a complete calculation. The following is an example website which does this calculation.

Wifi Range Calculator[^]

Perhaps you could use latency but you're measuring latency against the speed of light over a short distance so I doubt the clock would be accurate enough.

Taking a scientific approach would measure the db at various distances and plot a strength v distance curve and then create formula which closely follows the curve.

Personally I think you need a mathematician to explain the calculation before working on the code.

The alternate option which considering time spent might actually be cheaper, would be to by a GPS locator.
   
v2
Comments
aghorbanmehr 6-Jul-12 16:22pm
   
Thank you for your answer.
I know everything about complexity of this calculation and I Have read a lot of articles about it. A lot of articles full of complex mathematical calculations that I couldn't understand them. But I think I should calculate the distance in an ideal situation, I mean a building without any interference and noises. I should place three access points in 1,6 and 11 channels in three different places of this area. Then my application should be installed on a laptop and it should indicates the place of the laptop (approximately).
I'm trying to find an algorithm or sample code that calculates this distance.
Member 10298029 25-Sep-13 21:39pm
   
Hi,how about your project goes these days? how about the accurency for example in 50 meter squrer?Thank you!
Jaxam 19-Apr-13 16:16pm
   
HI
I am having the same problem of trying to locate where my laptop is in the building i am in. Assume that I know the exactly location of where each access point is and also assume that the enviroment is interference free, ie. no wall, no other magnet around, how would i calculate the distance base on the rssi?

thanks
lamiaa ashraf 10-Sep-17 11:18am
   
HI
I have the same problem , have you solved it .
if yes, please tell me
Rate this:
Please Sign up or sign in to vote.

Solution 2

try below link, it may help you.
http://www.s2is.org/Issues/v1/n2/papers/paper14.pdf
   
Rate this:
Please Sign up or sign in to vote.

Solution 5

Hi everyone!,
I have the same question for my assignment.

I do not know how to find the distance from RSSI ?
I need the formula to get distance from RSSI and then find exact location using Trilateration.

I need to get to know the logic first and afterwards code this in JAVA.

Thank you for your help in advance.
   
Comments
Essa Qasem Shahra 24-Nov-17 14:30pm
   
you can read the paper in the following link to get the logic concept and understanding of RSS:
https://www.researchgate.net/publication/310610174_A_Comparative_Study_of_Range-Free_and_RangeBased_Localization_Protocols_for_Wireless_Sensor_Network_Using_COOJA_Simulator
https://www.igi-global.com/article/a-comparative-study-of-range-free-and-range-based-localization-protocols-for-wireless-sensor-network/171979
Rate this:
Please Sign up or sign in to vote.

Solution 7

Have you got the solution?
If yes pls share....
   
Rate this:
Please Sign up or sign in to vote.

Solution 8

how to find distance using signal strength?
when WIFI release its signal ,they are oscilating in environment. distance travelled by signal is depends up on the strength of the signal. may due to obstacles signals loss their power.(signal energy is observed by bodies)
when user get a signal strength(for example -25db)at some distance d,
then by using equation


d=10^((27.55-20*log(base10)(frequency)+signal strength)/20)
note: this distance is from wifi box to user
   
v2
Comments
OriginalGriff 5 days ago
   
Two things:
1) While I applaud your urge to help people, it's a good idea to stick to new questions, rather than 7 year old ones. After that amount of time, it's unlikely that the original poster is at all interested in the problem any more!
Answering old questions can be seen as rep-point hunting, which is a form of site abuse. The more trigger happy amongst us will start the process of banning you from the site if you aren't careful. Stick to new questions and you'll be fine.

2) You're assuming that the WiFi field is omnidirectional, and that isn't generally the case - the aerials in the router generate a "pancake" shape field that is thicker than it is high to increase signal strength in the horizontal plane. Since most devices are in the plane or slightly above or below it, you get a "better signal" through most of the used environment that way that you would with a "globular" signal.
So the Db measurement is not the only thing you'd need - you'd need the vertical angle as well.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100