Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Distance calculation for the detected beacons. #12

Open
awazgyawali opened this issue Nov 30, 2019 · 3 comments
Open

Distance calculation for the detected beacons. #12

awazgyawali opened this issue Nov 30, 2019 · 3 comments

Comments

@awazgyawali
Copy link

I have added the filed to one of my project, everything works well but there is no mechanism to get the distance. I tried this article formula to calculate the distance but I am getting very vague value as compared to the alt beacon library for android. I see alt beacon uses different calculations method for that.

However, the article seems quite outdated as some of the hyperlinks work no more. Can you shed some light on it @davidgyoung , maybe some tips that can be helpful for me to begin with.

@davidgyoung
Copy link
Member

Did you try the built in distance calc?

@property (readonly) CLLocationAccuracy distance;

Distance estimates are always going to be rough.

@awazgyawali
Copy link
Author

It's giving very vague value, like 40 m for about 3 - 4 meters.

@davidgyoung
Copy link
Member

It sounds like the beacon is not properly calibrated. You need to configure the measuredPower field in your beacon transmitter to the 0 meter expected RSSI value (for Eddystone) or the 1 meter expected RSSI value (for AltBeacon). Make sure your beacon is transmitting this configured value. If you do this, and then put the receiver 0 meters away for Eddystone or 1 meter for AltBeacon, you should get distance estimates of about 0.0 and 1.0, respectively.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants