Class SequentialRobustRangingAndRssiRadioSourceEstimator<S extends RadioSource,P extends com.irurueta.geometry.Point<P>>

java.lang.Object
com.irurueta.navigation.indoor.radiosource.SequentialRobustRangingAndRssiRadioSourceEstimator<S,P>
Type Parameters:
S - a RadioSource type.
P - a Point type.
Direct Known Subclasses:
SequentialRobustRangingAndRssiRadioSourceEstimator2D, SequentialRobustRangingAndRssiRadioSourceEstimator3D

public abstract class SequentialRobustRangingAndRssiRadioSourceEstimator<S extends RadioSource,P extends com.irurueta.geometry.Point<P>> extends Object
This is an abstract class to robustly estimate position, transmitted power and path-loss exponent of a radio source (e.g. Wi-Fi access point or bluetooth beacon), by discarding outliers 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.

Implementations of this class sequentially estimate position and then remaining parameters. First ranging data is used to robustly estimate position and then remaining parameters are robustly estimated using former estimated position as an initial guess.

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.

Implementations of this class might produce more stable positions of estimated radio sources than implementations of RobustRangingAndRssiRadioSourceEstimator.

  • Field Details

    • DEFAULT_PANGING_ROBUST_METHOD

      public static final com.irurueta.numerical.robust.RobustEstimatorMethod DEFAULT_PANGING_ROBUST_METHOD
      Default robust estimator method for robust position estimation using ranging data when no robust method is provided.
    • DEFAULT_RSSI_ROBUST_METHOD

      public static final com.irurueta.numerical.robust.RobustEstimatorMethod DEFAULT_RSSI_ROBUST_METHOD
      Default robust estimator method for path-loss exponent and transmitted power estimation using RSSI data when no robust method is provided.
    • DEFAULT_REFINE_RESULT

      public static final boolean DEFAULT_REFINE_RESULT
      Indicates that result is refined by default using all found inliers.
      See Also:
    • DEFAULT_KEEP_COVARIANCE

      public static final boolean DEFAULT_KEEP_COVARIANCE
      Indicates that covariance is kept by default after refining result.
      See Also:
    • DEFAULT_PROGRESS_DELTA

      public static final float DEFAULT_PROGRESS_DELTA
      Default amount of progress variation before notifying a change in estimation progress. By default, this is set to 5%.
      See Also:
    • MIN_PROGRESS_DELTA

      public static final float MIN_PROGRESS_DELTA
      Minimum allowed value for progress delta.
      See Also:
    • MAX_PROGRESS_DELTA

      public static final float MAX_PROGRESS_DELTA
      Maximum allowed value for progress delta.
      See Also:
    • DEFAULT_CONFIDENCE

      public static final double DEFAULT_CONFIDENCE
      Constant defining default confidence of the estimated result, which is 99%. This means that with a probability of 99% estimation will be accurate because chosen sub-samples will be inliers.
      See Also:
    • DEFAULT_MAX_ITERATIONS

      public static final int DEFAULT_MAX_ITERATIONS
      Default maximum allowed number of iterations.
      See Also:
    • MIN_CONFIDENCE

      public static final double MIN_CONFIDENCE
      Minimum allowed confidence value.
      See Also:
    • MAX_CONFIDENCE

      public static final double MAX_CONFIDENCE
      Maximum allowed confidence value.
      See Also:
    • MIN_ITERATIONS

      public static final int MIN_ITERATIONS
      Minimum allowed number of iterations.
      See Also:
    • DEFAULT_USE_READING_POSITION_COVARIANCES

      public static final boolean DEFAULT_USE_READING_POSITION_COVARIANCES
      Indicates that by default position covariances of readings must be taken into account to increase the amount of standard deviation of each ranging measure by the amount of position standard deviation assuming that both measures are statistically independent.
      See Also:
    • rangingEstimator

      protected RobustRangingRadioSourceEstimator<S extends RadioSource,P extends com.irurueta.geometry.Point<P>> rangingEstimator
      Internal robust estimator for position estimation.
    • rssiEstimator

      protected RobustRssiRadioSourceEstimator<S extends RadioSource,P extends com.irurueta.geometry.Point<P>> rssiEstimator
      Internal robust estimator for path-loss exponent and transmitted power estimation.
    • rangingRobustMethod

      protected com.irurueta.numerical.robust.RobustEstimatorMethod rangingRobustMethod
      Robust method used for robust position estimation using ranging data.
    • rssiRobustMethod

      protected com.irurueta.numerical.robust.RobustEstimatorMethod rssiRobustMethod
      Robust method used for path-loss exponent and transmitted power estimation using RSSI data.
    • rangingPreliminarySubsetSize

      protected int rangingPreliminarySubsetSize
      Size of subsets to be checked during ranging robust estimation.
    • rssiPreliminarySubsetSize

      protected int rssiPreliminarySubsetSize
      Size of subsets to be checked during RSSI robust estimation.
    • rangingThreshold

      protected Double rangingThreshold
      Threshold to determine when samples are inliers or not used during robust position estimation. If not defined, default threshold will be used.
    • rssiThreshold

      protected Double rssiThreshold
      Threshold to determine when samples are inliers or not used during robust path-loss exponent and transmitted power estimation.
    • readings

      private List<? extends RangingAndRssiReadingLocated<S extends RadioSource,P extends com.irurueta.geometry.Point<P>>> readings
      Signal readings belonging to the same radio source to be estimated.
    • qualityScores

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

      private SequentialRobustRangingAndRssiRadioSourceEstimatorListener<S extends RadioSource,P extends com.irurueta.geometry.Point<P>> listener
      Listener to be notified of events such as when estimation starts, ends or its progress significantly changes.
    • estimatedPosition

      private P extends com.irurueta.geometry.Point<P> estimatedPosition
      Estimated position.
    • locked

      private boolean locked
      Indicates if this instance is locked because estimation is being executed.
    • progressDelta

      private float progressDelta
      Amount of progress variation before notifying a progress change during estimation.
    • rangingConfidence

      private double rangingConfidence
      Amount of confidence expressed as a value between 0.0 and 1.0 (which is equivalent to 100%) for robust position estimation. The amount of confidence indicates the probability that the estimated result is correct. Usually this value will be close to 1.0, but not exactly 1.0.
    • rssiConfidence

      private double rssiConfidence
      Amount of confidence expressed as a value between 0.0 and 1.0 (which is equivalent to 100%) for robust path-loss exponent and transmitted power estimation. The amount of confidence indicates the probability that the estimated result is correct. Usually this value will be close to 1.0, but not exactly 1.0.
    • rangingMaxIterations

      private int rangingMaxIterations
      Maximum allowed number of iterations for robust position estimation. When the maximum number of iterations is exceeded, an approximate result might be available for retrieval.
    • rssiMaxIterations

      private int rssiMaxIterations
      Maximum allowed number of iterations for robust path-loss exponent and transmitted power estimation. When the maximum number of iterations is exceeded, an approximate result might be available for retrieval.
    • refineResult

      private boolean refineResult
      Indicates whether result must be refined using found inliers. If true, inliers will be computed and kept in any implementation regardless of the settings.
    • keepCovariance

      private boolean keepCovariance
      Indicates whether covariance must be kept after refining result. This setting is only taken into account if result is refined.
    • covariance

      private com.irurueta.algebra.Matrix covariance
      Covariance of estimated position, power and/or path-loss exponent. This is only available when result has been refined and covariance is kept.
    • estimatedPositionCovariance

      private com.irurueta.algebra.Matrix estimatedPositionCovariance
      Covariance of estimated position. Size of this matrix will depend on the number of dimensions of estimated position (either 2 or 3). This value will only be available when position estimation is enabled.
    • initialTransmittedPowerdBm

      private Double initialTransmittedPowerdBm
      Initially transmitted power to start the estimation of radio source transmitted power. If not defined, average value of received power readings will be used.
    • initialPosition

      private P extends com.irurueta.geometry.Point<P> initialPosition
      Initial position to start the estimation of radio source position. If not defined, centroid of provided located readings will be used.
    • initialPathLossExponent

      private double initialPathLossExponent
      Initial exponent typically used on free space for path loss propagation in terms of distance. On different environments path loss exponent might have different values: - Free space: 2.0 - Urban Area: 2.7 to 3.5 - Suburban Area: 3 to 5 - Indoor (line-of-sight): 1.6 to 1.8

      If path loss exponent estimation is enabled, estimation will start at this value and will converge to the most appropriate value. If path loss exponent estimation is disabled, this value will be assumed to be exact and the estimated path loss exponent will be equal to this value.

    • transmittedPowerEstimationEnabled

      private boolean transmittedPowerEstimationEnabled
      Indicates whether transmitted power estimation is enabled or not.
    • pathLossEstimationEnabled

      private boolean pathLossEstimationEnabled
      Indicates whether path loss estimation is enabled or not.
    • estimatedTransmittedPowerdBm

      private double estimatedTransmittedPowerdBm
      Estimated transmitted power expressed in dBm's.
    • estimatedPathLossExponent

      private double estimatedPathLossExponent
      Estimated exponent typically used on free space for path loss propagation in terms of distance. On different environments path loss exponent might have different values: - Free space: 2.0 - Urban Area: 2.7 to 3.5 - Suburban Area: 3 to 5 - Indoor (line-of-sight): 1.6 to 1.8 If path loss exponent estimation is not enabled, this value will always be equal to RssiRadioSourceEstimator.DEFAULT_PATH_LOSS_EXPONENT
    • estimatedTransmittedPowerVariance

      private Double estimatedTransmittedPowerVariance
      Variance of estimated transmitted power. This value will only be available when transmitted power estimation is enabled.
    • estimatedPathLossExponentVariance

      private Double estimatedPathLossExponentVariance
      Variance of estimated path loss exponent. This value will only be available when path-loss exponent estimation is enabled.
    • inliersData

      private com.irurueta.numerical.robust.InliersData inliersData
      Data related to inliers found after estimation.
    • useReadingPositionCovariances

      private boolean useReadingPositionCovariances
      Indicates whether position covariances of readings must be taken into account to increase the amount of standard deviation of each ranging measure by the amount of position standard deviation assuming that both measures are statistically independent.
    • useHomogeneousRangingLinearSolver

      private boolean useHomogeneousRangingLinearSolver
      Indicates whether an homogeneous ranging linear solver is used to estimate preliminary positions.
  • Constructor Details

    • SequentialRobustRangingAndRssiRadioSourceEstimator

      protected SequentialRobustRangingAndRssiRadioSourceEstimator()
      Constructor.
    • SequentialRobustRangingAndRssiRadioSourceEstimator

      protected SequentialRobustRangingAndRssiRadioSourceEstimator(List<? extends RangingAndRssiReadingLocated<S,P>> 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.
    • SequentialRobustRangingAndRssiRadioSourceEstimator

      protected SequentialRobustRangingAndRssiRadioSourceEstimator(SequentialRobustRangingAndRssiRadioSourceEstimatorListener<S,P> listener)
      Constructor.
      Parameters:
      listener - listener in charge of attending events raised by this instance.
    • SequentialRobustRangingAndRssiRadioSourceEstimator

      protected SequentialRobustRangingAndRssiRadioSourceEstimator(List<? extends RangingAndRssiReadingLocated<S,P>> readings, SequentialRobustRangingAndRssiRadioSourceEstimatorListener<S,P> 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.
    • SequentialRobustRangingAndRssiRadioSourceEstimator

      protected SequentialRobustRangingAndRssiRadioSourceEstimator(List<? extends RangingAndRssiReadingLocated<S,P>> readings, P 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.
    • SequentialRobustRangingAndRssiRadioSourceEstimator

      protected SequentialRobustRangingAndRssiRadioSourceEstimator(P initialPosition)
      Constructor.
      Parameters:
      initialPosition - initial position to start the estimation of radio source position.
    • SequentialRobustRangingAndRssiRadioSourceEstimator

      protected SequentialRobustRangingAndRssiRadioSourceEstimator(P initialPosition, SequentialRobustRangingAndRssiRadioSourceEstimatorListener<S,P> 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.
    • SequentialRobustRangingAndRssiRadioSourceEstimator

      protected SequentialRobustRangingAndRssiRadioSourceEstimator(List<? extends RangingAndRssiReadingLocated<S,P>> readings, P initialPosition, SequentialRobustRangingAndRssiRadioSourceEstimatorListener<S,P> 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.
    • SequentialRobustRangingAndRssiRadioSourceEstimator

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

      protected SequentialRobustRangingAndRssiRadioSourceEstimator(List<? extends RangingAndRssiReadingLocated<S,P>> 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.
    • SequentialRobustRangingAndRssiRadioSourceEstimator

      protected SequentialRobustRangingAndRssiRadioSourceEstimator(Double initialTransmittedPowerdBm, SequentialRobustRangingAndRssiRadioSourceEstimatorListener<S,P> 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.
    • SequentialRobustRangingAndRssiRadioSourceEstimator

      protected SequentialRobustRangingAndRssiRadioSourceEstimator(List<? extends RangingAndRssiReadingLocated<S,P>> readings, Double initialTransmittedPowerdBm, SequentialRobustRangingAndRssiRadioSourceEstimatorListener<S,P> 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.
    • SequentialRobustRangingAndRssiRadioSourceEstimator

      protected SequentialRobustRangingAndRssiRadioSourceEstimator(List<? extends RangingAndRssiReadingLocated<S,P>> readings, P 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.
    • SequentialRobustRangingAndRssiRadioSourceEstimator

      protected SequentialRobustRangingAndRssiRadioSourceEstimator(P 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).
    • SequentialRobustRangingAndRssiRadioSourceEstimator

      protected SequentialRobustRangingAndRssiRadioSourceEstimator(P initialPosition, Double initialTransmittedPowerdBm, SequentialRobustRangingAndRssiRadioSourceEstimatorListener<S,P> 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.
    • SequentialRobustRangingAndRssiRadioSourceEstimator

      protected SequentialRobustRangingAndRssiRadioSourceEstimator(List<? extends RangingAndRssiReadingLocated<S,P>> readings, P initialPosition, Double initialTransmittedPowerdBm, SequentialRobustRangingAndRssiRadioSourceEstimatorListener<S,P> 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.
    • SequentialRobustRangingAndRssiRadioSourceEstimator

      protected SequentialRobustRangingAndRssiRadioSourceEstimator(List<? extends RangingAndRssiReadingLocated<S,P>> readings, P 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.
    • SequentialRobustRangingAndRssiRadioSourceEstimator

      protected SequentialRobustRangingAndRssiRadioSourceEstimator(P 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.
    • SequentialRobustRangingAndRssiRadioSourceEstimator

      protected SequentialRobustRangingAndRssiRadioSourceEstimator(P initialPosition, Double initialTransmittedPowerdBm, double initialPathLossExponent, SequentialRobustRangingAndRssiRadioSourceEstimatorListener<S,P> 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.
    • SequentialRobustRangingAndRssiRadioSourceEstimator

      protected SequentialRobustRangingAndRssiRadioSourceEstimator(List<? extends RangingAndRssiReadingLocated<S,P>> readings, P initialPosition, Double initialTransmittedPowerdBm, double initialPathLossExponent, SequentialRobustRangingAndRssiRadioSourceEstimatorListener<S,P> listener)
      Constructors. 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.
    • SequentialRobustRangingAndRssiRadioSourceEstimator

      protected SequentialRobustRangingAndRssiRadioSourceEstimator(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.
    • SequentialRobustRangingAndRssiRadioSourceEstimator

      protected SequentialRobustRangingAndRssiRadioSourceEstimator(double[] qualityScores, List<? extends RangingAndRssiReadingLocated<S,P>> 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.
    • SequentialRobustRangingAndRssiRadioSourceEstimator

      protected SequentialRobustRangingAndRssiRadioSourceEstimator(double[] qualityScores, SequentialRobustRangingAndRssiRadioSourceEstimatorListener<S,P> 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.
    • SequentialRobustRangingAndRssiRadioSourceEstimator

      protected SequentialRobustRangingAndRssiRadioSourceEstimator(double[] qualityScores, List<? extends RangingAndRssiReadingLocated<S,P>> readings, SequentialRobustRangingAndRssiRadioSourceEstimatorListener<S,P> 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.
    • SequentialRobustRangingAndRssiRadioSourceEstimator

      protected SequentialRobustRangingAndRssiRadioSourceEstimator(double[] qualityScores, List<? extends RangingAndRssiReadingLocated<S,P>> readings, P 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.
    • SequentialRobustRangingAndRssiRadioSourceEstimator

      protected SequentialRobustRangingAndRssiRadioSourceEstimator(double[] qualityScores, P 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.
      Throws:
      IllegalArgumentException - if quality scores is null, or length of quality scores is less than required minimum.
    • SequentialRobustRangingAndRssiRadioSourceEstimator

      protected SequentialRobustRangingAndRssiRadioSourceEstimator(double[] qualityScores, P initialPosition, SequentialRobustRangingAndRssiRadioSourceEstimatorListener<S,P> 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.
    • SequentialRobustRangingAndRssiRadioSourceEstimator

      protected SequentialRobustRangingAndRssiRadioSourceEstimator(double[] qualityScores, List<? extends RangingAndRssiReadingLocated<S,P>> readings, P initialPosition, SequentialRobustRangingAndRssiRadioSourceEstimatorListener<S,P> 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.
    • SequentialRobustRangingAndRssiRadioSourceEstimator

      protected SequentialRobustRangingAndRssiRadioSourceEstimator(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.
    • SequentialRobustRangingAndRssiRadioSourceEstimator

      protected SequentialRobustRangingAndRssiRadioSourceEstimator(double[] qualityScores, List<? extends RangingAndRssiReadingLocated<S,P>> 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.
    • SequentialRobustRangingAndRssiRadioSourceEstimator

      protected SequentialRobustRangingAndRssiRadioSourceEstimator(double[] qualityScores, Double initialTransmittedPowerdBm, SequentialRobustRangingAndRssiRadioSourceEstimatorListener<S,P> 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.
    • SequentialRobustRangingAndRssiRadioSourceEstimator

      protected SequentialRobustRangingAndRssiRadioSourceEstimator(double[] qualityScores, List<? extends RangingAndRssiReadingLocated<S,P>> readings, Double initialTransmittedPowerdBm, SequentialRobustRangingAndRssiRadioSourceEstimatorListener<S,P> 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.
    • SequentialRobustRangingAndRssiRadioSourceEstimator

      protected SequentialRobustRangingAndRssiRadioSourceEstimator(double[] qualityScores, List<? extends RangingAndRssiReadingLocated<S,P>> readings, P 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.
    • SequentialRobustRangingAndRssiRadioSourceEstimator

      protected SequentialRobustRangingAndRssiRadioSourceEstimator(double[] qualityScores, P 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.
    • SequentialRobustRangingAndRssiRadioSourceEstimator

      protected SequentialRobustRangingAndRssiRadioSourceEstimator(double[] qualityScores, P initialPosition, Double initialTransmittedPowerdBm, SequentialRobustRangingAndRssiRadioSourceEstimatorListener<S,P> 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.
    • SequentialRobustRangingAndRssiRadioSourceEstimator

      protected SequentialRobustRangingAndRssiRadioSourceEstimator(double[] qualityScores, List<? extends RangingAndRssiReadingLocated<S,P>> readings, P initialPosition, Double initialTransmittedPowerdBm, SequentialRobustRangingAndRssiRadioSourceEstimatorListener<S,P> 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.
    • SequentialRobustRangingAndRssiRadioSourceEstimator

      protected SequentialRobustRangingAndRssiRadioSourceEstimator(double[] qualityScores, List<? extends RangingAndRssiReadingLocated<S,P>> readings, P 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.
    • SequentialRobustRangingAndRssiRadioSourceEstimator

      protected SequentialRobustRangingAndRssiRadioSourceEstimator(double[] qualityScores, P 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.
      Throws:
      IllegalArgumentException - if quality scores is null, or length of quality scores is less than required minimum.
    • SequentialRobustRangingAndRssiRadioSourceEstimator

      protected SequentialRobustRangingAndRssiRadioSourceEstimator(double[] qualityScores, P initialPosition, Double initialTransmittedPowerdBm, double initialPathLossExponent, SequentialRobustRangingAndRssiRadioSourceEstimatorListener<S,P> 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.
      Throws:
      IllegalArgumentException - if quality scores is null, or length of quality scores is less than required minimum.
    • SequentialRobustRangingAndRssiRadioSourceEstimator

      protected SequentialRobustRangingAndRssiRadioSourceEstimator(double[] qualityScores, List<? extends RangingAndRssiReadingLocated<S,P>> readings, P initialPosition, Double initialTransmittedPowerdBm, double initialPathLossExponent, SequentialRobustRangingAndRssiRadioSourceEstimatorListener<S,P> listener)
      Constructors. 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

    • isLocked

      public boolean isLocked()
      Indicates whether estimator is locked during estimation.
      Returns:
      true if estimator is locked, false otherwise.
    • getProgressDelta

      public float getProgressDelta()
      Returns amount of progress variation before notifying a progress change during estimation.
      Returns:
      amount of progress variation before notifying a progress change during estimation.
    • setProgressDelta

      public void setProgressDelta(float progressDelta) throws com.irurueta.navigation.LockedException
      Sets amount of progress variation before notifying a progress change during estimation.
      Parameters:
      progressDelta - amount of progress variation before notifying a progress change during estimation.
      Throws:
      IllegalArgumentException - if progress delta is less than zero or greater than 1.
      com.irurueta.navigation.LockedException - if this estimator is locked.
    • getRangingRobustMethod

      public com.irurueta.numerical.robust.RobustEstimatorMethod getRangingRobustMethod()
      Gets robust method used for robust position estimation using ranging data.
      Returns:
      robust method used for robust position estimation.
    • setRangingRobustMethod

      public void setRangingRobustMethod(com.irurueta.numerical.robust.RobustEstimatorMethod rangingRobustMethod) throws com.irurueta.navigation.LockedException
      Sets robust method used for robust position estimation using ranging data.
      Parameters:
      rangingRobustMethod - robust method used for robust position estimation.
      Throws:
      com.irurueta.navigation.LockedException - if estimator is locked.
    • getRssiRobustMethod

      public com.irurueta.numerical.robust.RobustEstimatorMethod getRssiRobustMethod()
      Gets robust method used for path-loss exponent and transmitted power estimation using RSSI data.
      Returns:
      robust method used for path-loss exponent and transmitted power estimation.
    • setRssiRobustMethod

      public void setRssiRobustMethod(com.irurueta.numerical.robust.RobustEstimatorMethod rssiRobustMethod) throws com.irurueta.navigation.LockedException
      Sets robust method used for path-loss exponent and transmitted power estimation using RSSI data.
      Parameters:
      rssiRobustMethod - robust method used for path-loss exponent and transmitted power estimation.
      Throws:
      com.irurueta.navigation.LockedException - if estimator is locked.
    • getRangingPreliminarySubsetSize

      public int getRangingPreliminarySubsetSize()
      Gets size of subsets to be checked during ranging robust estimation.
      Returns:
      size of subsets to be checked during ranging robust estimation.
    • setRangingPreliminarySubsetSize

      public void setRangingPreliminarySubsetSize(int rangingPreliminarySubsetSize) throws com.irurueta.navigation.LockedException
      Sets size of subsets to be checked during ranging robust estimation.
      Parameters:
      rangingPreliminarySubsetSize - size of subsets to be checked during ranging robust estimation.
      Throws:
      com.irurueta.navigation.LockedException - if estimator is locked.
      IllegalArgumentException - if provided value is less than getMinReadings().
    • getRssiPreliminarySubsetSize

      public int getRssiPreliminarySubsetSize()
      Gets size of subsets to be checked during RSSI robust estimation.
      Returns:
      size of subsets to be checked during RSSI robust estimation.
    • setRssiPreliminarySubsetSize

      public void setRssiPreliminarySubsetSize(int rssiPreliminarySubsetSize) throws com.irurueta.navigation.LockedException
      Sets size of subsets to be checked during RSSI robust estimation.
      Parameters:
      rssiPreliminarySubsetSize - size of subsets to be checked during RSSI robust estimation.
      Throws:
      com.irurueta.navigation.LockedException - if estimator is locked.
      IllegalArgumentException - if provided value is less than getMinReadings().
    • getRangingThreshold

      public Double getRangingThreshold()
      Gets threshold to determine when samples are inliers or not, used during robust position estimation. If not defined, default threshold will be used.
      Returns:
      threshold for ranging estimation or null.
    • setRangingThreshold

      public void setRangingThreshold(Double rangingThreshold) throws com.irurueta.navigation.LockedException
      Sets threshold to determine when samples are inliers or not, used during robust position estimation. If not defined, default threshold will be used.
      Parameters:
      rangingThreshold - threshold for ranging estimation or null.
      Throws:
      com.irurueta.navigation.LockedException - if estimator is locked.
    • getRssiThreshold

      public Double getRssiThreshold()
      Gets threshold to determine when samples are inliers or not, used during robust path-loss exponent and transmitted power estimation. If not defined, default threshold will be used.
      Returns:
      threshold for RSSI estimation or null.
    • setRssiThreshold

      public void setRssiThreshold(Double rssiThreshold) throws com.irurueta.navigation.LockedException
      Sets threshold to determine when samples are inliers or not, used during robust path-loss exponent and transmitted power estimation. If not defined, default threshold will be used.
      Parameters:
      rssiThreshold - threshold for RSSI estimation or null.
      Throws:
      com.irurueta.navigation.LockedException - if estimator is locked.
    • getRangingConfidence

      public double getRangingConfidence()
      Returns amount of confidence expressed as a value between 0.0 and 1.0 (which is equivalent to 100%) for robust position estimation. The amount of confidence indicates the probability that the estimated result is correct. Usually this value will be close to 1.0, but not exactly 1.0.
      Returns:
      amount of confidence for robust position estimation as a value between 0.0 and 1.0.
    • setRangingConfidence

      public void setRangingConfidence(double rangingConfidence) throws com.irurueta.navigation.LockedException
      Sets amount of confidence expressed as a value between 0.0 and 1.0 (which is equivalent to 100%) for robust position estimation. The amount of confidence indicates the probability that the estimated result is correct. Usually this value will be close to 1.0, but not exactly 1.0.
      Parameters:
      rangingConfidence - confidence to be set for robust position estimation as a value between 0.0 and 1.0.
      Throws:
      IllegalArgumentException - if provided value is not between 0.0 and 1.0.
      com.irurueta.navigation.LockedException - if estimator is locked.
    • getRssiConfidence

      public double getRssiConfidence()
      Returns amount of confidence expressed as a value between 0.0 and 1.0 (which is equivalent to 100%) for path-loss exponent and transmitted power estimation. The amount of confidence indicates the probability that the estimated result is correct. Usually this value will be close to 1.0, but not exactly 1.0.
      Returns:
      amount of confidence for robust path-loss exponent and transmitted power estimation as a value between 0.0 and 1.0.
    • setRssiConfidence

      public void setRssiConfidence(double rssiConfidence) throws com.irurueta.navigation.LockedException
      Sets amount of confidence expressed as a value between 0.0 and 1.0 (which is equivalent to 100%) for path-loss exponent and transmitted power estimation. The amount of confidence indicates the probability that the estimated result is correct. Usually this value will be close to 10.0, but not exactly 1.0.
      Parameters:
      rssiConfidence - confidence to be set for robust path-loss exponent and transmitted power estimation as a value between 0.0 and 1.0.
      Throws:
      IllegalArgumentException - if provided value is not between 0.0 and 1.0.
      com.irurueta.navigation.LockedException - if estimator is locked.
    • getRangingMaxIterations

      public int getRangingMaxIterations()
      Returns maximum allowed number of iterations for robust position estimation. If maximum allowed number of iterations is achieved without converging to a result when calling estimate(), a RobustEstimatorException will be raised.
      Returns:
      maximum allowed number of iterations for position estimation.
    • setRangingMaxIterations

      public void setRangingMaxIterations(int rangingMaxIterations) throws com.irurueta.navigation.LockedException
      Sets maximum allowed number of iterations for robust position estimation. When the maximum number of iterations is exceeded, an approximate result might be available for retrieval.
      Parameters:
      rangingMaxIterations - maximum allowed number of iterations to be set for position estimation.
      Throws:
      IllegalArgumentException - if provided value is less than 1.
      com.irurueta.navigation.LockedException - if this estimator is locked.
    • getRssiMaxIterations

      public int getRssiMaxIterations()
      Returns maximum allowed number of iterations for robust path-loss exponent and transmitted power estimation. If maximum allowed number of iterations is achieved without converging to a result when calling estimate(), a RobustEstimatorException will be raised.
      Returns:
      maximum allowed number of iterations for path-loss exponent and transmitted power estimation.
    • setRssiMaxIterations

      public void setRssiMaxIterations(int rssiMaxIterations) throws com.irurueta.navigation.LockedException
      Sets maximum allowed number of iterations for robust path-loss exponent and transmitted power estimation. When the maximum number of iterations is exceeded, an approximate result might be available for retrieval.
      Parameters:
      rssiMaxIterations - maximum allowed number of iterations to be set for path-loss exponent and transmitted power estimation.
      Throws:
      IllegalArgumentException - if provided value is less than 1.
      com.irurueta.navigation.LockedException - if this estimator is locked.
    • isResultRefined

      public boolean isResultRefined()
      Indicates whether result must be refined using a non-linear solver over found inliers.
      Returns:
      true to refine result, false to simply use result found by robust estimator without further refining.
    • setResultRefined

      public void setResultRefined(boolean refineResult) throws com.irurueta.navigation.LockedException
      Specifies whether result must be refined using a non-linear solver over found inliers.
      Parameters:
      refineResult - true to refine result, false to simply use result found by robust estimator without further refining.
      Throws:
      com.irurueta.navigation.LockedException - if estimator is locked.
    • isCovarianceKept

      public boolean isCovarianceKept()
      Indicates whether covariance must be kept after refining result. This setting is only taken into account if result is refined.
      Returns:
      true if covariance must be kept after refining result, false otherwise.
    • setCovarianceKept

      public void setCovarianceKept(boolean keepCovariance) throws com.irurueta.navigation.LockedException
      Specifies whether covariance must be kept after refining result. This setting is only taken into account if result is refined.
      Parameters:
      keepCovariance - true if covariance must be kept after refining result, false otherwise.
      Throws:
      com.irurueta.navigation.LockedException - if estimator is locked.
    • getReadings

      public List<RangingAndRssiReadingLocated<S,P>> getReadings()
      Gets signal readings belonging to the same radio source.
      Returns:
      signal readings belonging to the same radio source.
    • setReadings

      public void setReadings(List<? extends RangingAndRssiReadingLocated<S,P>> readings) throws com.irurueta.navigation.LockedException
      Sets signal readings belonging to the same radio source.
      Parameters:
      readings - signal readings belonging to the same radio source.
      Throws:
      com.irurueta.navigation.LockedException - if estimator is locked.
      IllegalArgumentException - if readings are not valid.
    • getListener

      Gets listener in charge of attending events raised by this instance.
      Returns:
      listener in charge of attending events raised by this instance.
    • setListener

      public void setListener(SequentialRobustRangingAndRssiRadioSourceEstimatorListener<S,P> listener) throws com.irurueta.navigation.LockedException
      Sets listener in charge of attending events raised by this instance.
      Parameters:
      listener - listener in charge of attending events raised by this instance.
      Throws:
      com.irurueta.navigation.LockedException - if estimator 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.
      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.
      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.
    • getInitialTransmittedPowerdBm

      public Double getInitialTransmittedPowerdBm()
      Gets initial transmitted power to start the estimation of radio source transmitted power (expressed in dBm's). If not defined, average value of received power readings will be used.
      Returns:
      initial transmitted power to start the estimation of radio source transmitted power.
    • setInitialTransmittedPowerdBm

      public void setInitialTransmittedPowerdBm(Double initialTransmittedPowerdBm) throws com.irurueta.navigation.LockedException
      Sets initial transmitted power to start the estimation of radio source transmitted power (expressed in dBm's). If not defined, average value of received power readings will be used.
      Parameters:
      initialTransmittedPowerdBm - initial transmitted power to start the estimation of radio source transmitted power.
      Throws:
      com.irurueta.navigation.LockedException - if estimator is locked.
    • getInitialTransmittedPower

      public Double getInitialTransmittedPower()
      Gets initial transmitted power to start the estimation of radio source transmitted power (expressed in mW). If not defined, average value of received power readings will be used.
      Returns:
      initial transmitted power to start the estimation of radio source transmitted power.
    • setInitialTransmittedPower

      public void setInitialTransmittedPower(Double initialTransmittedPower) throws com.irurueta.navigation.LockedException
      Sets initial transmitted power to start the estimation of radio source transmitted power (expressed in mW). If not defined, average value of received power readings will be used.
      Parameters:
      initialTransmittedPower - initial transmitted power to start the estimation of radio source transmitted power.
      Throws:
      com.irurueta.navigation.LockedException - if estimator is locked.
      IllegalArgumentException - if provided value is negative.
    • getInitialPosition

      public P getInitialPosition()
      Gets initial position to start the estimation of radio source position. If not defined, centroid of provided fingerprints will be used.
      Returns:
      initial position to start the estimation of radio source position.
    • setInitialPosition

      public void setInitialPosition(P initialPosition) throws com.irurueta.navigation.LockedException
      Sets initial position to start the estimation of radio source position. If not defined, centroid of provided fingerprints will be used.
      Parameters:
      initialPosition - initial position to start the estimation of radio source position.
      Throws:
      com.irurueta.navigation.LockedException - if estimator is locked.
    • getInitialPathLossExponent

      public double getInitialPathLossExponent()
      Gets initial exponent typically used on free space for path loss propagation in terms of distance. On different environments path loss exponent might have different value: - Free space: 2.0 - Urban Area: 2.7 to 3.5 - Suburban Area: 3 to 5 - Indoor (line-of-sight): 1.6 to 1.8

      If path loss exponent estimation is enabled, estimation will start at this value and will converge to the most appropriate value. If path loss exponent estimation is disabled, this value will be assumed to be exact and the estimated path loss exponent will be equal to this value.

      Returns:
      initial path loss exponent.
    • setInitialPathLossExponent

      public void setInitialPathLossExponent(double initialPathLossExponent) throws com.irurueta.navigation.LockedException
      Sets initial exponent typically used on free space for path loss propagation in terms of distance. On different environments path loss exponent might have different value: - Free space: 2.0 - Urban Area: 2.7 to 3.5 - Suburban Area: 3 to 5 - Indoor (line-of-sight): 1.6 to 1.8

      If path loss exponent estimation is enabled, estimation will start at this value and will converge to the most appropriate value. If path loss exponent estimation is disabled, this value will be assumed to be exact and the estimated path loss exponent will be equal to this value.

      Parameters:
      initialPathLossExponent - initial path loss exponent.
      Throws:
      com.irurueta.navigation.LockedException - if estimator is locked.
    • isTransmittedPowerEstimationEnabled

      public boolean isTransmittedPowerEstimationEnabled()
      Indicates whether transmitted power estimation is enabled or not.
      Returns:
      true if transmitted power estimation is enabled, false otherwise.
    • setTransmittedPowerEstimationEnabled

      public void setTransmittedPowerEstimationEnabled(boolean transmittedPowerEstimationEnabled) throws com.irurueta.navigation.LockedException
      Specifies whether transmitted power estimation is enabled or not.
      Parameters:
      transmittedPowerEstimationEnabled - true if transmitted power estimation is enabled, false otherwise.
      Throws:
      com.irurueta.navigation.LockedException - if estimator is locked.
    • isPathLossEstimationEnabled

      public boolean isPathLossEstimationEnabled()
      Indicates whether path loss estimation is enabled or not.
      Returns:
      true if path loss estimation is enabled, false otherwise.
    • setPathLossEstimationEnabled

      public void setPathLossEstimationEnabled(boolean pathLossEstimationEnabled) throws com.irurueta.navigation.LockedException
      Specifies whether path loss estimation is enabled or not.
      Parameters:
      pathLossEstimationEnabled - true if path loss estimation is enabled, false otherwise.
      Throws:
      com.irurueta.navigation.LockedException - if estimator is locked.
    • getUseReadingPositionCovariance

      public boolean getUseReadingPositionCovariance()
      Indicates whether position covariances of readings must be taken into account to increase the amount of standard deviation of each ranging measure by the amount of position standard deviation assuming that both measures are statistically independent.
      Returns:
      true to take into account reading position covariances, false otherwise.
    • setUseReadingPositionCovariances

      public void setUseReadingPositionCovariances(boolean useReadingPositionCovariances) throws com.irurueta.navigation.LockedException
      Specifies whether position covariances of readings must be taken into account to increase the amount of standard deviation of each ranging measure by the amount of position standard deviation assuming that both measures are statistically independent.
      Parameters:
      useReadingPositionCovariances - true to take into account reading position covariances, false otherwise.
      Throws:
      com.irurueta.navigation.LockedException - if estimator is locked.
    • isHomogeneousRangingLinearSolverUsed

      public boolean isHomogeneousRangingLinearSolverUsed()
      Indicates whether an homogeneous ranging linear solver is used to estimate preliminary positions.
      Returns:
      true if homogeneous ranging linear solver is used, false if an inhomogeneous ranging linear one is used instead.
    • setHomogeneousRangingLinearSolverUsed

      public void setHomogeneousRangingLinearSolverUsed(boolean useHomogeneousRangingLinearSolver) throws com.irurueta.navigation.LockedException
      Specifies whether an homogeneous ranging linear solver is used to estimate preliminary positions.
      Parameters:
      useHomogeneousRangingLinearSolver - true if homogeneous ranging linear solver is used, false if an inhomogeneous ranging linear one is used instead.
      Throws:
      com.irurueta.navigation.LockedException - if estimator is locked.
    • getCovariance

      public com.irurueta.algebra.Matrix getCovariance()
      Gets covariance for estimated position and power. Matrix contains information in the following order: Top-left sub-matrix contains covariance of position, then follows transmitted power variance, and finally the last element contains path-loss exponent variance. This is only available when result has been refined and covariance is kept.
      Returns:
      covariance for estimated position and power.
    • getEstimatedPositionCovariance

      public com.irurueta.algebra.Matrix getEstimatedPositionCovariance()
      Gets estimated position covariance. Size of this matrix will depend on the number of dimensions of estimated position (either 2 or 3). This is only available when result has been refined and covariance is kept.
      Returns:
      estimated position covariance.
    • getEstimatedPosition

      public P getEstimatedPosition()
      Gets estimated position.
      Returns:
      estimated position.
    • areValidReadings

      public boolean areValidReadings(List<? extends RangingAndRssiReadingLocated<S,P>> readings)
      Indicates whether readings are valid or not. Readings are considered valid when there are enough readings.
      Parameters:
      readings - readings to be validated.
      Returns:
      true if readings are valid, false otherwise.
    • isReady

      public boolean isReady() throws com.irurueta.navigation.LockedException
      Indicates whether this instance is ready to start the estimation.
      Returns:
      true if this instance is ready, false otherwise.
      Throws:
      com.irurueta.navigation.LockedException - if estimator is locked
    • getEstimatedTransmittedPowerVariance

      public Double getEstimatedTransmittedPowerVariance()
      Gets estimated transmitted power variance. This is only available when result has been refined and covariance is kept.
      Returns:
      estimated transmitted power variance.
    • getEstimatedPathLossExponentVariance

      public Double getEstimatedPathLossExponentVariance()
      Gets estimated path loss exponent variance. This is only available when result has been refined and covariance is kept.
      Returns:
      estimated path loss exponent variance.
    • getEstimatedTransmittedPower

      public double getEstimatedTransmittedPower()
      Gets estimated transmitted power expressed in milli watts (mW).
      Returns:
      estimated transmitted power expressed in milli watts.
    • getEstimatedTransmittedPowerdBm

      public double getEstimatedTransmittedPowerdBm()
      Gets estimated transmitted power expressed in dBm's.
      Returns:
      estimated transmitted power expressed in dBm's.
    • getEstimatedPathLossExponent

      public double getEstimatedPathLossExponent()
      Gets estimated exponent typically used on free space for path loss propagation in terms of distance. On different environments path loss exponent might have different values: - Free space: 2.0 - Urban Area: 2.7 to 3.5 - Suburban Area: 3 to 5 - Indoor (line-of-sight): 1.6 to 1.8 If path loss exponent estimation is not enabled, this value will always be equal to RssiRadioSourceEstimator.DEFAULT_PATH_LOSS_EXPONENT
      Returns:
      estimated path loss exponent.
    • 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.
      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).
    • getInliersData

      public com.irurueta.numerical.robust.InliersData getInliersData()
      Gets data related to inliers found after estimation.
      Returns:
      data related to inliers found after estimation.
    • getMinReadings

      public abstract int getMinReadings()
      Gets minimum required number of readings to estimate power, position and path-loss exponent. This value depends on the number of parameters to be estimated, but for position only, this is 3 readings for 2D, and 4 readings for 3D.
      Returns:
      minimum required number of readings.
    • getNumberOfDimensions

      public abstract int getNumberOfDimensions()
      Gets number of dimensions of position points.
      Returns:
      number of dimensions of position points.
    • getEstimatedRadioSource

      public abstract <S2 extends RadioSourceLocated<P>> S2 getEstimatedRadioSource()
      Gets estimated located radio source.
      Type Parameters:
      S2 - type of located radio source.
      Returns:
      estimated located radio source.
    • buildRangingEstimatorIfNeeded

      protected abstract void buildRangingEstimatorIfNeeded()
      Builds ranging estimator.
    • buildRssiEstimatorIfNeeded

      protected abstract void buildRssiEstimatorIfNeeded() throws com.irurueta.navigation.LockedException
      Build RSSI estimator.
      Throws:
      com.irurueta.navigation.LockedException - if estimator is locked.
    • setupRangingEstimator

      protected void setupRangingEstimator() throws com.irurueta.navigation.LockedException
      Setups ranging estimator.
      Throws:
      com.irurueta.navigation.LockedException - if estimator is locked.
    • setupRssiEstimator

      protected void setupRssiEstimator() throws com.irurueta.navigation.LockedException
      Setups RSSI estimator.
      Throws:
      com.irurueta.navigation.LockedException - if estimator is locked.
    • internalSetReadings

      private void internalSetReadings(List<? extends RangingAndRssiReadingLocated<S,P>> readings)
      Internally sets signal readings belonging to the same radio source.
      Parameters:
      readings - signal readings belonging to the same radio source.
      Throws:
      IllegalArgumentException - if readings are null, not enough readings are available, or readings do not belong to the same access point.
    • 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 required minimum.
    • createRangingReading

      private RangingReadingLocated<S,P> createRangingReading(RangingAndRssiReadingLocated<S,P> reading)
      Creates a ranging reading from a ranging and RSSI reading.
      Parameters:
      reading - input reading to convert from.
      Returns:
      a ranging reading containing only the ranging data of input reading.
    • createRssiReading

      private RssiReadingLocated<S,P> createRssiReading(RangingAndRssiReadingLocated<S,P> reading)
      Creates an RSSI reading from a ranging and RSSI reading.
      Parameters:
      reading - input reading to convert from.
      Returns:
      an RSSI reading containing only the RSSI data of input reading.