sandeepmistry / node-eddystone-beacon-scanner

Scan for Eddystone beacons using Node.js
MIT License
104 stars 30 forks source link

Units for Distance? #14

Closed josephliccini closed 8 years ago

josephliccini commented 8 years ago

Hi, we are using the 'Distance' from Eddystone URL to do some calculations, and we were wondering what units are used?

We though in Meters, but it didn't seem to be the case.

sandeepmistry commented 8 years ago

@josephliccini I believe it's in meters. @christopherdro can confirm. Maybe the beacon is not calibrated correctly for the Calibrated Tx power at 0 m is incorrect?

christopherdro commented 8 years ago

The calculation should be in meters. The distance filter being used in this library was taken straight out of the android project on the eddystone repo. See: https://github.com/google/eddystone/blob/3925ce40925273090e60760425cbce490fc510b4/tools/eddystone-validator/EddystoneValidator/app/src/main/java/com/google/sample/eddystonevalidator/BeaconArrayAdapter.java#L58-L61

josephliccini commented 8 years ago

Thanks guys!

Just to clarify, this will only produce correct values if the tx power is set to 0dBm? One of our beacons is set to +5 dBm for extended range:

20160410_165340000_ios

ukBaz commented 8 years ago

Hello @josephliccini ,

the formula will be accurate at a range of transmit powers. The specification for Eddystone URL is that the advert will contain the tx power measured at 0 meters. This is different from the iBeacon spec I believe where the advert contains the measured tx value at 1m. If the correct value is not being put in the advert then the result will be out is the point I think @sandeepmistry was making. There is more information on the formula in this paper with sections 2.1, 3.1.4 & 3.1.5 being probably the most relevant. However accuracy is a tricky thing with RSSI as it will fluctuate quite a bit especially as the signal gets weaker. The accuracy of RSSI for location is discussed in this article.

I hope something in that was useful.

sandeepmistry commented 8 years ago

@ukBaz @christopherdro thanks!

@josephliccini even though you've set the TX power to 5 dBm the beacon might not be updated the Calibrated Tx power at 0 m appropriately throwing off calculations.

I'm closing this for now, because as @christopherdro pointed out the exact same formula is used in the Eddystone beacon validator app. @josephliccini I suggest you try this app as well and compare to this module.