Class RadioSourceEstimator<P extends com.irurueta.geometry.Point<?>,R extends ReadingLocated<P>,L extends RadioSourceEstimatorListener<? extends RadioSourceEstimator<?,?,?>>>
java.lang.Object
com.irurueta.navigation.indoor.radiosource.RadioSourceEstimator<P,R,L>
- Type Parameters:
P- aPointtype.R- aReadingLocatedtype.L- aRadioSourceEstimatorListenertype.
- Direct Known Subclasses:
MixedRadioSourceEstimator,RangingAndRssiRadioSourceEstimator,RangingRadioSourceEstimator,RssiRadioSourceEstimator
public abstract class RadioSourceEstimator<P extends com.irurueta.geometry.Point<?>,R extends ReadingLocated<P>,L extends RadioSourceEstimatorListener<? extends RadioSourceEstimator<?,?,?>>>
extends Object
Estimates a radio source. Usually this implies at least the estimation of
the radio source location, however, implementations of this class might
estimate additional parameters.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected com.irurueta.algebra.MatrixCovariance of estimated parameters (position, transmitted power and path-loss exponent).protected double[]Estimated position.protected com.irurueta.algebra.MatrixCovariance of estimated position.protected LListener in charge of attending events raised by this instance.protected booleanIndicates whether estimator is locked during estimation.Located signal readings belonging to the same radio source to be estimated. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedConstructor.protectedRadioSourceEstimator(List<? extends R> readings) Constructor.protectedRadioSourceEstimator(List<? extends R> readings, L listener) Constructor.protectedRadioSourceEstimator(L listener) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionbooleanareValidReadings(List<? extends R> readings) Indicates whether readings are valid or not.abstract voidestimate()Estimate radio source.com.irurueta.algebra.MatrixGets covariance for estimated position and power.abstract PGets estimated radio source position.voidgetEstimatedPosition(P estimatedPosition) Gets estimated position and stores result into provided instance.double[]Gets estimated inhomogeneous position coordinates.com.irurueta.algebra.MatrixGets estimated position covariance.abstract <S extends RadioSourceLocated<P>>
SGets estimated located radio source.Gets listener in charge of attending events raised by this instance.abstract intGets minimum required number of readings to estimate power, position and path-loss exponent.abstract intGets number of dimensions of position points.Gets radio signal readings belonging to the same radio source to be estimated.protected voidinternalSetReadings(List<? extends R> readings) Internally sets radio signal readings belonging to the same radio source.booleanisLocked()Indicates whether estimator is locked during estimation.abstract booleanisReady()Indicates whether this instance is ready to start the estimation.voidsetListener(L listener) Sets listener in charge of attending events raised by this instance.voidsetReadings(List<? extends R> readings) Sets radio signal readings belonging to the same radio source.
-
Field Details
-
estimatedPositionCoordinates
protected double[] estimatedPositionCoordinatesEstimated position. -
estimatedCovariance
protected com.irurueta.algebra.Matrix estimatedCovarianceCovariance of estimated parameters (position, transmitted power and path-loss exponent). Size of this matrix will depend on which parameters estimation is enabled. -
estimatedPositionCovariance
protected com.irurueta.algebra.Matrix estimatedPositionCovarianceCovariance of estimated position. Size of this matrix will depend on the number of dimensions of estimated position (either 2 or 3). This value will only be available when position estimation is enabled. -
readings
Located signal readings belonging to the same radio source to be estimated. -
locked
protected boolean lockedIndicates whether estimator is locked during estimation. -
listener
Listener in charge of attending events raised by this instance.
-
-
Constructor Details
-
RadioSourceEstimator
protected RadioSourceEstimator()Constructor. -
RadioSourceEstimator
Constructor. Sets located radio signal readings belonging to the same radio source.- Parameters:
readings- radio signal readings belonging to the same radio source.- Throws:
IllegalArgumentException- if readings are not valid.
-
RadioSourceEstimator
Constructor.- Parameters:
listener- listener in charge of attending events raised by this instance.
-
RadioSourceEstimator
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 fingerprints are not valid.
-
-
Method Details
-
isLocked
public boolean isLocked()Indicates whether estimator is locked during estimation.- Returns:
- true if estimator is locked, false otherwise.
-
getReadings
Gets radio signal readings belonging to the same radio source to be estimated.- Returns:
- radio signal readings belonging to the same radio source.
-
setReadings
Sets radio signal readings belonging to the same radio source.- Parameters:
readings- Wi-Fi signal readings belonging to the same radio source.- Throws:
com.irurueta.navigation.LockedException- if estimator is locked.IllegalArgumentException- if readings are not valid.
-
getListener
Gets listener in charge of attending events raised by this instance.- Returns:
- listener in charge of attending events raised by this instance.
-
setListener
Sets listener in charge of attending events raised by this instance.- Parameters:
listener- listener in charge of attending events raised by this instance.- Throws:
com.irurueta.navigation.LockedException- if estimator is locked.
-
areValidReadings
Indicates whether readings are valid or not. Readings are considered valid when there are enough readings.- Parameters:
readings- readings to be validated.- Returns:
- true if readings are valid, false otherwise.
-
getEstimatedPositionCoordinates
public double[] getEstimatedPositionCoordinates()Gets estimated inhomogeneous position coordinates.- Returns:
- estimated inhomogeneous position coordinates.
-
getEstimatedPosition
Gets estimated position and stores result into provided instance.- Parameters:
estimatedPosition- instance where estimated position will be stored.
-
getEstimatedCovariance
public com.irurueta.algebra.Matrix getEstimatedCovariance()Gets covariance for estimated position and power. Matrix contains information in the following order: Top-left sub-matrix contains covariance of position, then follows transmitted power variance, and finally the last element contains path-loss exponent variance.- Returns:
- covariance for estimated parameters.
-
getEstimatedPositionCovariance
public com.irurueta.algebra.Matrix getEstimatedPositionCovariance()Gets estimated position covariance. Size of this matrix will depend on the number of dimensions of estimated position (either 2 or 3). This value will only be available when position estimation is enabled.- Returns:
- estimated position covariance or null.
-
isReady
public abstract boolean isReady()Indicates whether this instance is ready to start the estimation.- Returns:
- true if this instance is ready, false otherwise.
-
getMinReadings
public abstract int getMinReadings()Gets minimum required number of readings to estimate power, position and path-loss exponent. This value depends on the number of parameters to be estimated, but for position only, this is 3 readings for 2D, and 4 readings for 3D.- Returns:
- minimum required number of readings.
-
getNumberOfDimensions
public abstract int getNumberOfDimensions()Gets number of dimensions of position points.- Returns:
- number of dimensions of position points.
-
getEstimatedPosition
Gets estimated radio source position.- Returns:
- estimated radio source position.
-
getEstimatedRadioSource
Gets estimated located radio source.- Type Parameters:
S- type of located radio source.- Returns:
- estimated located radio source.
-
estimate
public abstract void estimate() throws RadioSourceEstimationException, com.irurueta.navigation.NotReadyException, com.irurueta.navigation.LockedExceptionEstimate radio source.- Throws:
RadioSourceEstimationException- if estimation fails.com.irurueta.navigation.NotReadyException- if estimator is not ready.com.irurueta.navigation.LockedException- if estimator is locked.
-
internalSetReadings
Internally sets radio signal readings belonging to the same radio source.- Parameters:
readings- radio signal readings belonging to the same radio source.- Throws:
IllegalArgumentException- if readings are null or not enough readings are available.
-