Class LinearRangingAndRssiPositionEstimator<P extends com.irurueta.geometry.Point<P>>
java.lang.Object
com.irurueta.navigation.indoor.position.PositionEstimator<P,RangingAndRssiReading<? extends RadioSource>,RangingAndRssiPositionEstimatorListener<P>>
com.irurueta.navigation.indoor.position.RangingAndRssiPositionEstimator<P>
com.irurueta.navigation.indoor.position.LinearRangingAndRssiPositionEstimator<P>
- Type Parameters:
P- aPointtype.
- Direct Known Subclasses:
LinearRangingAndRssiPositionEstimator2D,LinearRangingAndRssiPositionEstimator3D
public abstract class LinearRangingAndRssiPositionEstimator<P extends com.irurueta.geometry.Point<P>>
extends RangingAndRssiPositionEstimator<P>
Linearly estimates position using located radio sources and their RSSI+ranging readings
at unknown locations.
These kind of estimators can be used to determine the position of a given device by
getting RSSI+ranging readings at an unknown location of different radio sources whose
locations are known.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final booleanIndicates that by default an homogeneous linear solver is used to estimate position.protected com.irurueta.navigation.lateration.HomogeneousLinearLeastSquaresLaterationSolver<P> An homogeneous linear lateration solver to solve position.protected com.irurueta.navigation.lateration.InhomogeneousLinearLeastSquaresLaterationSolver<P> An inhomogeneous linear lateration solver to solve position.protected com.irurueta.navigation.lateration.LaterationSolverListener<P> Listener for the lateration solver.protected booleanIndicates whether an homogeneous linear solver is used to estimate position.Fields inherited from class com.irurueta.navigation.indoor.position.PositionEstimator
estimatedPositionCoordinates, fingerprint, listener, sources -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedConstructor.protectedConstructor. -
Method Summary
Modifier and TypeMethodDescriptionprivate voidBuilds positions and distances for the internal lateration solver.voidestimate()Estimates position based on provided located radio sources and RSSI readings of such radio sources at an unknown location.double[]Gets Euclidean distances from known located radio sources to the location of provided readings in a fingerprint.intGets minimum required number of located radio sources to perform lateration.P[]Gets known positions of radio sources used internally to solve lateration.private voidinit()Initializes lateration solver listener.protected voidinternalSetFingerprint(Fingerprint<? extends RadioSource, ? extends RangingAndRssiReading<? extends RadioSource>> fingerprint) Internally sets fingerprint containing readings at an unknown location for provided located radio sources.protected voidinternalSetSources(List<? extends RadioSourceLocated<P>> sources) Internally sets located radio sources used for lateration.booleanIndicates whether an homogeneous linear solver is used to estimate position.booleanisLocked()Returns boolean indicating whether this estimator is locked because an estimation is already in progress.booleanisReady()Indicates whether estimator is ready to find a solution.voidsetHomogeneousLinearSolverUsed(boolean useHomogeneousLinearSolver) Specifies whether an homogeneous linear solver is used to estimate position.protected abstract voidsetPositionsAndDistances(List<P> positions, List<Double> distances) Sets positions and distances on internal lateration solver.Methods inherited from class com.irurueta.navigation.indoor.position.PositionEstimator
getEstimatedPosition, getEstimatedPosition, getEstimatedPositionCoordinates, getFingerprint, getListener, getSources, setFingerprint, setListener, setSources
-
Field Details
-
DEFAULT_USE_HOMOGENEOUS_LINEAR_SOLVER
public static final boolean DEFAULT_USE_HOMOGENEOUS_LINEAR_SOLVERIndicates that by default an homogeneous linear solver is used to estimate position.- See Also:
-
homogeneousTrilaterationSolver
protected com.irurueta.navigation.lateration.HomogeneousLinearLeastSquaresLaterationSolver<P extends com.irurueta.geometry.Point<P>> homogeneousTrilaterationSolverAn homogeneous linear lateration solver to solve position. -
inhomogeneousTrilaterationSolver
protected com.irurueta.navigation.lateration.InhomogeneousLinearLeastSquaresLaterationSolver<P extends com.irurueta.geometry.Point<P>> inhomogeneousTrilaterationSolverAn inhomogeneous linear lateration solver to solve position. -
laterationSolverListener
protected com.irurueta.navigation.lateration.LaterationSolverListener<P extends com.irurueta.geometry.Point<P>> laterationSolverListenerListener for the lateration solver. -
useHomogeneousLinearSolver
protected boolean useHomogeneousLinearSolverIndicates whether an homogeneous linear solver is used to estimate position.
-
-
Constructor Details
-
LinearRangingAndRssiPositionEstimator
protected LinearRangingAndRssiPositionEstimator()Constructor.
-
-
Method Details
-
isHomogeneousLinearSolverUsed
public boolean isHomogeneousLinearSolverUsed()Indicates whether an homogeneous linear solver is used to estimate position.- Returns:
- true if homogeneous linear solver is used, false if an inhomogeneous linear one is used instead.
-
setHomogeneousLinearSolverUsed
public void setHomogeneousLinearSolverUsed(boolean useHomogeneousLinearSolver) throws com.irurueta.navigation.LockedException Specifies whether an homogeneous linear solver is used to estimate 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.
-
getMinRequiredSources
public int getMinRequiredSources()Gets minimum required number of located radio sources to perform lateration.- Specified by:
getMinRequiredSourcesin classPositionEstimator<P extends com.irurueta.geometry.Point<P>,RangingAndRssiReading<? extends RadioSource>, RangingAndRssiPositionEstimatorListener<P extends com.irurueta.geometry.Point<P>>> - Returns:
- minimum required number of located radio sources to perform lateration.
-
isReady
public boolean isReady()Indicates whether estimator is ready to find a solution.- Specified by:
isReadyin classPositionEstimator<P extends com.irurueta.geometry.Point<P>,RangingAndRssiReading<? extends RadioSource>, RangingAndRssiPositionEstimatorListener<P extends com.irurueta.geometry.Point<P>>> - Returns:
- true if estimator is ready, false otherwise.
-
isLocked
public boolean isLocked()Returns boolean indicating whether this estimator is locked because an estimation is already in progress.- Specified by:
isLockedin classPositionEstimator<P extends com.irurueta.geometry.Point<P>,RangingAndRssiReading<? extends RadioSource>, RangingAndRssiPositionEstimatorListener<P extends com.irurueta.geometry.Point<P>>> - Returns:
- true if estimator is locked, false otherwise.
-
estimate
public void estimate() throws com.irurueta.navigation.LockedException, com.irurueta.navigation.NotReadyException, PositionEstimationExceptionEstimates position based on provided located radio sources and RSSI readings of such radio sources at an unknown location.- Specified by:
estimatein classPositionEstimator<P extends com.irurueta.geometry.Point<P>,RangingAndRssiReading<? extends RadioSource>, RangingAndRssiPositionEstimatorListener<P extends com.irurueta.geometry.Point<P>>> - Throws:
com.irurueta.navigation.LockedException- if estimator is locked.com.irurueta.navigation.NotReadyException- if estimator is not ready.PositionEstimationException- if estimation fails for some other reason.
-
getPositions
Gets known positions of radio sources used internally to solve lateration.- Specified by:
getPositionsin classPositionEstimator<P extends com.irurueta.geometry.Point<P>,RangingAndRssiReading<? extends RadioSource>, RangingAndRssiPositionEstimatorListener<P extends com.irurueta.geometry.Point<P>>> - Returns:
- known positions used internally.
-
getDistances
public double[] getDistances()Gets Euclidean distances from known located radio sources to the location of provided readings in a fingerprint. Distance values are used internally to solve lateration.- Specified by:
getDistancesin classPositionEstimator<P extends com.irurueta.geometry.Point<P>,RangingAndRssiReading<? extends RadioSource>, RangingAndRssiPositionEstimatorListener<P extends com.irurueta.geometry.Point<P>>> - Returns:
- Euclidean distances used internally.
-
internalSetSources
Internally sets located radio sources used for lateration.- Overrides:
internalSetSourcesin classPositionEstimator<P extends com.irurueta.geometry.Point<P>,RangingAndRssiReading<? extends RadioSource>, RangingAndRssiPositionEstimatorListener<P extends com.irurueta.geometry.Point<P>>> - Parameters:
sources- located radio sources used for lateration.- Throws:
IllegalArgumentException- if provided value is null or the number of provided sources is less than the required minimum.
-
setPositionsAndDistances
Sets positions and distances on internal lateration solver.- Parameters:
positions- positions to be set.distances- distances to be set.
-
init
private void init()Initializes lateration solver listener. -
buildPositionsAndDistances
private void buildPositionsAndDistances()Builds positions and distances for the internal lateration solver.
-