Package 

Class CurveFittedDistanceCalculator

  • All Implemented Interfaces:
    org.altbeacon.beacon.distance.DistanceCalculator

    
    public class CurveFittedDistanceCalculator
     implements DistanceCalculator
                        

    This class estimates the distance between the mobile device and a BLE beacon based on the measured RSSI and a txPower calibration value that represents the expected RSSI for an iPhone 5 receiving the signal when it is 1 meter away. This class uses a best-fit curve equation with configurable coefficients. The coefficients must be supplied by the caller and are specific to the Android device being used. See the ModelSpecificDistanceCalculator for more information on the coefficients. Created by dyoung on 8/28/14.

    • Field Summary

      Fields 
      Modifier and Type Field Description
      public final static String TAG
    • Constructor Summary

      Constructors 
      Constructor Description
      CurveFittedDistanceCalculator(double coefficient1, double coefficient2, double coefficient3) Construct a calculator with coefficients specific for the device's signal vs.
    • Method Summary

      Modifier and Type Method Description
      double calculateDistance(int txPower, double rssi) Calculated the estimated distance in meters to the beacon based on a reference rssi at 1m and the known actual rssi at the current location
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • CurveFittedDistanceCalculator

        CurveFittedDistanceCalculator(double coefficient1, double coefficient2, double coefficient3)
        Construct a calculator with coefficients specific for the device's signal vs.
    • Method Detail

      • calculateDistance

         double calculateDistance(int txPower, double rssi)

        Calculated the estimated distance in meters to the beacon based on a reference rssi at 1m and the known actual rssi at the current location