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

java.lang.Object
com.irurueta.navigation.indoor.radiosource.RobustRadioSourceEstimator<P,RangingReadingLocated<S,P>,RobustRangingRadioSourceEstimatorListener<S,P>>
com.irurueta.navigation.indoor.radiosource.RobustRangingRadioSourceEstimator<S,P>
Type Parameters:
S - a RadioSource type.
P - a Point type.
Direct Known Subclasses:
RobustRangingRadioSourceEstimator2D, RobustRangingRadioSourceEstimator3D

public abstract class RobustRangingRadioSourceEstimator<S extends RadioSource,P extends com.irurueta.geometry.Point<P>> extends RobustRadioSourceEstimator<P,RangingReadingLocated<S,P>,RobustRangingRadioSourceEstimatorListener<S,P>>
This is an abstract class to robustly estimate position of a radio source (e.g. Wi-Fi access point or bluetooth beacon), by discarding outliers.
  • 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:
    • initialPosition

      protected P extends com.irurueta.geometry.Point<P> initialPosition
      Initial position to start the estimation of radio source position.
    • 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

    • RobustRangingRadioSourceEstimator

      protected RobustRangingRadioSourceEstimator()
      Constructor.
    • RobustRangingRadioSourceEstimator

      protected RobustRangingRadioSourceEstimator(List<? extends RangingReadingLocated<S,P>> readings)
      Constructor. Sets radio signal ranging readings belonging to the same radio source.
      Parameters:
      readings - radio signal ranging readings belonging to the same radio source.
      Throws:
      IllegalArgumentException - if readings are not valid.
    • RobustRangingRadioSourceEstimator

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

      protected RobustRangingRadioSourceEstimator(List<? extends RangingReadingLocated<S,P>> readings, RobustRangingRadioSourceEstimatorListener<S,P> listener)
      Constructor. Sets radio signal readings belonging to the same radio source.
      Parameters:
      readings - radio 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.
    • RobustRangingRadioSourceEstimator

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

      protected RobustRangingRadioSourceEstimator(List<? extends RangingReadingLocated<S,P>> readings, P initialPosition)
      Constructor. Sets radio signal readings belonging to the same radio source.
      Parameters:
      readings - radio 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.
    • RobustRangingRadioSourceEstimator

      protected RobustRangingRadioSourceEstimator(P initialPosition, RobustRangingRadioSourceEstimatorListener<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.
    • RobustRangingRadioSourceEstimator

      protected RobustRangingRadioSourceEstimator(List<? extends RangingReadingLocated<S,P>> readings, P initialPosition, RobustRangingRadioSourceEstimatorListener<S,P> listener)
      Constructor. Sets radio signal ranging readings belonging to the same radio source.
      Parameters:
      readings - radio signal ranging 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.
  • Method Details

    • getInitialPosition

      public P getInitialPosition()
      Gets initial position to start the non-linear estimation of radio source position. If not defined, a linear solution is found instead.
      Returns:
      initial position.
    • setInitialPosition

      public void setInitialPosition(P initialPosition) throws com.irurueta.navigation.LockedException
      Sets initial position to start the non-linear estimation of radio source position. If not defined, a linear solution is found instead.
      Parameters:
      initialPosition - initial position to start the estimation of radio source position or null.
      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.
    • 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>,RangingReadingLocated<S extends RadioSource,P extends com.irurueta.geometry.Point<P>>,RobustRangingRadioSourceEstimatorListener<S extends RadioSource,P extends com.irurueta.geometry.Point<P>>>
      Returns:
      true if this instance is ready, false otherwise.
    • isHomogeneousLinearSolverUsed

      public abstract boolean isHomogeneousLinearSolverUsed()
      Indicates whether an homogeneous linear solver is used to estimate an initial position.
      Returns:
      true if homogeneous linear solver is used, false if an inhomogeneous linear one is used instead.
    • setHomogeneousLinearSolverUsed

      public abstract void setHomogeneousLinearSolverUsed(boolean useHomogeneousLinearSolver) throws com.irurueta.navigation.LockedException
      Specifies whether an homogeneous linear solver is used to estimate an initial position.
      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.
    • 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<RobustRangingRadioSourceEstimator.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(RobustRangingRadioSourceEstimator.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.