Class LMedSRobustRssiRadioSourceEstimator3D<S extends RadioSource>
java.lang.Object
com.irurueta.navigation.indoor.radiosource.RobustRadioSourceEstimator<com.irurueta.geometry.Point3D,RssiReadingLocated<S,com.irurueta.geometry.Point3D>,RobustRssiRadioSourceEstimatorListener<S,com.irurueta.geometry.Point3D>>
com.irurueta.navigation.indoor.radiosource.RobustRssiRadioSourceEstimator<S,com.irurueta.geometry.Point3D>
com.irurueta.navigation.indoor.radiosource.RobustRssiRadioSourceEstimator3D<S>
com.irurueta.navigation.indoor.radiosource.LMedSRobustRssiRadioSourceEstimator3D<S>
- Type Parameters:
S- aRadioSourcetype.
public class LMedSRobustRssiRadioSourceEstimator3D<S extends RadioSource>
extends RobustRssiRadioSourceEstimator3D<S>
Robustly estimate 3D position, transmitted power and path-loss exponent of a radio source
(e.g. Wi-Fi access point or bluetooth beacon), by discarding outliers using LMedS
algorithm and assuming that the radio source emits isotropically following the
expression below:
Pr = Pt*Gt*Gr*lambda^2 / (4*pi*d)^2,
where Pr is the received power (expressed in mW),
Gt is the Gain of the transmission antenna
Gr is the Gain of the receiver antenna
d is the distance between emitter and receiver
and lambda is the wavelength and is equal to: lambda = c / f,
where c is the speed of light
and f is the carrier frequency of the radio signal.
Because usually information about the antenna of the radio source cannot be
retrieved (because many measurements are made on unknown access points where
physical access is not possible), this implementation will estimate the
equivalent transmitted power as: Pte = Pt * Gt * Gr.
If WifiReadings contain RSSI standard deviations, those values will be used,
otherwise it will be assumed an RSSI standard deviation of 1 dB.
Implementations of this class should be able to detect and discard outliers in
order to find the best solution.
IMPORTANT: When using this class estimation can be done using a combination of radio source position, transmitted power and path loss exponent. However enabling all three estimations usually achieves inaccurate results. When using this class, estimation must be of at least one parameter (position, transmitted power or path loss exponent) when initial values are provided for the other two, and at most it should consist of two parameters (either position and transmitted power, position and path loss exponent or transmitted power and path loss exponent), providing an initial value for the remaining parameter.
-
Nested Class Summary
Nested classes/interfaces inherited from class com.irurueta.navigation.indoor.radiosource.RobustRssiRadioSourceEstimator
RobustRssiRadioSourceEstimator.Solution<P extends com.irurueta.geometry.Point<?>> -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final doubleDefault value to be used for stop threshold.static final doubleMinimum allowed stop threshold value.private doubleThreshold to be used to keep the algorithm iterating in case that best estimated threshold using median of residuals is not small enough.Fields inherited from class com.irurueta.navigation.indoor.radiosource.RobustRssiRadioSourceEstimator3D
innerEstimatorFields inherited from class com.irurueta.navigation.indoor.radiosource.RobustRssiRadioSourceEstimator
estimatedPathLossExponent, estimatedPathLossExponentVariance, estimatedTransmittedPowerdBm, estimatedTransmittedPowerVariance, initialPathLossExponent, initialPosition, initialTransmittedPowerdBm, pathLossEstimationEnabled, positionEstimationEnabled, transmittedPowerEstimationEnabledFields 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
ConstructorsConstructorDescriptionConstructor.LMedSRobustRssiRadioSourceEstimator3D(com.irurueta.geometry.Point3D initialPosition) Constructor.LMedSRobustRssiRadioSourceEstimator3D(com.irurueta.geometry.Point3D initialPosition, RobustRssiRadioSourceEstimatorListener<S, com.irurueta.geometry.Point3D> listener) Constructor.LMedSRobustRssiRadioSourceEstimator3D(com.irurueta.geometry.Point3D initialPosition, Double initialTransmittedPowerdBm) Constructor.LMedSRobustRssiRadioSourceEstimator3D(com.irurueta.geometry.Point3D initialPosition, Double initialTransmittedPowerdBm, double initialPathLossExponent) Constructor.LMedSRobustRssiRadioSourceEstimator3D(com.irurueta.geometry.Point3D initialPosition, Double initialTransmittedPowerdBm, double initialPathLossExponent, RobustRssiRadioSourceEstimatorListener<S, com.irurueta.geometry.Point3D> listener) Constructor.LMedSRobustRssiRadioSourceEstimator3D(com.irurueta.geometry.Point3D initialPosition, Double initialTransmittedPowerdBm, RobustRssiRadioSourceEstimatorListener<S, com.irurueta.geometry.Point3D> listener) Constructor.LMedSRobustRssiRadioSourceEstimator3D(RobustRssiRadioSourceEstimatorListener<S, com.irurueta.geometry.Point3D> listener) Constructor.LMedSRobustRssiRadioSourceEstimator3D(Double initialTransmittedPowerdBm) Constructor.LMedSRobustRssiRadioSourceEstimator3D(Double initialTransmittedPowerdBm, RobustRssiRadioSourceEstimatorListener<S, com.irurueta.geometry.Point3D> listener) Constructor.LMedSRobustRssiRadioSourceEstimator3D(List<? extends RssiReadingLocated<S, com.irurueta.geometry.Point3D>> readings) Constructor.LMedSRobustRssiRadioSourceEstimator3D(List<? extends RssiReadingLocated<S, com.irurueta.geometry.Point3D>> readings, com.irurueta.geometry.Point3D initialPosition) Constructor.LMedSRobustRssiRadioSourceEstimator3D(List<? extends RssiReadingLocated<S, com.irurueta.geometry.Point3D>> readings, com.irurueta.geometry.Point3D initialPosition, RobustRssiRadioSourceEstimatorListener<S, com.irurueta.geometry.Point3D> listener) Constructor.LMedSRobustRssiRadioSourceEstimator3D(List<? extends RssiReadingLocated<S, com.irurueta.geometry.Point3D>> readings, com.irurueta.geometry.Point3D initialPosition, Double initialTransmittedPowerdBm) Constructor.LMedSRobustRssiRadioSourceEstimator3D(List<? extends RssiReadingLocated<S, com.irurueta.geometry.Point3D>> readings, com.irurueta.geometry.Point3D initialPosition, Double initialTransmittedPowerdBm, double initialPathLossExponent) Constructor.LMedSRobustRssiRadioSourceEstimator3D(List<? extends RssiReadingLocated<S, com.irurueta.geometry.Point3D>> readings, com.irurueta.geometry.Point3D initialPosition, Double initialTransmittedPowerdBm, double initialPathLossExponent, RobustRssiRadioSourceEstimatorListener<S, com.irurueta.geometry.Point3D> listener) Constructor.LMedSRobustRssiRadioSourceEstimator3D(List<? extends RssiReadingLocated<S, com.irurueta.geometry.Point3D>> readings, com.irurueta.geometry.Point3D initialPosition, Double initialTransmittedPowerdBm, RobustRssiRadioSourceEstimatorListener<S, com.irurueta.geometry.Point3D> listener) Constructor.LMedSRobustRssiRadioSourceEstimator3D(List<? extends RssiReadingLocated<S, com.irurueta.geometry.Point3D>> readings, RobustRssiRadioSourceEstimatorListener<S, com.irurueta.geometry.Point3D> listener) Constructor.LMedSRobustRssiRadioSourceEstimator3D(List<? extends RssiReadingLocated<S, com.irurueta.geometry.Point3D>> readings, Double initialTransmittedPowerdBm) Constructor.LMedSRobustRssiRadioSourceEstimator3D(List<? extends RssiReadingLocated<S, com.irurueta.geometry.Point3D>> readings, Double initialTransmittedPowerdBm, RobustRssiRadioSourceEstimatorListener<S, com.irurueta.geometry.Point3D> listener) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoidestimate()Robustly estimates position, transmitted power and path-loss exponent for a radio source.com.irurueta.numerical.robust.RobustEstimatorMethodReturns method being used for robust estimation.doubleReturns threshold to be used to keep the algorithm iterating in case that best estimated threshold using median of residuals is not small enough.voidsetStopThreshold(double stopThreshold) Sets threshold to be used to keep the algorithm iterating in case that best estimated threshold using median of residuals is not small enough.Methods inherited from class com.irurueta.navigation.indoor.radiosource.RobustRssiRadioSourceEstimator3D
attemptRefine, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, create, getEstimatedRadioSource, getMinReadings, getNumberOfDimensions, solvePreliminarySolutionsMethods inherited from class com.irurueta.navigation.indoor.radiosource.RobustRssiRadioSourceEstimator
getEstimatedPathLossExponent, getEstimatedPathLossExponentVariance, getEstimatedTransmittedPower, getEstimatedTransmittedPowerdBm, getEstimatedTransmittedPowerVariance, getInitialPathLossExponent, getInitialPosition, getInitialTransmittedPower, getInitialTransmittedPowerdBm, isPathLossEstimationEnabled, isPositionEstimationEnabled, isReady, isTransmittedPowerEstimationEnabled, residual, setInitialPathLossExponent, setInitialPosition, setInitialTransmittedPower, setInitialTransmittedPowerdBm, setPathLossEstimationEnabled, setPositionEstimationEnabled, setTransmittedPowerEstimationEnabledMethods inherited from class com.irurueta.navigation.indoor.radiosource.RobustRadioSourceEstimator
areValidReadings, getConfidence, getCovariance, getEstimatedPosition, getEstimatedPositionCovariance, getInliersData, getListener, getMaxIterations, getPreliminarySubsetSize, getProgressDelta, getQualityScores, getReadings, internalSetReadings, isCovarianceKept, isLocked, isResultRefined, setConfidence, setCovarianceKept, setListener, setMaxIterations, setPreliminarySubsetSize, setProgressDelta, setQualityScores, setReadings, setResultRefined
-
Field Details
-
DEFAULT_STOP_THRESHOLD
public static final double DEFAULT_STOP_THRESHOLDDefault value to be used for stop threshold. Stop threshold can be used to avoid keeping the algorithm unnecessarily iterating in case that best estimated threshold using median of residuals is not small enough. Once a solution is found that generates a threshold below this value, the algorithm will stop. The stop threshold can be used to prevent the LMedS algorithm iterating too many times in cases where samples have a very similar accuracy. For instance, in cases where proportion of outliers is very small (close to 0%), and samples are very accurate (i.e. 1e-6), the algorithm would iterate for a long time trying to find the best solution when indeed there is no need to do that if a reasonable threshold has already been reached. Because of this behaviour the stop threshold can be set to a value much lower than the one typically used in RANSAC, and yet the algorithm could still produce even smaller thresholds in estimated results.- See Also:
-
MIN_STOP_THRESHOLD
public static final double MIN_STOP_THRESHOLDMinimum allowed stop threshold value.- See Also:
-
stopThreshold
private double stopThresholdThreshold to be used to keep the algorithm iterating in case that best estimated threshold using median of residuals is not small enough. Once a solution is found that generates a threshold below this value, the algorithm will stop. The stop threshold can be used to prevent the LMedS algorithm iterating too many times in cases where samples have a very similar accuracy. For instance, in cases where proportion of outliers is very small (close to 0%), and samples are very accurate (i.e. 1e-6), the algorithm would iterate for a long time trying to find the best solution when indeed there is no need to do that if a reasonable threshold has already been reached. Because of this behaviour the stop threshold can be set to a value much lower than the one typically used in RANSAC, and yet the algorithm could still produce even smaller thresholds in estimated results.
-
-
Constructor Details
-
LMedSRobustRssiRadioSourceEstimator3D
public LMedSRobustRssiRadioSourceEstimator3D()Constructor. -
LMedSRobustRssiRadioSourceEstimator3D
public LMedSRobustRssiRadioSourceEstimator3D(List<? extends RssiReadingLocated<S, com.irurueta.geometry.Point3D>> readings) Constructor. Sets signal readings belonging to the same radio source.- Parameters:
readings- Wi-Fi signal readings belonging to the same radio source.- Throws:
IllegalArgumentException- if readings are not valid.
-
LMedSRobustRssiRadioSourceEstimator3D
public LMedSRobustRssiRadioSourceEstimator3D(List<? extends RssiReadingLocated<S, com.irurueta.geometry.Point3D>> readings, com.irurueta.geometry.Point3D initialPosition) Constructor. Sets signal readings belonging to the same radio source.- Parameters:
readings- 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.
-
LMedSRobustRssiRadioSourceEstimator3D
public LMedSRobustRssiRadioSourceEstimator3D(com.irurueta.geometry.Point3D initialPosition) Constructor.- Parameters:
initialPosition- initial position to start the estimation of radio source position.
-
LMedSRobustRssiRadioSourceEstimator3D
Constructor.- Parameters:
initialTransmittedPowerdBm- initial transmitted power to start the estimation of radio source transmitted power (expressed in dBm's)
-
LMedSRobustRssiRadioSourceEstimator3D
public LMedSRobustRssiRadioSourceEstimator3D(List<? extends RssiReadingLocated<S, com.irurueta.geometry.Point3D>> readings, Double initialTransmittedPowerdBm) Constructor. Sets signal readings belonging to the same radio source.- Parameters:
readings- signal readings belonging to the same radio source.initialTransmittedPowerdBm- initial transmitted power to start the estimation of radio source transmitted power (expressed in dBm's)- Throws:
IllegalArgumentException- if readings are not valid.
-
LMedSRobustRssiRadioSourceEstimator3D
public LMedSRobustRssiRadioSourceEstimator3D(List<? extends RssiReadingLocated<S, com.irurueta.geometry.Point3D>> readings, com.irurueta.geometry.Point3D initialPosition, Double initialTransmittedPowerdBm) Constructor. Sets signal readings belonging to the same radio source.- Parameters:
readings- signal readings belonging to the same radio source.initialPosition- initial position to start the estimation of radio source position.initialTransmittedPowerdBm- initial transmitted power to start the estimation of radio source transmitted power (expressed in dBm's).- Throws:
IllegalArgumentException- if readings are not valid.
-
LMedSRobustRssiRadioSourceEstimator3D
public LMedSRobustRssiRadioSourceEstimator3D(com.irurueta.geometry.Point3D initialPosition, Double initialTransmittedPowerdBm) Constructor.- Parameters:
initialPosition- initial position to start the estimation of radio source position.initialTransmittedPowerdBm- initial transmitted power to start the estimation of radio source transmitted power (expressed in dBm's).
-
LMedSRobustRssiRadioSourceEstimator3D
public LMedSRobustRssiRadioSourceEstimator3D(List<? extends RssiReadingLocated<S, com.irurueta.geometry.Point3D>> readings, com.irurueta.geometry.Point3D initialPosition, Double initialTransmittedPowerdBm, double initialPathLossExponent) Constructor. Sets signal readings belonging to the same radio source.- Parameters:
readings- signal readings belonging to the same radio source.initialPosition- initial position to start the estimation of radio source position.initialTransmittedPowerdBm- initial transmitted power to start the estimation of radio source transmitted power (expressed in dBm's).initialPathLossExponent- initial path loss exponent. A typical value is 2.0.- Throws:
IllegalArgumentException- if readings are not valid.
-
LMedSRobustRssiRadioSourceEstimator3D
public LMedSRobustRssiRadioSourceEstimator3D(com.irurueta.geometry.Point3D initialPosition, Double initialTransmittedPowerdBm, double initialPathLossExponent) Constructor.- Parameters:
initialPosition- initial position to start the estimation of radio source position.initialTransmittedPowerdBm- initial transmitted power to start the estimation of radio source transmitted power (expressed in dBm's).initialPathLossExponent- initial path loss exponent. A typical value is 2.0.
-
-
Method Details
-
getStopThreshold
public double getStopThreshold()Returns threshold to be used to keep the algorithm iterating in case that best estimated threshold using median of residuals is not small enough. Once a solution is found that generates a threshold below this value, the algorithm will stop. The stop threshold can be used to prevent the LMedS algorithm to iterate too many times in cases where samples have a very similar accuracy. For instance, in cases where proportion of outliers is very small (close to 0%), and samples are very accurate (i.e. 1e-6), the algorithm would iterate for a long time trying to find the best solution when indeed there is no need to do that if a reasonable threshold has already been reached. Because of this behaviour the stop threshold can be set to a value much lower than the one typically used in RANSAC, and yet the algorithm could still produce even smaller thresholds in estimated results.- Returns:
- stop threshold to stop the algorithm prematurely when a certain accuracy has been reached.
-
setStopThreshold
public void setStopThreshold(double stopThreshold) throws com.irurueta.navigation.LockedException Sets threshold to be used to keep the algorithm iterating in case that best estimated threshold using median of residuals is not small enough. Once a solution is found that generates a threshold below this value, the algorithm will stop. The stop threshold can be used to prevent the LMedS algorithm to iterate too many times in cases where samples have a very similar accuracy. For instance, in cases where proportion of outliers is very small (close to 0%), and samples are very accurate (i.e. 1e-6), the algorithm would iterate for a long time trying to find the best solution when indeed there is no need to do that if a reasonable threshold has already been reached. Because of this behaviour the stop threshold can be set to a value much lower than the one typically used in RANSAC, and yet the algorithm could still produce even smaller thresholds in estimated results.- Parameters:
stopThreshold- stop threshold to stop the algorithm prematurely when a certain accuracy has been reached.- Throws:
IllegalArgumentException- if provided value is zero or negative.com.irurueta.navigation.LockedException- if this solver is locked.
-
estimate
public void estimate() throws com.irurueta.navigation.LockedException, com.irurueta.navigation.NotReadyException, com.irurueta.numerical.robust.RobustEstimatorExceptionRobustly estimates position, transmitted power and path-loss exponent for a radio source.- Specified by:
estimatein classRobustRadioSourceEstimator<com.irurueta.geometry.Point3D,RssiReadingLocated<S extends RadioSource, com.irurueta.geometry.Point3D>, RobustRssiRadioSourceEstimatorListener<S extends RadioSource, com.irurueta.geometry.Point3D>> - Throws:
com.irurueta.navigation.LockedException- if instance is busy during estimation.com.irurueta.navigation.NotReadyException- if estimator is not ready.com.irurueta.numerical.robust.RobustEstimatorException- if estimation fails for any reason (i.e. numerical instability, no solution available, etc).
-
getMethod
public com.irurueta.numerical.robust.RobustEstimatorMethod getMethod()Returns method being used for robust estimation.- Specified by:
getMethodin classRobustRssiRadioSourceEstimator<S extends RadioSource,com.irurueta.geometry.Point3D> - Returns:
- method being used for robust estimation.
-