I am using the `AndroidProximityLibrary' for a project where i'm measuring the distance to the beacon and when it reaches / passes a certain distance it will do something.
Everything is working fine except the distances i'm receiving from the library have a big variation of values. Even if i'm standing in front of the beacon in clear nice of sight, i can get distance values that goes from 1,5 to 4 meters ( When i'm standing around 3 meters from beacon)
My real question is if i can somehow get more distance values so i can get rid of those spikes, currently i'm receiving beacon information around 2 distance values per second. Is is the beacon that is only sending information with that frequency ? or is it the library that is only doing the callbacks with that frequency ?
As a beacon, i'm using a raspberry pi configured like the RadiusNetwork
tutorial. I'm using a nexus 5 hosting the client application.
The reason the values vary so much is because there was a bug in that library that only used a single signal strength measurement to estimate distance. The latest version of the Android Beacon Library (which shares much of the code of the library you mention) uses a running average of signal strength samples over a 20 second window. This smooths out the noise significantly.
Unfortunately the AndroidProximityLibrary has been discontinued, and no new updates are being provided. If you are not using the cloud data features of the library, your best option is to migrate to the Android Beacon Library 2.0, which has all the other features. A migration guide is available here.