javaandroidbeaconaltbeacon

AltBeacon Library - Inconsistent beacon distance scans, is there a solution?


While using the AltBeacon Library for my Android app, experimenting with 3 iBeacons, I found that the calculted distances to these devices were very inconsistent, even varying ~90% between scans, which jeopardizes the user experience if the application is using a live user marker.

Here's an example of three of my consecutive scans:

I/Distâncias: Distance1: 7.871763695020549
I/Distâncias: Distance2: 1.189846194110576
I/Distâncias: Distance3: 0.30794614765743855

I/Distâncias: Distance1: 8.06442034917746
I/Distâncias: Distance2: 0.28282208519983487
I/Distâncias: Distance3: 0.30794614765743855

I/Distâncias: Distance1: 1.1589719262969496
I/Distâncias: Distance2: 0.2540181211096404
I/Distâncias: Distance3: 0.30794614765743855

These distances were taken without moving the smartphone that was running the application.

We can see that beacon 3 values are the same, however, beacon number 1's values took a huge hit on the third scan, providing a wrong and innacurate distance, comparing with the latter ones.

Does this happen for a specific reason or is there any way we can reduce these big impacts on the calculated distances?


Solution

  • Bluetooth distance estimates are precisely that -- estimates. They are not highly accurate measurements. To understand why they are often not accurate, what you can use them for and what you should not try to use them for, please read my blost, "How Far Can You Go?".

    The variations in estimates shown in your question are a bit extreme, so there may be a particularly large variance in the fluctuation in the beacon signal. Updating your question to include the RSSI of the beacon detection would be helpful.

    In order to make them as accurate as possible, the best things you can do are:

    1. Configure your beacon(s) to advertise at as high of a transmitter power level as possible, ideally +3 dBm or higher.
    2. Configure your beacon(s) to advertise as frequently as possible -- at least 10Hz for best results.
    3. Calibrate your beacon.

    The specific steps on how to do each of the above depends on your beacon manufacturer -- consult your beacon manufacturer's documentation to see how to do each one.

    To find out which one of the above issues is the primary driver of the problem, you might use the BeaconScope app to analyze the transmission. If you tap on the individual beacon transmission and let it collect data for 30+ seconds, then take and attach a screenshot, it may provide info about the quality of the beacon advertisements that may be affecting distance estimate fluctuation.