Class RangingRadioSourceEstimator<S extends RadioSource,P extends com.irurueta.geometry.Point<P>>
java.lang.Object
com.irurueta.navigation.indoor.radiosource.RadioSourceEstimator<P,RangingReadingLocated<S,P>,RangingRadioSourceEstimatorListener<S,P>>
com.irurueta.navigation.indoor.radiosource.RangingRadioSourceEstimator<S,P>
- Direct Known Subclasses:
RangingRadioSourceEstimator2D,RangingRadioSourceEstimator3D
public abstract class RangingRadioSourceEstimator<S extends RadioSource,P extends com.irurueta.geometry.Point<P>>
extends RadioSourceEstimator<P,RangingReadingLocated<S,P>,RangingRadioSourceEstimatorListener<S,P>>
Estimates position of a radio source (e.g. Wi-Fi access point or bluetooth beacon)
by using ranging measurements.
Ranging measurements can be obtained by protocols such as ieee 802.11mc (Wi-Fi RTT) which
measures travel time of signal and converts the result into distances by taking into
account the speed of light as the propagation speed.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected com.irurueta.geometry.AccuracyContains accuracy of a reading position.static final booleanIndicates that by default an homogeneous linear solver is used to estimate an initial position.static 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 com.irurueta.navigation.lateration.HomogeneousLinearLeastSquaresLaterationSolver<P> Internal homogeneous linear solver to find radio source position when no initial position is provided.protected com.irurueta.navigation.lateration.InhomogeneousLinearLeastSquaresLaterationSolver<P> Internal inhomogeneous linear solver to find radio source position when no initial position is provided.protected PInitial position to start the estimation of radio source position.protected com.irurueta.navigation.lateration.NonLinearLeastSquaresLaterationSolver<P> Internal non-linear solver to estimate radio source position and covariance for an initial provided or estimated position.protected booleanIndicates whether non-linear solver is enabled.protected booleanIndicates whether an homogeneous linear solver is used to estimate an initial 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.RadioSourceEstimator
estimatedCovariance, estimatedPositionCoordinates, estimatedPositionCovariance, listener, locked, readings -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedConstructor.protectedConstructor.protectedRangingRadioSourceEstimator(List<? extends RangingReadingLocated<S, P>> readings) Constructor.protectedRangingRadioSourceEstimator(List<? extends RangingReadingLocated<S, P>> readings, RangingRadioSourceEstimatorListener<S, P> listener) Constructor.protectedRangingRadioSourceEstimator(List<? extends RangingReadingLocated<S, P>> readings, P initialPosition) Constructor.protectedRangingRadioSourceEstimator(List<? extends RangingReadingLocated<S, P>> readings, P initialPosition, RangingRadioSourceEstimatorListener<S, P> listener) Constructor.protectedRangingRadioSourceEstimator(P initialPosition) Constructor.protectedRangingRadioSourceEstimator(P initialPosition, RangingRadioSourceEstimatorListener<S, P> listener) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract voidBuild an instance of accuracy if needed.protected abstract voidBuilds an instance of a linear lateration solver if needed.protected abstract voidBuilds an instance of a non-linear lateration solver if needed.private voidBuilds positions, distances and standard deviations of distances for the internal lateration solver.private voidBuild instances of lateration solvers if needed.voidestimate()Estimate position of radio source.Gets initial position to start the non-linear estimation of radio source position.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.booleanIndicates whether an homogeneous linear solver is used to estimate an initial position.booleanIndicates whether non-linear solver is enabled.booleanisReady()Indicates whether this instance is ready to start the estimation.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.voidsetNonLinearSolverEnabled(boolean nonLinearSolverEnabled) Specifies whether non-linear solver is enabled.protected abstract voidsetPositionsDistancesAndDistanceStandardDeviations(List<P> positions, List<Double> distances, List<Double> distanceStandardDeviations) Sets positions, distances and standard deviations of distances on internal lateration solver.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.Methods inherited from class com.irurueta.navigation.indoor.radiosource.RadioSourceEstimator
areValidReadings, getEstimatedCovariance, getEstimatedPosition, getEstimatedPosition, getEstimatedPositionCoordinates, getEstimatedPositionCovariance, getEstimatedRadioSource, getListener, getMinReadings, getNumberOfDimensions, getReadings, internalSetReadings, isLocked, setListener, setReadings
-
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:
-
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 an initial position.- See Also:
-
homogeneousLinearSolver
protected com.irurueta.navigation.lateration.HomogeneousLinearLeastSquaresLaterationSolver<P extends com.irurueta.geometry.Point<P>> homogeneousLinearSolverInternal homogeneous linear solver to find radio source position when no initial position is provided. -
inhomogeneousLinearSolver
protected com.irurueta.navigation.lateration.InhomogeneousLinearLeastSquaresLaterationSolver<P extends com.irurueta.geometry.Point<P>> inhomogeneousLinearSolverInternal inhomogeneous linear solver to find radio source position when no initial position is provided. -
nonLinearSolver
protected com.irurueta.navigation.lateration.NonLinearLeastSquaresLaterationSolver<P extends com.irurueta.geometry.Point<P>> nonLinearSolverInternal non-linear solver to estimate radio source position and covariance for an initial provided or estimated position. -
accuracy
protected com.irurueta.geometry.Accuracy accuracyContains accuracy of a reading position. This is used internally to compute additional distance standard deviation due to position accuracy. -
initialPosition
Initial position to start the estimation of radio source position. -
nonLinearSolverEnabled
protected boolean nonLinearSolverEnabledIndicates whether non-linear solver is enabled. If disabled a linear solver is always used, initial position ignored and covariance is not computed. -
useHomogeneousLinearSolver
protected boolean useHomogeneousLinearSolverIndicates whether an homogeneous linear solver is used to estimate an initial 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
-
RangingRadioSourceEstimator
protected RangingRadioSourceEstimator()Constructor. -
RangingRadioSourceEstimator
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.
-
RangingRadioSourceEstimator
Constructor.- Parameters:
initialPosition- initial position to start the estimation or radio source position.
-
RangingRadioSourceEstimator
protected RangingRadioSourceEstimator(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.
-
isNonLinearSolverEnabled
public boolean isNonLinearSolverEnabled()Indicates whether non-linear solver is enabled. If disabled a linear solver is always used, initial position ignored and covariance is not computed.- Returns:
- true if non-linear solver is enabled, false otherwise.
-
setNonLinearSolverEnabled
public void setNonLinearSolverEnabled(boolean nonLinearSolverEnabled) throws com.irurueta.navigation.LockedException Specifies whether non-linear solver is enabled. If disabled a linear solver is always used, initial position ignored and covariance is not computed.- Parameters:
nonLinearSolverEnabled- true if non-linear solver is enabled, false otherwise.- Throws:
com.irurueta.navigation.LockedException- if estimator is locked.
-
isHomogeneousLinearSolverUsed
public 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 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.
-
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 classRadioSourceEstimator<P extends com.irurueta.geometry.Point<P>,RangingReadingLocated<S extends RadioSource, P extends com.irurueta.geometry.Point<P>>, RangingRadioSourceEstimatorListener<S extends RadioSource, P extends com.irurueta.geometry.Point<P>>> - Returns:
- true if this instance is ready, false otherwise.
-
estimate
public void estimate() throws RadioSourceEstimationException, com.irurueta.navigation.NotReadyException, com.irurueta.navigation.LockedExceptionEstimate position of radio source.- Specified by:
estimatein classRadioSourceEstimator<P extends com.irurueta.geometry.Point<P>,RangingReadingLocated<S extends RadioSource, P extends com.irurueta.geometry.Point<P>>, RangingRadioSourceEstimatorListener<S extends RadioSource, P extends com.irurueta.geometry.Point<P>>> - Throws:
RadioSourceEstimationException- if estimation fails.com.irurueta.navigation.NotReadyException- if estimator is not ready.com.irurueta.navigation.LockedException- if estimator is locked.
-
buildLinearSolverIfNeeded
protected abstract void buildLinearSolverIfNeeded()Builds an instance of a linear lateration solver if needed. -
buildNonLinearSolverIfNeeded
protected abstract void buildNonLinearSolverIfNeeded()Builds an instance of a non-linear lateration solver if needed. -
buildAccuracyIfNeeded
protected abstract void buildAccuracyIfNeeded()Build an instance of accuracy if needed. -
setPositionsDistancesAndDistanceStandardDeviations
protected abstract void setPositionsDistancesAndDistanceStandardDeviations(List<P> positions, List<Double> distances, List<Double> distanceStandardDeviations) throws com.irurueta.navigation.LockedException Sets positions, distances and standard deviations of distances on internal lateration solver.- Parameters:
positions- positions to be set.distances- distances to be set.distanceStandardDeviations- standard deviations of distances to be set or null.- Throws:
com.irurueta.navigation.LockedException- if solvers are locked.
-
buildSolversIfNeeded
private void buildSolversIfNeeded()Build instances of lateration solvers if needed. -
buildPositionsDistancesAndDistanceStandardDeviations
private void buildPositionsDistancesAndDistanceStandardDeviations() throws com.irurueta.navigation.LockedExceptionBuilds positions, distances and standard deviations of distances for the internal lateration solver.- Throws:
com.irurueta.navigation.LockedException- if solvers are locked.
-