Class PROMedSRobustRangingAndRssiRadioSourceEstimator2D<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.PROMedSRobustRangingAndRssiRadioSourceEstimator2D<S>
Type Parameters:
S - a RadioSource type.

public class PROMedSRobustRangingAndRssiRadioSourceEstimator2D<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 PROMedS 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_STOP_THRESHOLD

      public static final double DEFAULT_STOP_THRESHOLD
      Default value to be used for stop threshold. Stop threshold can be used to avoid keeping the algorithm unnecessarily iterating in case that best estimated threshold using median of residuals is not small enough. Once a solution is found that generates a threshold below this value, the algorithm will stop. The stop threshold can be used to prevent the LMedS algorithm iterating too many times in cases where samples have a very similar accuracy. For instance, in cases where proportion of outliers is very small (close to 0%), and samples are very accurate (i.e. 1e-6), the algorithm would iterate for a long time trying to find the best solution when indeed there is no need to do that if a reasonable threshold has already been reached. Because of this behaviour the stop threshold can be set to a value much lower than the one typically used in RANSAC, and yet the algorithm could still produce even smaller thresholds in estimated results.
      See Also:
    • MIN_STOP_THRESHOLD

      public static final double MIN_STOP_THRESHOLD
      Minimum allowed stop threshold value.
      See Also:
    • stopThreshold

      private double stopThreshold
      Threshold to be used to keep the algorithm iterating in case that best estimated threshold using median of residuals is not small enough. Once a solution is found that generates a threshold below this value, the algorithm will stop. The stop threshold can be used to prevent the LMedS algorithm iterating too many times in cases where samples have a very similar accuracy. For instance, in cases where proportion of outliers is very small (close to 0%), and samples are very accurate (i.e. 1e-6), the algorithm would iterate for a long time trying to find the best solution when indeed there is no need to do that if a reasonable threshold has already been reached. Because of this behaviour the stop threshold can be set to a value much lower than the one typically used in RANSAC, and yet the algorithm could still produce even smaller thresholds in estimated results.
    • qualityScores

      private double[] qualityScores
      Quality scores corresponding to each provided sample. The larger the score value the better the quality of the sample.
  • Constructor Details

    • PROMedSRobustRangingAndRssiRadioSourceEstimator2D

      public PROMedSRobustRangingAndRssiRadioSourceEstimator2D()
      Constructor.
    • PROMedSRobustRangingAndRssiRadioSourceEstimator2D

      public PROMedSRobustRangingAndRssiRadioSourceEstimator2D(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.
    • PROMedSRobustRangingAndRssiRadioSourceEstimator2D

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

      public PROMedSRobustRangingAndRssiRadioSourceEstimator2D(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.
    • PROMedSRobustRangingAndRssiRadioSourceEstimator2D

      public PROMedSRobustRangingAndRssiRadioSourceEstimator2D(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 access point position.
      Throws:
      IllegalArgumentException - if readings are not valid.
    • PROMedSRobustRangingAndRssiRadioSourceEstimator2D

      public PROMedSRobustRangingAndRssiRadioSourceEstimator2D(com.irurueta.geometry.Point2D initialPosition)
      Constructor.
      Parameters:
      initialPosition - initial position to start the estimation of access point position.
    • PROMedSRobustRangingAndRssiRadioSourceEstimator2D

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

      public PROMedSRobustRangingAndRssiRadioSourceEstimator2D(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.
    • PROMedSRobustRangingAndRssiRadioSourceEstimator2D

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

      public PROMedSRobustRangingAndRssiRadioSourceEstimator2D(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.
    • PROMedSRobustRangingAndRssiRadioSourceEstimator2D

      public PROMedSRobustRangingAndRssiRadioSourceEstimator2D(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.
    • PROMedSRobustRangingAndRssiRadioSourceEstimator2D

      public PROMedSRobustRangingAndRssiRadioSourceEstimator2D(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.
    • PROMedSRobustRangingAndRssiRadioSourceEstimator2D

      public PROMedSRobustRangingAndRssiRadioSourceEstimator2D(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 access point 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.
    • PROMedSRobustRangingAndRssiRadioSourceEstimator2D

      public PROMedSRobustRangingAndRssiRadioSourceEstimator2D(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).
    • PROMedSRobustRangingAndRssiRadioSourceEstimator2D

      public PROMedSRobustRangingAndRssiRadioSourceEstimator2D(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.
    • PROMedSRobustRangingAndRssiRadioSourceEstimator2D

      public PROMedSRobustRangingAndRssiRadioSourceEstimator2D(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 - Wi-Fi 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.
    • PROMedSRobustRangingAndRssiRadioSourceEstimator2D

      public PROMedSRobustRangingAndRssiRadioSourceEstimator2D(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.
    • PROMedSRobustRangingAndRssiRadioSourceEstimator2D

      public PROMedSRobustRangingAndRssiRadioSourceEstimator2D(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.
    • PROMedSRobustRangingAndRssiRadioSourceEstimator2D

      public PROMedSRobustRangingAndRssiRadioSourceEstimator2D(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.
    • PROMedSRobustRangingAndRssiRadioSourceEstimator2D

      public PROMedSRobustRangingAndRssiRadioSourceEstimator2D(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.
    • PROMedSRobustRangingAndRssiRadioSourceEstimator2D

      public PROMedSRobustRangingAndRssiRadioSourceEstimator2D(double[] qualityScores)
      Constructor.
      Parameters:
      qualityScores - quality scores corresponding to each provided sample. The larger the score value the better the quality of the sample.
      Throws:
      IllegalArgumentException - if quality scores is null, or length of quality scores is less than required minimum.
    • PROMedSRobustRangingAndRssiRadioSourceEstimator2D

      public PROMedSRobustRangingAndRssiRadioSourceEstimator2D(double[] qualityScores, List<? extends RangingAndRssiReadingLocated<S,com.irurueta.geometry.Point2D>> readings)
      Constructor. Sets signal readings belonging to the same radio source.
      Parameters:
      qualityScores - quality scores corresponding to each provided sample. The larger the score value the better the quality of the sample.
      readings - signal readings belonging to the same radio source.
      Throws:
      IllegalArgumentException - if readings are not valid, quality scores is null, or length of quality scores is less than required minimum.
    • PROMedSRobustRangingAndRssiRadioSourceEstimator2D

      public PROMedSRobustRangingAndRssiRadioSourceEstimator2D(double[] qualityScores, RobustRangingAndRssiRadioSourceEstimatorListener<S,com.irurueta.geometry.Point2D> listener)
      Constructor.
      Parameters:
      qualityScores - quality scores corresponding to each provided sample. The larger the score value the better the quality of the sample.
      listener - listener in charge of attending events raised by this instance.
      Throws:
      IllegalArgumentException - if quality scores is null, or length of quality scores is less than required minimum.
    • PROMedSRobustRangingAndRssiRadioSourceEstimator2D

      public PROMedSRobustRangingAndRssiRadioSourceEstimator2D(double[] qualityScores, 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:
      qualityScores - quality scores corresponding to each provided sample. The larger the score value the better the quality of the sample.
      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, quality scores is null, or length of quality scores is less than required minimum.
    • PROMedSRobustRangingAndRssiRadioSourceEstimator2D

      public PROMedSRobustRangingAndRssiRadioSourceEstimator2D(double[] qualityScores, 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:
      qualityScores - quality scores corresponding to each provided sample. The larger the score value the better the quality of the sample.
      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, quality scores is null, or length of quality scores is less than required minimum.
    • PROMedSRobustRangingAndRssiRadioSourceEstimator2D

      public PROMedSRobustRangingAndRssiRadioSourceEstimator2D(double[] qualityScores, com.irurueta.geometry.Point2D initialPosition)
      Constructor.
      Parameters:
      qualityScores - quality scores corresponding to each provided sample. The larger the score value the better the quality of the sample.
      initialPosition - initial position to start the estimation of radio source position.
    • PROMedSRobustRangingAndRssiRadioSourceEstimator2D

      public PROMedSRobustRangingAndRssiRadioSourceEstimator2D(double[] qualityScores, com.irurueta.geometry.Point2D initialPosition, RobustRangingAndRssiRadioSourceEstimatorListener<S,com.irurueta.geometry.Point2D> listener)
      Constructor.
      Parameters:
      qualityScores - quality scores corresponding to each provided sample. The larger the score value the better the quality of the sample.
      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 quality scores is null, or length of quality scores is less than required minimum.
    • PROMedSRobustRangingAndRssiRadioSourceEstimator2D

      public PROMedSRobustRangingAndRssiRadioSourceEstimator2D(double[] qualityScores, 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:
      qualityScores - quality scores corresponding to each provided sample. The larger the score value the better the quality of the sample.
      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, quality scores is null, or length of quality scores is less than required minimum.
    • PROMedSRobustRangingAndRssiRadioSourceEstimator2D

      public PROMedSRobustRangingAndRssiRadioSourceEstimator2D(double[] qualityScores, Double initialTransmittedPowerdBm)
      Constructor.
      Parameters:
      qualityScores - quality scores corresponding to each provided sample. The larger the score value the better the quality of the sample.
      initialTransmittedPowerdBm - initial transmitted power to start the estimation of radio source transmitted power (expressed in dBm's)
      Throws:
      IllegalArgumentException - if quality scores is null, or length of quality scores is less than required minimum.
    • PROMedSRobustRangingAndRssiRadioSourceEstimator2D

      public PROMedSRobustRangingAndRssiRadioSourceEstimator2D(double[] qualityScores, List<? extends RangingAndRssiReadingLocated<S,com.irurueta.geometry.Point2D>> readings, Double initialTransmittedPowerdBm)
      Constructor. Sets signal readings belonging to the same radio source.
      Parameters:
      qualityScores - quality scores corresponding to each provided sample. The larger the score value the better the quality of the sample.
      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, quality scores is null, or length of quality scores is less than required minimum.
    • PROMedSRobustRangingAndRssiRadioSourceEstimator2D

      public PROMedSRobustRangingAndRssiRadioSourceEstimator2D(double[] qualityScores, Double initialTransmittedPowerdBm, RobustRangingAndRssiRadioSourceEstimatorListener<S,com.irurueta.geometry.Point2D> listener)
      Constructor.
      Parameters:
      qualityScores - quality scores corresponding to each provided sample. The larger the score value the better the quality of the sample.
      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 quality scores is null, or length of quality scores is less than required minimum.
    • PROMedSRobustRangingAndRssiRadioSourceEstimator2D

      public PROMedSRobustRangingAndRssiRadioSourceEstimator2D(double[] qualityScores, 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:
      qualityScores - quality scores corresponding to each provided sample. The larger the score value the better the quality of the sample.
      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, quality scores is null, or length of quality scores is less than required minimum.
    • PROMedSRobustRangingAndRssiRadioSourceEstimator2D

      public PROMedSRobustRangingAndRssiRadioSourceEstimator2D(double[] qualityScores, 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:
      qualityScores - quality scores corresponding to each provided sample. The larger the score value the better the quality of the sample.
      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, quality scores is null, or length of quality scores is less than required minimum.
    • PROMedSRobustRangingAndRssiRadioSourceEstimator2D

      public PROMedSRobustRangingAndRssiRadioSourceEstimator2D(double[] qualityScores, com.irurueta.geometry.Point2D initialPosition, Double initialTransmittedPowerdBm)
      Constructor.
      Parameters:
      qualityScores - quality scores corresponding to each provided sample. The larger the score value the better the quality of the sample.
      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 quality scores is null, or length of quality scores is less than required minimum.
    • PROMedSRobustRangingAndRssiRadioSourceEstimator2D

      public PROMedSRobustRangingAndRssiRadioSourceEstimator2D(double[] qualityScores, com.irurueta.geometry.Point2D initialPosition, Double initialTransmittedPowerdBm, RobustRangingAndRssiRadioSourceEstimatorListener<S,com.irurueta.geometry.Point2D> listener)
      Constructor.
      Parameters:
      qualityScores - quality scores corresponding to each provided sample. The larger the score value the better the quality of the sample.
      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.
      Throws:
      IllegalArgumentException - if quality scores is null, or length of quality scores is less than required minimum.
    • PROMedSRobustRangingAndRssiRadioSourceEstimator2D

      public PROMedSRobustRangingAndRssiRadioSourceEstimator2D(double[] qualityScores, 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:
      qualityScores - quality scores corresponding to each provided sample. The larger the score value the better the quality of the sample.
      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, quality scores is null, or length of quality scores is less than required minimum.
    • PROMedSRobustRangingAndRssiRadioSourceEstimator2D

      public PROMedSRobustRangingAndRssiRadioSourceEstimator2D(double[] qualityScores, 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:
      qualityScores - quality scores corresponding to each provided sample. The larger the score value the better the quality of the sample.
      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, quality scores is null, or length of quality scores is less than required minimum.
    • PROMedSRobustRangingAndRssiRadioSourceEstimator2D

      public PROMedSRobustRangingAndRssiRadioSourceEstimator2D(double[] qualityScores, com.irurueta.geometry.Point2D initialPosition, Double initialTransmittedPowerdBm, double initialPathLossExponent)
      Constructor.
      Parameters:
      qualityScores - quality scores corresponding to each provided sample. The larger the score value the better the quality of the sample.
      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.
    • PROMedSRobustRangingAndRssiRadioSourceEstimator2D

      public PROMedSRobustRangingAndRssiRadioSourceEstimator2D(double[] qualityScores, com.irurueta.geometry.Point2D initialPosition, Double initialTransmittedPowerdBm, double initialPathLossExponent, RobustRangingAndRssiRadioSourceEstimatorListener<S,com.irurueta.geometry.Point2D> listener)
      Constructor.
      Parameters:
      qualityScores - quality scores corresponding to each provided sample. The larger the score value the better the quality of the sample.
      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.
    • PROMedSRobustRangingAndRssiRadioSourceEstimator2D

      public PROMedSRobustRangingAndRssiRadioSourceEstimator2D(double[] qualityScores, 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:
      qualityScores - quality scores corresponding to each provided sample. The larger the score value the better the quality of the sample.
      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, quality scores is null, or length of quality scores is less than required minimum.
  • Method Details

    • getStopThreshold

      public double getStopThreshold()
      Returns threshold to be used to keep the algorithm iterating in case that best estimated threshold using median of residuals is not small enough. Once a solution is found that generates a threshold below this value, the algorithm will stop. The stop threshold can be used to prevent the LMedS algorithm to iterate too many times in cases where samples have a very similar accuracy. For instance, in cases where proportion of outliers is very small (close to 0%), and samples are very accurate (i.e. 1e-6), the algorithm would iterate for a long time trying to find the best solution when indeed there is no need to do that if a reasonable threshold has already been reached. Because of this behaviour the stop threshold can be set to a value much lower than the one typically used in RANSAC, and yet the algorithm could still produce even smaller thresholds in estimated results.
      Returns:
      stop threshold to stop the algorithm prematurely when a certain accuracy has been reached.
    • setStopThreshold

      public void setStopThreshold(double stopThreshold) throws com.irurueta.navigation.LockedException
      Sets threshold to be used to keep the algorithm iterating in case that best estimated threshold using median of residuals is not small enough. Once a solution is found that generates a threshold below this value, the algorithm will stop. The stop threshold can be used to prevent the LMedS algorithm to iterate too many times in cases where samples have a very similar accuracy. For instance, in cases where proportion of outliers is very small (close to 0%), and samples are very accurate (i.e. 1e-6), the algorithm would iterate for a long time trying to find the best solution when indeed there is no need to do that if a reasonable threshold has already been reached. Because of this behaviour the stop threshold can be set to a value much lower than the one typically used in RANSAC, and yet the algorithm could still produce even smaller thresholds in estimated results.
      Parameters:
      stopThreshold - stop threshold to stop the algorithm prematurely when a certain accuracy has been reached.
      Throws:
      IllegalArgumentException - if provided value is zero or negative.
      com.irurueta.navigation.LockedException - if this solver is locked.
    • getQualityScores

      public double[] getQualityScores()
      Returns quality scores corresponding to each pair of positions and distances (i.e. sample). The larger the score value the better the quality of the sample. This implementation always returns null. Subclasses using quality scores must implement proper behavior.
      Overrides:
      getQualityScores in class RobustRadioSourceEstimator<com.irurueta.geometry.Point2D,RangingAndRssiReadingLocated<S extends RadioSource,com.irurueta.geometry.Point2D>,RobustRangingAndRssiRadioSourceEstimatorListener<S extends RadioSource,com.irurueta.geometry.Point2D>>
      Returns:
      quality scores corresponding to each sample.
    • setQualityScores

      public void setQualityScores(double[] qualityScores) throws com.irurueta.navigation.LockedException
      Sets quality scores corresponding to each pair of positions and distances (i.e. sample). The larger the score value the better the quality of the sample. This implementation makes no action. Subclasses using quality scores must implement proper behaviour.
      Overrides:
      setQualityScores in class RobustRadioSourceEstimator<com.irurueta.geometry.Point2D,RangingAndRssiReadingLocated<S extends RadioSource,com.irurueta.geometry.Point2D>,RobustRangingAndRssiRadioSourceEstimatorListener<S extends RadioSource,com.irurueta.geometry.Point2D>>
      Parameters:
      qualityScores - quality scores corresponding to each pair of matched points.
      Throws:
      IllegalArgumentException - if provided quality scores length is smaller than minimum required samples.
      com.irurueta.navigation.LockedException - if robust solver is locked because an estimation is already in progress.
    • isReady

      public boolean isReady()
      Indicates whether solver is ready to find a solution.
      Overrides:
      isReady in class RobustRangingAndRssiRadioSourceEstimator<S extends RadioSource,com.irurueta.geometry.Point2D>
      Returns:
      true if solver is ready, false otherwise.
    • 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.
    • internalSetQualityScores

      private void internalSetQualityScores(double[] qualityScores)
      Sets quality scores corresponding to each provided sample. This method is used internally and does not check whether instance is locked or not.
      Parameters:
      qualityScores - quality scores to be set.
      Throws:
      IllegalArgumentException - if provided quality scores length is smaller than 3 samples.