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 - a Point type.
R - a ReadingLocated type.
L - a RadioSourceEstimatorListener type.
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 Details

    • estimatedPositionCoordinates

      protected double[] estimatedPositionCoordinates
      Estimated position.
    • estimatedCovariance

      protected com.irurueta.algebra.Matrix estimatedCovariance
      Covariance 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 estimatedPositionCovariance
      Covariance 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

      protected List<? extends R extends ReadingLocated<P>> readings
      Located signal readings belonging to the same radio source to be estimated.
    • locked

      protected boolean locked
      Indicates whether estimator is locked during estimation.
    • listener

      protected L extends RadioSourceEstimatorListener<? extends RadioSourceEstimator<?,?,?>> listener
      Listener in charge of attending events raised by this instance.
  • Constructor Details

    • RadioSourceEstimator

      protected RadioSourceEstimator()
      Constructor.
    • RadioSourceEstimator

      protected RadioSourceEstimator(List<? extends R> readings)
      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

      protected RadioSourceEstimator(L listener)
      Constructor.
      Parameters:
      listener - listener in charge of attending events raised by this instance.
    • RadioSourceEstimator

      protected RadioSourceEstimator(List<? extends R> readings, L listener)
      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

      public List<R> 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

      public void setReadings(List<? extends R> readings) throws com.irurueta.navigation.LockedException
      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

      public L getListener()
      Gets listener in charge of attending events raised by this instance.
      Returns:
      listener in charge of attending events raised by this instance.
    • setListener

      public void setListener(L listener) throws com.irurueta.navigation.LockedException
      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

      public boolean areValidReadings(List<? extends R> readings)
      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

      public void getEstimatedPosition(P estimatedPosition)
      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

      public abstract P getEstimatedPosition()
      Gets estimated radio source position.
      Returns:
      estimated radio source position.
    • getEstimatedRadioSource

      public abstract <S extends RadioSourceLocated<P>> S 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.LockedException
      Estimate 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

      protected void internalSetReadings(List<? extends R> readings)
      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.