I'm writing my bachelor thesis on indoor navigation using iBeacons. For this i use trilateration to find my position. I've been using the android beacon library, which is now known as the AltBeacon library to detect beacons and calculate the distance. I noticed, that the distances i get aren't that accurate and after some searching here, i came across a post from DavidYoung saying that because most device have different Bluetooth antennas i would have to take that into account when im calculating the distance.
The AltBeacon library calculates the distance like this (taken from DavidYoungs post):
protected static double calculateAccuracy(int txPower, double rssi) {
if (rssi == 0) {
return -1.0; // if we cannot determine accuracy, return -1.
}
double ratio = rssi*1.0/txPower;
if (ratio < 1.0) {
return Math.pow(ratio,10);
}
else {
double accuracy = (0.89976)*Math.pow(ratio,7.7095) + 0.111;
return accuracy;
}
}
My question now is:
how do i calculate these values (0.89976, 7.7095, 0.111) for my Lg G2 with RSSI measurements at certain meter intervals from the beacon?
I found this as an example for measurement values with the calculated coefficent.
Nexus 5 Distance Data
Meters RSSI
0.25 -41
0.5 -43
1 -49
2 -65
3 -58
4 -57
5 -67
6 -67
7 -77
8 -70
9 -69
10 -75
12 -72
14 -72
16 -78
18 -83
20 -81
25 -81
30 -75
40 -83Android device:
version: 4.4.2
build_number: LPV79
model: Nexus 5
manufacturer: LGE
Beacon Info:
RadBeacon Tag
Advertisements per second: 10
Transmit Power: Max
IPhone 5s Average RSSI @1m: -51Distance formula coefficients calculated for these values:
Intercept: 0.1820634
Multiplier: 0.8229884
Power: 6.6525179
The term intercept suggests linear regression, but when i put the values into a linear regression calculator it gave me results that were nowhere near those values.
I hope you can help me and that my question is clear enough :)