Android Developer--The six Bluetooth RSSI calculation distance for Bluetooth development example

Source: Internet
Author: User

Calculation formula:

D = 10^ ((ABS (RSSI)-A)/(Ten * N))

which

D-Calculate the resulting distance

RSSI-received signal strength (negative value)

A-Signal strength at a distance of 1 m from the transmitting and receiving ends

N-Environmental attenuation factor

Code implementation of the calculation formula

-(float) Calcdistbyrssi: (int) rssi{    int irssi = abs (RSSI);     float power = (iRssi-59)/(10*2.0);     return POW (power);}

The Rssi value is passed in, and the distance (in meters) is returned. Where a parameter is assigned a 59,N 2.0.

Due to the different environment, each transmitter source (Bluetooth device) corresponding parameter values are not the same. According to the truth, each parameter in the formula should be tested (calibrated).

When you do not know the exact location of the surrounding Bluetooth devices, you can only give experience values for a and n (as in this example).

Original: http://blog.csdn.net/njchenyi/article/details/46981423

Android Developer--The six Bluetooth RSSI calculation distance for Bluetooth development example

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.