Class RANSACRobustRangingAndRssiRadioSourceEstimator2D<S extends RadioSource>

java.lang.Object
com.irurueta.navigation.indoor.radiosource.RobustRadioSourceEstimator<com.irurueta.geometry.Point2D,RangingAndRssiReadingLocated<S,com.irurueta.geometry.Point2D>,RobustRangingAndRssiRadioSourceEstimatorListener<S,com.irurueta.geometry.Point2D>>
com.irurueta.navigation.indoor.radiosource.RobustRangingAndRssiRadioSourceEstimator<S,com.irurueta.geometry.Point2D>
com.irurueta.navigation.indoor.radiosource.RobustRangingAndRssiRadioSourceEstimator2D<S>
com.irurueta.navigation.indoor.radiosource.RANSACRobustRangingAndRssiRadioSourceEstimator2D<S>
Type Parameters:
S - a RadioSource type.

public class RANSACRobustRangingAndRssiRadioSourceEstimator2D<S extends RadioSource> extends RobustRangingAndRssiRadioSourceEstimator2D<S>
Robustly estimate 2D position, transmitted power and path-loss exponent of a radio source (e.g. Wi-Fi access point or bluetooth beacon), by discarding outliers using PROSAC algorithm and assuming that the ranging data is available to obtain position with greater accuracy and that the radio source emits isotropically following the expression below: Pr = Pt*Gt*Gr*lambda^2 / (4*pi*d)^2, where Pr is the received power (expressed in mW), Gt is the Gain of the transmission antenna Gr is the Gain of the receiver antenna d is the distance between emitter and receiver and lambda is the wavelength and is equal to: lambda = c / f, where c is the speed of light and f is the carrier frequency of the radio signal. Because usually information about the antenna of the radio source cannot be retrieved (because many measurements are made on unknown devices where physical access is not possible), this implementation will estimate the equivalent transmitted power as: Pte = Pt * Gt * Gr. If Readings contain RSSI standard deviations, those values will be used, otherwise it will be assumed an RSSI standard deviation of 1 dB.
  • Field Details

    • DEFAULT_THRESHOLD

      public static final double DEFAULT_THRESHOLD
      Constant defining default threshold on received power (RSSI) expressed in dBm's.
      See Also:
    • MIN_THRESHOLD

      public static final double MIN_THRESHOLD
      Minimum value that can be set as threshold. Threshold must be strictly greater than 0.0.s
      See Also:
    • DEFAULT_COMPUTE_AND_KEEP_INLIERS

      public static final boolean DEFAULT_COMPUTE_AND_KEEP_INLIERS
      Indicates that by default inliers will only be computed but not kept.
      See Also:
    • DEFAULT_COMPUTE_AND_KEEP_RESIDUALS

      public static final boolean DEFAULT_COMPUTE_AND_KEEP_RESIDUALS
      Indicates that by default residuals will only be computed but not kept.
      See Also:
    • threshold

      private double threshold
      Threshold to determine whether samples are inliers or not when testing possible solutions. The threshold refers to the amount of error on received power (RSSI) expressed in dBm's between received value that should have been received on estimated iso-tropical model and actual measured value.
    • computeAndKeepInliers

      private boolean computeAndKeepInliers
      Indicates whether inliers must be computed and kept.
    • computeAndKeepResiduals

      private boolean computeAndKeepResiduals
      Indicates whether residuals must be computed and kept.
  • Constructor Details

    • RANSACRobustRangingAndRssiRadioSourceEstimator2D

      public RANSACRobustRangingAndRssiRadioSourceEstimator2D()
      Constructor.
    • RANSACRobustRangingAndRssiRadioSourceEstimator2D

      public RANSACRobustRangingAndRssiRadioSourceEstimator2D(List<? extends RangingAndRssiReadingLocated<S,com.irurueta.geometry.Point2D>> readings)
      Constructor. Sets signal readings belonging to the same radio source.
      Parameters:
      readings - signal readings belonging to the same radio source.
      Throws:
      IllegalArgumentException - if readings are not valid.
    • RANSACRobustRangingAndRssiRadioSourceEstimator2D

      public RANSACRobustRangingAndRssiRadioSourceEstimator2D(RobustRangingAndRssiRadioSourceEstimatorListener<S,com.irurueta.geometry.Point2D> listener)
      Constructor.
      Parameters:
      listener - listener in charge of attending events raised by this instance.
    • RANSACRobustRangingAndRssiRadioSourceEstimator2D

      public RANSACRobustRangingAndRssiRadioSourceEstimator2D(List<? extends RangingAndRssiReadingLocated<S,com.irurueta.geometry.Point2D>> readings, RobustRangingAndRssiRadioSourceEstimatorListener<S,com.irurueta.geometry.Point2D> listener)
      Constructor. Sets signal readings belonging to the same radio source.
      Parameters:
      readings - signal readings belonging to the same radio source.
      listener - listener in charge of attending events raised by this instance.
      Throws:
      IllegalArgumentException - if readings are not valid.
    • RANSACRobustRangingAndRssiRadioSourceEstimator2D

      public RANSACRobustRangingAndRssiRadioSourceEstimator2D(List<? extends RangingAndRssiReadingLocated<S,com.irurueta.geometry.Point2D>> readings, com.irurueta.geometry.Point2D initialPosition)
      Constructor. Sets signal readings belonging to the same radio source.
      Parameters:
      readings - signal readings belonging to the same radio source.
      initialPosition - initial position to start the estimation of radio source position.
      Throws:
      IllegalArgumentException - if readings are not valid.
    • RANSACRobustRangingAndRssiRadioSourceEstimator2D

      public RANSACRobustRangingAndRssiRadioSourceEstimator2D(com.irurueta.geometry.Point2D initialPosition)
      Constructor.
      Parameters:
      initialPosition - initial position to start the estimation of radio source position.
    • RANSACRobustRangingAndRssiRadioSourceEstimator2D

      public RANSACRobustRangingAndRssiRadioSourceEstimator2D(com.irurueta.geometry.Point2D initialPosition, RobustRangingAndRssiRadioSourceEstimatorListener<S,com.irurueta.geometry.Point2D> listener)
      Constructor.
      Parameters:
      initialPosition - initial position to start the estimation of radio source position.
      listener - listener in charge of attending events raised by this instance.
    • RANSACRobustRangingAndRssiRadioSourceEstimator2D

      public RANSACRobustRangingAndRssiRadioSourceEstimator2D(List<? extends RangingAndRssiReadingLocated<S,com.irurueta.geometry.Point2D>> readings, com.irurueta.geometry.Point2D initialPosition, RobustRangingAndRssiRadioSourceEstimatorListener<S,com.irurueta.geometry.Point2D> listener)
      Constructor. Sets signal readings belonging to the same radio source.
      Parameters:
      readings - signal readings belonging to the same radio source.
      initialPosition - initial position to start the estimation of radio source position.
      listener - listener in charge of attending events raised by this instance.
      Throws:
      IllegalArgumentException - if readings are not valid.
    • RANSACRobustRangingAndRssiRadioSourceEstimator2D

      public RANSACRobustRangingAndRssiRadioSourceEstimator2D(Double initialTransmittedPowerdBm)
      Constructor.
      Parameters:
      initialTransmittedPowerdBm - initial transmitted power to start the estimation of radio source transmitted power (expressed in dBm's)
    • RANSACRobustRangingAndRssiRadioSourceEstimator2D

      public RANSACRobustRangingAndRssiRadioSourceEstimator2D(List<? extends RangingAndRssiReadingLocated<S,com.irurueta.geometry.Point2D>> readings, Double initialTransmittedPowerdBm)
      Constructor. Sets signal readings belonging to the same radio source.
      Parameters:
      readings - signal readings belonging to the same radio source.
      initialTransmittedPowerdBm - initial transmitted power to start the estimation of radio source transmitted power (expressed in dBm's)
      Throws:
      IllegalArgumentException - if readings are not valid.
    • RANSACRobustRangingAndRssiRadioSourceEstimator2D

      public RANSACRobustRangingAndRssiRadioSourceEstimator2D(Double initialTransmittedPowerdBm, RobustRangingAndRssiRadioSourceEstimatorListener<S,com.irurueta.geometry.Point2D> listener)
      Constructor.
      Parameters:
      initialTransmittedPowerdBm - initial transmitted power to start the estimation of radio source transmitted power (expressed in dBm's)
      listener - listener in charge of attending events raised by this instance.
    • RANSACRobustRangingAndRssiRadioSourceEstimator2D

      public RANSACRobustRangingAndRssiRadioSourceEstimator2D(List<? extends RangingAndRssiReadingLocated<S,com.irurueta.geometry.Point2D>> readings, Double initialTransmittedPowerdBm, RobustRangingAndRssiRadioSourceEstimatorListener<S,com.irurueta.geometry.Point2D> listener)
      Constructor. Sets signal readings belonging to the same radio source.
      Parameters:
      readings - signal readings belonging to the same radio source.
      initialTransmittedPowerdBm - initial transmitted power to start the estimation of radio source transmitted power (expressed in dBm's)
      listener - listener in charge of attending events raised by this instance.
      Throws:
      IllegalArgumentException - if readings are not valid.
    • RANSACRobustRangingAndRssiRadioSourceEstimator2D

      public RANSACRobustRangingAndRssiRadioSourceEstimator2D(List<? extends RangingAndRssiReadingLocated<S,com.irurueta.geometry.Point2D>> readings, com.irurueta.geometry.Point2D initialPosition, Double initialTransmittedPowerdBm)
      Constructor. Sets signal readings belonging to the same radio source.
      Parameters:
      readings - signal readings belonging to the same radio source.
      initialPosition - initial position to start the estimation of radio source position.
      initialTransmittedPowerdBm - initial transmitted power to start the estimation of radio source transmitted power (expressed in dBm's).
      Throws:
      IllegalArgumentException - if readings are not valid.
    • RANSACRobustRangingAndRssiRadioSourceEstimator2D

      public RANSACRobustRangingAndRssiRadioSourceEstimator2D(com.irurueta.geometry.Point2D initialPosition, Double initialTransmittedPowerdBm)
      Constructor.
      Parameters:
      initialPosition - initial position to start the estimation of radio source position.
      initialTransmittedPowerdBm - initial transmitted power to start the estimation of radio source transmitted power (expressed in dBm's).
    • RANSACRobustRangingAndRssiRadioSourceEstimator2D

      public RANSACRobustRangingAndRssiRadioSourceEstimator2D(com.irurueta.geometry.Point2D initialPosition, Double initialTransmittedPowerdBm, RobustRangingAndRssiRadioSourceEstimatorListener<S,com.irurueta.geometry.Point2D> listener)
      Constructor.
      Parameters:
      initialPosition - initial position to start the estimation of radio source position.
      initialTransmittedPowerdBm - initial transmitted power to start the estimation of radio source transmitted power (expressed in dBm's).
      listener - in charge of attending events raised by this instance.
    • RANSACRobustRangingAndRssiRadioSourceEstimator2D

      public RANSACRobustRangingAndRssiRadioSourceEstimator2D(List<? extends RangingAndRssiReadingLocated<S,com.irurueta.geometry.Point2D>> readings, com.irurueta.geometry.Point2D initialPosition, Double initialTransmittedPowerdBm, RobustRangingAndRssiRadioSourceEstimatorListener<S,com.irurueta.geometry.Point2D> listener)
      Constructor. Sets signal readings belonging to the same radio source.
      Parameters:
      readings - signal readings belonging to the same radio source.
      initialPosition - initial position to start the estimation of radio source position.
      initialTransmittedPowerdBm - initial transmitted power to start the estimation of radio source transmitted power (expressed in dBm's).
      listener - listener in charge of attending events raised by this instance.
      Throws:
      IllegalArgumentException - if readings are not valid.
    • RANSACRobustRangingAndRssiRadioSourceEstimator2D

      public RANSACRobustRangingAndRssiRadioSourceEstimator2D(List<? extends RangingAndRssiReadingLocated<S,com.irurueta.geometry.Point2D>> readings, com.irurueta.geometry.Point2D initialPosition, Double initialTransmittedPowerdBm, double initialPathLossExponent)
      Constructor. Sets signal readings belonging to the same radio source.
      Parameters:
      readings - signal readings belonging to the same radio source.
      initialPosition - initial position to start the estimation of radio source position.
      initialTransmittedPowerdBm - initial transmitted power to start the estimation of radio source transmitted power (expressed in dBm's).
      initialPathLossExponent - initial path loss exponent. A typical value is 2.0.
      Throws:
      IllegalArgumentException - if readings are not valid.
    • RANSACRobustRangingAndRssiRadioSourceEstimator2D

      public RANSACRobustRangingAndRssiRadioSourceEstimator2D(com.irurueta.geometry.Point2D initialPosition, Double initialTransmittedPowerdBm, double initialPathLossExponent)
      Constructor.
      Parameters:
      initialPosition - initial position to start the estimation of radio source position.
      initialTransmittedPowerdBm - initial transmitted power to start the estimation of radio source transmitted power (expressed in dBm's).
      initialPathLossExponent - initial path loss exponent. A typical value is 2.0.
    • RANSACRobustRangingAndRssiRadioSourceEstimator2D

      public RANSACRobustRangingAndRssiRadioSourceEstimator2D(com.irurueta.geometry.Point2D initialPosition, Double initialTransmittedPowerdBm, double initialPathLossExponent, RobustRangingAndRssiRadioSourceEstimatorListener<S,com.irurueta.geometry.Point2D> listener)
      Constructor.
      Parameters:
      initialPosition - initial position to start the estimation of radio source position.
      initialTransmittedPowerdBm - initial transmitted power to start the estimation of radio source transmitted power (expressed in dBm's).
      initialPathLossExponent - initial path loss exponent. A typical value is 2.0.
      listener - listener in charge of attending events raised by this instance.
    • RANSACRobustRangingAndRssiRadioSourceEstimator2D

      public RANSACRobustRangingAndRssiRadioSourceEstimator2D(List<? extends RangingAndRssiReadingLocated<S,com.irurueta.geometry.Point2D>> readings, com.irurueta.geometry.Point2D initialPosition, Double initialTransmittedPowerdBm, double initialPathLossExponent, RobustRangingAndRssiRadioSourceEstimatorListener<S,com.irurueta.geometry.Point2D> listener)
      Constructor. Sets signal readings belonging to the same radio source.
      Parameters:
      readings - signal readings belonging to the same radio source.
      initialPosition - initial position to start the estimation of radio source position.
      initialTransmittedPowerdBm - initial transmitted power to start the estimation of radio source transmitted power (expressed in dBm's).
      initialPathLossExponent - initial path loss exponent. A typical value is 2.0.
      listener - listener in charge of attending events raised by this instance.
      Throws:
      IllegalArgumentException - if readings are not valid.
  • Method Details

    • getThreshold

      public double getThreshold()
      Gets threshold to determine whether samples are inliers or not when testing possible solutions. The threshold refers to the amount of error on received power (RSSI) expressed in dBm's between received value that should have been received on estimated iso-tropical model and actual measured value.
      Returns:
      threshold to determine whether samples are inliers or not.
    • setThreshold

      public void setThreshold(double threshold) throws com.irurueta.navigation.LockedException
      Sets threshold to determine whether samples are inliers or not when testing possible solutions. The threshold refers to the amount of error on received power (RSSI) expressed in dBm's between received value that should have been received on estimated iso-tropical model and actual measured value.
      Parameters:
      threshold - threshold to determine whether samples are inliers or not.
      Throws:
      IllegalArgumentException - if provided value is equal or less than zero.
      com.irurueta.navigation.LockedException - if this estimator is locked.
    • isComputeAndKeepInliersEnabled

      public boolean isComputeAndKeepInliersEnabled()
      Indicates whether inliers must be computed and kept.
      Returns:
      true if inliers must be computed and kept, false if inliers only need to be computed but not kept.
    • setComputeAndKeepInliersEnabled

      public void setComputeAndKeepInliersEnabled(boolean computeAndKeepInliers) throws com.irurueta.navigation.LockedException
      Specifies whether inliers must be computed and kept.
      Parameters:
      computeAndKeepInliers - true if inliers must be computed and kept, false if inliers only need to be computed but not kept.
      Throws:
      com.irurueta.navigation.LockedException - if this solver is locked.
    • isComputeAndKeepResidualsEnabled

      public boolean isComputeAndKeepResidualsEnabled()
      Indicates whether residuals must be computed and kept.
      Returns:
      true if residuals must be computed and kept, false if residuals only need to be computed but not kept.
    • setComputeAndKeepResidualsEnabled

      public void setComputeAndKeepResidualsEnabled(boolean computeAndKeepResiduals) throws com.irurueta.navigation.LockedException
      Specifies whether residuals must be computed and kept.
      Parameters:
      computeAndKeepResiduals - true if residuals must be computed and kept, false if residuals only need to be computed but not kept.
      Throws:
      com.irurueta.navigation.LockedException - if this solver is locked.
    • estimate

      public void estimate() throws com.irurueta.navigation.LockedException, com.irurueta.navigation.NotReadyException, com.irurueta.numerical.robust.RobustEstimatorException
      Robustly estimates position, transmitted power and path-loss exponent for a radio source.
      Specified by:
      estimate in class RobustRadioSourceEstimator<com.irurueta.geometry.Point2D,RangingAndRssiReadingLocated<S extends RadioSource,com.irurueta.geometry.Point2D>,RobustRangingAndRssiRadioSourceEstimatorListener<S extends RadioSource,com.irurueta.geometry.Point2D>>
      Throws:
      com.irurueta.navigation.LockedException - if instance is busy during estimation.
      com.irurueta.navigation.NotReadyException - if estimator is not ready.
      com.irurueta.numerical.robust.RobustEstimatorException - if estimation fails for any reason (i.e. numerical instability, no solution available, etc).
    • getMethod

      public com.irurueta.numerical.robust.RobustEstimatorMethod getMethod()
      Returns method being used for robust estimation.
      Specified by:
      getMethod in class RobustRangingAndRssiRadioSourceEstimator<S extends RadioSource,com.irurueta.geometry.Point2D>
      Returns:
      method being used for robust estimation.