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

Type Parameters:
S - a RadioSource type.
P - a Point type.
Direct Known Subclasses:
RobustRangingAndRssiRadioSourceEstimator2D, RobustRangingAndRssiRadioSourceEstimator3D

public abstract class RobustRangingAndRssiRadioSourceEstimator<S extends RadioSource,P extends com.irurueta.geometry.Point<P>> extends RobustRadioSourceEstimator<P,RangingAndRssiReadingLocated<S,P>,RobustRangingAndRssiRadioSourceEstimatorListener<S,P>>
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. 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.

Although RobustRssiRadioSourceEstimator can estimate the same parameters of a radio source, when ranging measures are available along with RSSI measurements, implementations of this class should be preferred instead as they can provide greater accuracy.

  • Field Details

    • 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:
    • initialTransmittedPowerdBm

      protected 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

      protected 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

      protected 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

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

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

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

      protected 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

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

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

      protected 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.
  • Constructor Details

    • RobustRangingAndRssiRadioSourceEstimator

      protected RobustRangingAndRssiRadioSourceEstimator()
      Constructor.
    • RobustRangingAndRssiRadioSourceEstimator

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

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

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

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

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

      protected RobustRangingAndRssiRadioSourceEstimator(P initialPosition, RobustRangingAndRssiRadioSourceEstimatorListener<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.
    • RobustRangingAndRssiRadioSourceEstimator

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

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

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

      protected RobustRangingAndRssiRadioSourceEstimator(Double initialTransmittedPowerdBm, RobustRangingAndRssiRadioSourceEstimatorListener<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.
    • RobustRangingAndRssiRadioSourceEstimator

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

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

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

      protected RobustRangingAndRssiRadioSourceEstimator(P initialPosition, Double initialTransmittedPowerdBm, RobustRangingAndRssiRadioSourceEstimatorListener<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.
    • RobustRangingAndRssiRadioSourceEstimator

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

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

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

      protected RobustRangingAndRssiRadioSourceEstimator(P initialPosition, Double initialTransmittedPowerdBm, double initialPathLossExponent, RobustRangingAndRssiRadioSourceEstimatorListener<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.
    • RobustRangingAndRssiRadioSourceEstimator

      protected RobustRangingAndRssiRadioSourceEstimator(List<? extends RangingAndRssiReadingLocated<S,P>> readings, P initialPosition, Double initialTransmittedPowerdBm, double initialPathLossExponent, RobustRangingAndRssiRadioSourceEstimatorListener<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).
      initialPathLossExponent - initial path loss exponent. A typical value is 2.0.
      listener - listener in charge of attending events raised by this instance.
      Throws:
      IllegalArgumentException - if readings are not valid.
  • Method Details

    • 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 abstract boolean isHomogeneousRangingLinearSolverUsed()
      Indicates whether an homogeneous linear solver is used to estimate an initial position for the internal ranging radio source estimator.
      Returns:
      true if homogeneous linear solver is used, false if an inhomogeneous linear one is used instead.
    • setHomogeneousRangingLinearSolverUsed

      public abstract void setHomogeneousRangingLinearSolverUsed(boolean useHomogeneousLinearSolver) throws com.irurueta.navigation.LockedException
      Specifies whether an homogeneous linear solver is used to estimate an initial position for the internal ranging radio source estimator.
      Parameters:
      useHomogeneousLinearSolver - true if homogeneous linear solver is used, false if an inhomogeneous linear one is used instead.
      Throws:
      com.irurueta.navigation.LockedException - if estimator is locked.
    • isReady

      public boolean isReady()
      Indicates whether this instance is ready to start the estimation.
      Specified by:
      isReady in class RobustRadioSourceEstimator<P extends com.irurueta.geometry.Point<P>,RangingAndRssiReadingLocated<S extends RadioSource,P extends com.irurueta.geometry.Point<P>>,RobustRangingAndRssiRadioSourceEstimatorListener<S extends RadioSource,P extends com.irurueta.geometry.Point<P>>>
      Returns:
      true if this instance is ready, false otherwise.
    • 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.
    • getMethod

      public abstract com.irurueta.numerical.robust.RobustEstimatorMethod getMethod()
      Returns method being used for robust estimation.
      Returns:
      method being used for robust estimation.
    • solvePreliminarySolutions

      protected abstract void solvePreliminarySolutions(int[] samplesIndices, List<RobustRangingAndRssiRadioSourceEstimator.Solution<P>> solutions)
      Solves preliminary solution for a subset of samples.
      Parameters:
      samplesIndices - indices of subset samples.
      solutions - instance where solution will be stored.
    • residual

      protected double residual(RobustRangingAndRssiRadioSourceEstimator.Solution<P> currentEstimation, int i)
      Estimates residual for a solution obtained for a subset of samples.
      Parameters:
      currentEstimation - solution obtained for a subset of samples.
      i - i-th fingerprint to obtain residual for.
      Returns:
      difference between measured and expected RSSI value.