-
Notifications
You must be signed in to change notification settings - Fork 0
4 Android
The android app will show a footprint of the floor where the room in which we conducted our tests is. The beacons will be predisposed at a specific location inside the room where we did our tests, that location shall match what appears in the app. The beacons will be represented by a red circle and a number that identifies them, they will turn green if the estimated distance from the receive packet is less or equal to 1m.
If we go to the settings section we can choose to see the estimated distance from each beacon to the object transmitting the packets in realtime.
The program starts by loading the blueprint and add the dots representing the beacons to their pre-defined position.
The next step is to listen for changes in the remote database, when a new RSSI is uploaded, the program retrieves it, does the calculation to estimate the distance, and shows it in the definitions tab. If the distance is less or equal to 1m the respective beacon dot will be highlighted with green.
The code:
val MEASURED_RSSI = -55
val PATH_LOSS_INDEX = 3
10.0.pow((MEASURED_RSSI-rssi.toString().toInt()).toDouble()/(10*PATH_LOSS_INDEX))To get the measured value we left the equipment running until we saw some (converging values) similarity in the RSSI values from our three beacons, we did this with all the beacons being at a 1 meter distance from the Raspberry Pi. After some time we ended up choosing the value of -55.
For the N value we choose 3 after tuning to it, before that we tried with all the values. With the numbers 2 and 4 we noticed in very big fluctuations in the estimated distance, like with an RSSI value of -65 for example we were having distances of 1500 meters which doesn't makes much sense since the beacons were at most, 3 meters from the Raspberry.
So we choose the number 3 because we where having much more tidy results (less fluctuations in distance).

