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- aRadioSourcetype.P- aPointtype.
- 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.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static classRobustRangingRadioSourceEstimator.Solution<P extends com.irurueta.geometry.Point<?>>Contains a solution obtained during robust estimation for a subset of samples. -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final booleanIndicates 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.protected PInitial position to start the estimation of radio source position.protected booleanIndicates 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.Fields inherited from class com.irurueta.navigation.indoor.radiosource.RobustRadioSourceEstimator
confidence, covariance, DEFAULT_CONFIDENCE, DEFAULT_KEEP_COVARIANCE, DEFAULT_MAX_ITERATIONS, DEFAULT_PROGRESS_DELTA, DEFAULT_REFINE_RESULT, DEFAULT_ROBUST_METHOD, estimatedPosition, estimatedPositionCovariance, inliersData, keepCovariance, listener, locked, MAX_CONFIDENCE, MAX_PROGRESS_DELTA, maxIterations, MIN_CONFIDENCE, MIN_ITERATIONS, MIN_PROGRESS_DELTA, preliminarySubsetSize, progressDelta, readings, refineResult -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedConstructor.protectedConstructor.protectedRobustRangingRadioSourceEstimator(List<? extends RangingReadingLocated<S, P>> readings) Constructor.protectedRobustRangingRadioSourceEstimator(List<? extends RangingReadingLocated<S, P>> readings, RobustRangingRadioSourceEstimatorListener<S, P> listener) Constructor.protectedRobustRangingRadioSourceEstimator(List<? extends RangingReadingLocated<S, P>> readings, P initialPosition) Constructor.protectedRobustRangingRadioSourceEstimator(List<? extends RangingReadingLocated<S, P>> readings, P initialPosition, RobustRangingRadioSourceEstimatorListener<S, P> listener) Constructor.protectedRobustRangingRadioSourceEstimator(P initialPosition) Constructor.protectedRobustRangingRadioSourceEstimator(P initialPosition, RobustRangingRadioSourceEstimatorListener<S, P> listener) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionGets initial position to start the non-linear estimation of radio source position.abstract com.irurueta.numerical.robust.RobustEstimatorMethodReturns method being used for robust estimation.booleanIndicates 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.abstract booleanIndicates whether an homogeneous linear solver is used to estimate an initial position.booleanisReady()Indicates whether this instance is ready to start the estimation.protected doubleresidual(RobustRangingRadioSourceEstimator.Solution<P> currentEstimation, int i) Estimates residual for a solution obtained for a subset of samples.abstract voidsetHomogeneousLinearSolverUsed(boolean useHomogeneousLinearSolver) Specifies whether an homogeneous linear solver is used to estimate an initial position.voidsetInitialPosition(P initialPosition) Sets initial position to start the non-linear estimation of radio source position.voidsetUseReadingPositionCovariances(boolean useReadingPositionCovariances) 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.protected abstract voidsolvePreliminarySolutions(int[] samplesIndices, List<RobustRangingRadioSourceEstimator.Solution<P>> solutions) Solves preliminary solution for a subset of samples.Methods inherited from class com.irurueta.navigation.indoor.radiosource.RobustRadioSourceEstimator
areValidReadings, estimate, getConfidence, getCovariance, getEstimatedPosition, getEstimatedPositionCovariance, getEstimatedRadioSource, getInliersData, getListener, getMaxIterations, getMinReadings, getNumberOfDimensions, getPreliminarySubsetSize, getProgressDelta, getQualityScores, getReadings, internalSetReadings, isCovarianceKept, isLocked, isResultRefined, setConfidence, setCovarianceKept, setListener, setMaxIterations, setPreliminarySubsetSize, setProgressDelta, setQualityScores, setReadings, setResultRefined
-
Field Details
-
DEFAULT_USE_READING_POSITION_COVARIANCES
public static final boolean DEFAULT_USE_READING_POSITION_COVARIANCESIndicates 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
Initial position to start the estimation of radio source position. -
useReadingPositionCovariances
protected boolean useReadingPositionCovariancesIndicates 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
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
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.
-
-
Method Details
-
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
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:
isReadyin classRobustRadioSourceEstimator<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.
-