Click here to Skip to main content
12,698,531 members (24,090 online)
Rate this:
Please Sign up or sign in to vote.
See more: C# Java
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 6-Jul-12 7:21am
Updated 6-Jul-12 7:22am
Rate this: bad
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.
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

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?

Rate this: bad
Please Sign up or sign in to vote.

Solution 2

try below link, it may help you.
Rate this: bad
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.
Rate this: bad
Please Sign up or sign in to vote.

Solution 7

Have you got the solution?
If yes pls share....

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

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Mobile
Web02 | 2.8.170118.1 | Last Updated 2 Jan 2015
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

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