Dev
Dev

Reputation: 13

incorrect distance showing altbeacon in android?

I'm working on beacon mapping app when a beacon enters in 2 meters range i have to call web service but by using this library it's showing wrong distance if beacon is in 5m range then also it's showing 1.5 something

       if (oneBeacon.getDistance() <= 2) {

            final String distanceString = String.valueOf(major.toString() + 
         middle.toString() + minorString.toString());
            beaconList.add(distanceString);
        }  

Upvotes: 0

Views: 233

Answers (1)

davidgyoung
davidgyoung

Reputation: 64916

A few tips:

  1. Understand that beacon distance estimates are very rough and will never be exact. You must set your expectations appropriately. At 1 meter actual distance, estimates of 0.5-2 meters are typical. Obstructions and reflections affect this.
  2. You must calibrate your beacon so that the 1m expected signal level is transmitted inside the packet. This involves measuring the signal level at 1m then spring this "measured power" inside your beacon. Your beacon supplier should provide you with instructions on how to set this.
  3. On Android, a very fragmented hardware base means big variations in Bluetooth chips, antennas and phone cases all of which affect the distance estimate on a device to device basis. If you know your target devices, you can refine the distance formula for these devices. This is a more complex procedure, so only worth doing if (2) does not give you the results described in (1).

Upvotes: 1

Related Questions