Class WindowedTriadNoiseEstimator<U extends Enum<?>,M extends com.irurueta.units.Measurement<U>,T extends Triad<U,M>,E extends WindowedTriadNoiseEstimator<U,M,T,E,L>,L extends WindowedTriadNoiseEstimatorListener<U,M,T,E>>

java.lang.Object
com.irurueta.navigation.inertial.calibration.noise.WindowedTriadNoiseEstimator<U,M,T,E,L>
Type Parameters:
U - a measurement unit type.
M - a measurement type.
T - a triad type.
E - an estimator type.
L - a listener type.
Direct Known Subclasses:
WindowedAccelerationTriadNoiseEstimator, WindowedAngularSpeedTriadNoiseEstimator, WindowedMagneticFluxDensityTriadNoiseEstimator

public abstract class WindowedTriadNoiseEstimator<U extends Enum<?>,M extends com.irurueta.units.Measurement<U>,T extends Triad<U,M>,E extends WindowedTriadNoiseEstimator<U,M,T,E,L>,L extends WindowedTriadNoiseEstimatorListener<U,M,T,E>> extends Object
Base class to estimate measurement noise variances and PSD's (Power Spectral Densities) along with average values for a windowed amount of samples. Implementations of this estimator must be used when the body where the measurement device is attached to remains static on the same position with zero velocity while capturing data. To compute PSD's, this estimator assumes that measurement samples are obtained at a constant provided rate equal to getTimeInterval() seconds. If not available, accelerometer sampling rate average can be estimated using TimeIntervalEstimator. This estimator does NOT require the knowledge of current location and body orientation. Because body location and orientation is not known, estimated average values cannot be used to determine biases. Only norm of noise estimations (variance or standard deviation) can be safely used. Notice that if there are less than getWindowSize() processed samples in the window, this estimator will assume that the remaining ones until the window is completed have zero values.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private double
    Contains estimated average of x coordinate of measurement expressed in its default unit (m/s^2 for acceleration, rad/s for angular speed or T for magnetic flux density).
    private double
    Contains estimated average of y coordinate of measurement expressed in its default unit (m/s^2 for acceleration, rad/s for angular speed or T for magnetic flux density).
    private double
    Contains estimated average of z coordinate of measurement expressed in its default unit (m/s^2 for acceleration, rad/s for angular speed or T for magnetic flux density).
    static final double
    Default time interval between accelerometer samples expressed in seconds (s).
    static final int
    Number of samples to keep within the window by default.
    private L
    Listener to handle events raised by this estimator.
    static final int
    Minimum allowed window size.
    private int
    Number of processed acceleration triad samples.
    private boolean
    Indicates whether estimator is running or not.
    private double
    Time interval expressed in seconds (s) between consecutive triad samples.
    private double
    Contains estimated variance of x coordinate of measurement expressed in its default squared unit (m^2/s^4 for acceleration, rad^2/s^2 for angular speed or T^2 for magnetic flux density).
    private double
    Contains estimated variance of y coordinate of measurement expressed in its default squared unit (m^2/s^4 for acceleration, rad^2/s^2 for angular speed or T^2 for magnetic flux density).
    private double
    Contains estimated variance of x coordinate of measurement expressed in its default squared unit (m^2/s^4 for acceleration, rad^2/s^2 for angular speed or T^2 for magnetic flux density).
    private final LinkedList<T>
    Keeps the list of triad samples that remain within the window.
    private int
    Length of number of samples to keep within the window being processed.
  • Constructor Summary

    Constructors
    Modifier
    Constructor
    Description
    protected
    Constructor.
    protected
    Constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addTriad(double valueX, double valueY, double valueZ)
    Adds a triad of measurement samples without processing current window or updating result values.
    void
    addTriad(M valueX, M valueY, M valueZ)
    Adds a triad of measurement samples without processing current window or updating result values.
    void
    addTriad(T triad)
    Adds a triad of measurement samples without processing current window or updating result values.
    void
    addTriadAndProcess(double valueX, double valueY, double valueZ)
    Adds a triad of measurement samples and processes current window.
    void
    addTriadAndProcess(M valueX, M valueY, M valueZ)
    Adds a triad of measurement samples and processes current window.
    void
    Adds a triad of measurement samples and processes current window.
    protected abstract T
    copyTriad(T input)
    Creates a copy of a triad.
    protected abstract M
    createMeasurement(double value, U unit)
    Creates a measurement with provided value and unit.
    protected abstract T
    createTriad(double valueX, double valueY, double valueZ, U unit)
    Creates a triad with provided values and unit.
    protected abstract T
    createTriad(M valueX, M valueY, M valueZ)
    Creates a triad with provided values.
    double
    Gets average of estimated standard deviation coordinates of measurement within current window expressed in its default unit (m/s^2 for acceleration, rad/s for angular speed or T for magnetic flux density).
    Gets average of estimated standard deviation coordinates of measurement within current window.
    void
    Gets average of estimated standard deviation coordinates of measurement within current window.
    double
    Gets average measurement noise PSD (Power Spectral Density) among x,y,z components expressed as (m^2 * s^-3) for accelerometer, (rad^2/s) for gyroscope or (T^2 * s) for magnetometer.
    double
    Gets norm of estimated average measurement within current window expressed in its default unit (m/s^2 for acceleration, rad/s for angular speed or T for magnetic flux density).
    Gets norm of estimated average measurement within current window.
    void
    Gets norm of estimated average measurement within current window.
    Gets estimated average as a measurement triad.
    void
    getAvgTriad(T result)
    Gets estimated average as a measurement triad.
    double
    Gets estimated average of x coordinate of measurement expressed in its default unit (m/s^2 for acceleration, rad/s for angular speed or T for magnetic flux density).
    Gets estimated average of x coordinate of measurement within current window.
    void
    Gets estimated average of x coordinate of measurement within current window.
    double
    Gets estimated average of y coordinate of measurement expressed in its default unit (m/s^2 for acceleration, rad/s for angular speed or T for magnetic flux density).
    Gets estimated average of y coordinate of measurement within current window.
    void
    Gets estimated average of y coordinate of measurement within current window.
    double
    Gets estimated average of z coordinate of measurement expressed in its default unit (m/s^2 for acceleration, rad/s for angular speed or T for magnetic flux density).
    Gets estimated average of z coordinate of measurement within current window.
    void
    Gets estimated average of z coordinate of measurement within current window.
    protected abstract U
    Gets default unit for a measurement.
    Gets first provided measurement triad within the window.
    boolean
    Gets first provided measurement triad within the window.
    Gets last provided measurement triad within the window.
    boolean
    Gets last provided measurement triad within the window.
    Gets listener to handle events raised by this estimator.
    double
    Gets norm of noise root PSD (Power Spectral Density) among x,y,z components expressed as (m * s^-1.5) for accelerometer, (rad * s^-0.5) for gyroscope or (T * s^0.5) for magnetometer.
    int
    Gets number of samples that have been processed so far.
    int
    Gets number of currently windowed samples.
    double
    Gets measurement noise PSD (Power Spectral Density) on x axis expressed in (m^2 * s^-3) for accelerometer, (rad^2/s) for gyroscope or (T^2 * s) for magnetometer.
    double
    Gets measurement noise PSD (Power Spectral Density) on y axis expressed in (m^2 * s^-3) for accelerometer, (rad^2/s) for gyroscope or (T^2 * s) for magnetometer.
    double
    Gets measurement noise PSD (Power Spectral Density) on z axis expressed in (m^2 * s^-3) for accelerometer, (rad^2/s) for gyroscope or (T^2 * s) for magnetometer.
    double
    Gets measurement noise root PSD (Power Spectral Density) on x axis expressed in (m * s^-1.5) for accelerometer, (rad * s^-0.5) for gyroscope or (T * s^0.5) for magnetometer.
    double
    Gets measurement noise root PSD (Power Spectral Density) on y axis expressed in (m * s^-1.5) for accelerometer, (rad * s^-0.5) for gyroscope or (T * s^0.5) for magnetometer.
    double
    Gets measurement noise root PSD (Power Spectral Density) on z axis expressed in (m * s^-1.5) for accelerometer, (rad * s^-0.5) for gyroscope or (T * s^0.5) for magnetometer.
    double
    Gets norm of estimated standard deviation of measurement within current window expressed in its default unit (m/s^2 for acceleration, rad/s for angular speed or T for magnetic flux density).
    Gets norm of estimated standard deviation of measurement within current window.
    void
    Gets norm of estimated standard deviation of measurement within current window.
    Gets estimated standard deviation of measurement within current window.
    void
    Gets estimated standard deviation of measurement within current window.
    double
    Gets estimated standard deviation of x coordinate of measurement within current window and expressed in its default unit (m/s^2 for acceleration, rad/s for angular speed or T for magnetic flux density).
    Gets estimated standard deviation of x coordinate of measurement within current window.
    void
    Gets estimated standard deviation of x coordinate of measurement within current window.
    double
    Gets estimated standard deviation of y coordinate of measurement within current window and expressed in its default unit (m/s^2 for acceleration, rad/s for angular speed or T for magnetic flux density).
    Gets estimated standard deviation of y coordinate of measurement within current window.
    void
    Gets estimated standard deviation of y coordinate of measurement within current window.
    double
    Gets estimated standard deviation of z coordinate of measurement within current window and expressed in its default unit (m/s^2 for acceleration, rad/s for angular speed or T for magnetic flux density).
    Gets estimated standard deviation of z coordinate of measurement within current window.
    void
    Gets estimated standard deviation of z coordinate of measurement within current window.
    double
    Gets time interval between triad samples expressed in seconds (s).
    com.irurueta.units.Time
    Gets time interval between triad samples.
    void
    getTimeIntervalAsTime(com.irurueta.units.Time result)
    Gets time interval between triad samples.
    double
    Gets estimated variance of x coordinate of measurement within current window expressed in its default squared unit (m^2/s^4 for acceleration, rad^2/s^2 for angular speed or T^2 for magnetic flux density).
    double
    Gets estimated variance of y coordinate of measurement within current window expressed in its default squared unit (m^2/s^4 for acceleration, rad^2/s^2 for angular speed or T^2 for magnetic flux density).
    double
    Gets estimated variance of z coordinate of measurement within current window expressed in its default squared unit (m^2/s^4 for acceleration, rad^2/s^2 for angular speed or T^2 for magnetic flux density).
    int
    Gets length of number of samples to keep within the window being processed.
    private void
    internalAdd(T triad, boolean process)
    Internally adds a triad of measurement samples and processes current window if indicated.
    boolean
    Indicates whether estimator is currently running or not.
    boolean
    Indicates whether window of samples is filled or not.
    private void
    Processes current windowed samples.
    boolean
    Resets current estimator.
    void
    setListener(L listener)
    Sets listener to handle events raised by this estimator.
    void
    setTimeInterval(double timeInterval)
    Sets time interval between triad samples expressed in seconds (s).
    void
    setTimeInterval(com.irurueta.units.Time timeInterval)
    Sets time interval between triad samples.
    void
    setWindowSize(int windowSize)
    Sets length of number of samples to keep within the window being processed.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • DEFAULT_WINDOW_SIZE

      public static final int DEFAULT_WINDOW_SIZE
      Number of samples to keep within the window by default. For an accelerometer generating 100 samples/second, this is equivalent to 1 second. For an accelerometer generating 50 samples/second, this is equivalent to 2 seconds.
      See Also:
    • MIN_WINDOW_SIZE

      public static final int MIN_WINDOW_SIZE
      Minimum allowed window size.
      See Also:
    • DEFAULT_TIME_INTERVAL_SECONDS

      public static final double DEFAULT_TIME_INTERVAL_SECONDS
      Default time interval between accelerometer samples expressed in seconds (s).
      See Also:
    • windowSize

      private int windowSize
      Length of number of samples to keep within the window being processed. Window size must always be larger than allowed minimum value and must have an odd value.
    • timeInterval

      private double timeInterval
      Time interval expressed in seconds (s) between consecutive triad samples.
    • windowedSamples

      private final LinkedList<T extends Triad<U,M>> windowedSamples
      Keeps the list of triad samples that remain within the window.
    • listener

      private L extends WindowedTriadNoiseEstimatorListener<U,M,T,E> listener
      Listener to handle events raised by this estimator.
    • avgX

      private double avgX
      Contains estimated average of x coordinate of measurement expressed in its default unit (m/s^2 for acceleration, rad/s for angular speed or T for magnetic flux density).
    • avgY

      private double avgY
      Contains estimated average of y coordinate of measurement expressed in its default unit (m/s^2 for acceleration, rad/s for angular speed or T for magnetic flux density).
    • avgZ

      private double avgZ
      Contains estimated average of z coordinate of measurement expressed in its default unit (m/s^2 for acceleration, rad/s for angular speed or T for magnetic flux density).
    • varianceX

      private double varianceX
      Contains estimated variance of x coordinate of measurement expressed in its default squared unit (m^2/s^4 for acceleration, rad^2/s^2 for angular speed or T^2 for magnetic flux density).
    • varianceY

      private double varianceY
      Contains estimated variance of y coordinate of measurement expressed in its default squared unit (m^2/s^4 for acceleration, rad^2/s^2 for angular speed or T^2 for magnetic flux density).
    • varianceZ

      private double varianceZ
      Contains estimated variance of x coordinate of measurement expressed in its default squared unit (m^2/s^4 for acceleration, rad^2/s^2 for angular speed or T^2 for magnetic flux density).
    • numberOfProcessedSamples

      private int numberOfProcessedSamples
      Number of processed acceleration triad samples.
    • running

      private boolean running
      Indicates whether estimator is running or not.
  • Constructor Details

    • WindowedTriadNoiseEstimator

      protected WindowedTriadNoiseEstimator()
      Constructor.
    • WindowedTriadNoiseEstimator

      protected WindowedTriadNoiseEstimator(L listener)
      Constructor.
      Parameters:
      listener - listener to handle events raised by this estimator.
  • Method Details

    • getWindowSize

      public int getWindowSize()
      Gets length of number of samples to keep within the window being processed. Window size must always be larger than allowed minimum value and must have an odd value.
      Returns:
      length of number of samples to keep within the window.
    • setWindowSize

      public void setWindowSize(int windowSize) throws com.irurueta.navigation.LockedException
      Sets length of number of samples to keep within the window being processed. Window size must always be larger than allowed minimum value and must have an odd value. When window size is modified, instance state is reset.
      Parameters:
      windowSize - length of number of samples to keep within the window.
      Throws:
      IllegalArgumentException - if provided value is not valid.
      com.irurueta.navigation.LockedException - if estimator is currently running.
    • getTimeInterval

      public double getTimeInterval()
      Gets time interval between triad samples expressed in seconds (s).
      Returns:
      time interval between triad samples.
    • setTimeInterval

      public void setTimeInterval(double timeInterval) throws com.irurueta.navigation.LockedException
      Sets time interval between triad samples expressed in seconds (s).
      Parameters:
      timeInterval - time interval between triad samples.
      Throws:
      IllegalArgumentException - if provided value is negative.
      com.irurueta.navigation.LockedException - if estimator is currently running.
    • getTimeIntervalAsTime

      public com.irurueta.units.Time getTimeIntervalAsTime()
      Gets time interval between triad samples.
      Returns:
      time interval between triad samples.
    • getTimeIntervalAsTime

      public void getTimeIntervalAsTime(com.irurueta.units.Time result)
      Gets time interval between triad samples.
      Parameters:
      result - instance where time interval will be stored.
    • setTimeInterval

      public void setTimeInterval(com.irurueta.units.Time timeInterval) throws com.irurueta.navigation.LockedException
      Sets time interval between triad samples.
      Parameters:
      timeInterval - time interval between triad samples.
      Throws:
      com.irurueta.navigation.LockedException - if estimator is currently running.
    • getListener

      public L getListener()
      Gets listener to handle events raised by this estimator.
      Returns:
      listener to handle events raised by this estimator.
    • setListener

      public void setListener(L listener) throws com.irurueta.navigation.LockedException
      Sets listener to handle events raised by this estimator.
      Parameters:
      listener - listener to handle events raised by this estimator.
      Throws:
      com.irurueta.navigation.LockedException - if this estimator is running.
    • getFirstWindowedTriad

      public T getFirstWindowedTriad()
      Gets first provided measurement triad within the window.
      Returns:
      first provided measurement triad within the window or null if not available.
    • getFirstWindowedTriad

      public boolean getFirstWindowedTriad(T result)
      Gets first provided measurement triad within the window.
      Parameters:
      result - instance where first provided measurement triad will be stored.
      Returns:
      true if result instance was updated, false otherwise.
    • getLastWindowedTriad

      public T getLastWindowedTriad()
      Gets last provided measurement triad within the window.
      Returns:
      last provided measurement triad within the window or null if not available.
    • getLastWindowedTriad

      public boolean getLastWindowedTriad(T result)
      Gets last provided measurement triad within the window.
      Parameters:
      result - instance where last provided measurement triad will be stored.
      Returns:
      true if result instance was updated, false otherwise.
    • getAvgX

      public double getAvgX()
      Gets estimated average of x coordinate of measurement expressed in its default unit (m/s^2 for acceleration, rad/s for angular speed or T for magnetic flux density). This value will depend of body location and orientation, hence it should never be used as a calibration bias.
      Returns:
      average of x coordinate of measurement in current window.
    • getAvgXAsMeasurement

      public M getAvgXAsMeasurement()
      Gets estimated average of x coordinate of measurement within current window. This value will depend of body location and orientation, hence it should never be used as a calibration bias.
      Returns:
      average of x coordinate of measurement in current window.
    • getAvgXAsMeasurement

      public void getAvgXAsMeasurement(M result)
      Gets estimated average of x coordinate of measurement within current window. This value will depend of body location and orientation, hence it should never be used as a calibration bias.
      Parameters:
      result - instance where average of x coordinate of measurement will be stored.
    • getAvgY

      public double getAvgY()
      Gets estimated average of y coordinate of measurement expressed in its default unit (m/s^2 for acceleration, rad/s for angular speed or T for magnetic flux density). This value will depend of body location and orientation, hence it should never be used as a calibration bias.
      Returns:
      average of y coordinate of measurement in current window.
    • getAvgYAsMeasurement

      public M getAvgYAsMeasurement()
      Gets estimated average of y coordinate of measurement within current window. This value will depend of body location and orientation, hence it should never be used as a calibration bias.
      Returns:
      average of y coordinate of measurement in current window.
    • getAvgYAsMeasurement

      public void getAvgYAsMeasurement(M result)
      Gets estimated average of y coordinate of measurement within current window. This value will depend of body location and orientation, hence it should never be used as a calibration bias.
      Parameters:
      result - instance where average of y coordinate of measurement will be stored.
    • getAvgZ

      public double getAvgZ()
      Gets estimated average of z coordinate of measurement expressed in its default unit (m/s^2 for acceleration, rad/s for angular speed or T for magnetic flux density). This value will depend of body location and orientation, hence it should never be used as a calibration bias.
      Returns:
      average of z coordinate of measurement in current window.
    • getAvgZAsMeasurement

      public M getAvgZAsMeasurement()
      Gets estimated average of z coordinate of measurement within current window. This value will depend of body location and orientation, hence it should never be used as a calibration bias.
      Returns:
      average of z coordinate of measurement in current window.
    • getAvgZAsMeasurement

      public void getAvgZAsMeasurement(M result)
      Gets estimated average of z coordinate of measurement within current window. This value will depend of body location and orientation, hence it should never be used as a calibration bias.
      Parameters:
      result - instance where average of z coordinate of measurement will be stored.
    • getAvgTriad

      public T getAvgTriad()
      Gets estimated average as a measurement triad.
      Returns:
      average measurement triad.
    • getAvgTriad

      public void getAvgTriad(T result)
      Gets estimated average as a measurement triad.
      Parameters:
      result - instance where average values and unit will be stored.
    • getAvgNorm

      public double getAvgNorm()
      Gets norm of estimated average measurement within current window expressed in its default unit (m/s^2 for acceleration, rad/s for angular speed or T for magnetic flux density). This value is independent of body orientation.
      Returns:
      norm of estimated average specific force.
    • getAvgNormAsMeasurement

      public M getAvgNormAsMeasurement()
      Gets norm of estimated average measurement within current window.
      Returns:
      norm of estimated average measurement.
    • getAvgNormAsMeasurement

      public void getAvgNormAsMeasurement(M result)
      Gets norm of estimated average measurement within current window.
      Parameters:
      result - instance where norm of estimated average measurement will be stored.
    • getVarianceX

      public double getVarianceX()
      Gets estimated variance of x coordinate of measurement within current window expressed in its default squared unit (m^2/s^4 for acceleration, rad^2/s^2 for angular speed or T^2 for magnetic flux density).
      Returns:
      estimated variance of x coordinate of measurement within current window.
    • getVarianceY

      public double getVarianceY()
      Gets estimated variance of y coordinate of measurement within current window expressed in its default squared unit (m^2/s^4 for acceleration, rad^2/s^2 for angular speed or T^2 for magnetic flux density).
      Returns:
      estimated variance of y coordinate of measurement within current window.
    • getVarianceZ

      public double getVarianceZ()
      Gets estimated variance of z coordinate of measurement within current window expressed in its default squared unit (m^2/s^4 for acceleration, rad^2/s^2 for angular speed or T^2 for magnetic flux density).
      Returns:
      estimated variance of z coordinate of measurement within current window.
    • getStandardDeviationX

      public double getStandardDeviationX()
      Gets estimated standard deviation of x coordinate of measurement within current window and expressed in its default unit (m/s^2 for acceleration, rad/s for angular speed or T for magnetic flux density).
      Returns:
      estimated standard deviation of x coordinate of measurement within current window.
    • getStandardDeviationXAsMeasurement

      public M getStandardDeviationXAsMeasurement()
      Gets estimated standard deviation of x coordinate of measurement within current window.
      Returns:
      estimated standard deviation of x coordinate of measurement.
    • getStandardDeviationXAsMeasurement

      public void getStandardDeviationXAsMeasurement(M result)
      Gets estimated standard deviation of x coordinate of measurement within current window.
      Parameters:
      result - instance where estimated standard deviation of x coordinate of measurement will be stored.
    • getStandardDeviationY

      public double getStandardDeviationY()
      Gets estimated standard deviation of y coordinate of measurement within current window and expressed in its default unit (m/s^2 for acceleration, rad/s for angular speed or T for magnetic flux density).
      Returns:
      estimated standard deviation of y coordinate of measurement within current window.
    • getStandardDeviationYAsMeasurement

      public M getStandardDeviationYAsMeasurement()
      Gets estimated standard deviation of y coordinate of measurement within current window.
      Returns:
      estimated standard deviation of y coordinate of measurement.
    • getStandardDeviationYAsMeasurement

      public void getStandardDeviationYAsMeasurement(M result)
      Gets estimated standard deviation of y coordinate of measurement within current window.
      Parameters:
      result - instance where estimated standard deviation of y coordinate of measurement will be stored.
    • getStandardDeviationZ

      public double getStandardDeviationZ()
      Gets estimated standard deviation of z coordinate of measurement within current window and expressed in its default unit (m/s^2 for acceleration, rad/s for angular speed or T for magnetic flux density).
      Returns:
      estimated standard deviation of z coordinate of measurement within current window.
    • getStandardDeviationZAsMeasurement

      public M getStandardDeviationZAsMeasurement()
      Gets estimated standard deviation of z coordinate of measurement within current window.
      Returns:
      estimated standard deviation of z coordinate of measurement.
    • getStandardDeviationZAsMeasurement

      public void getStandardDeviationZAsMeasurement(M result)
      Gets estimated standard deviation of z coordinate of measurement within current window.
      Parameters:
      result - instance where estimated standard deviation of z coordinate of measurement will be stored.
    • getStandardDeviationTriad

      public T getStandardDeviationTriad()
      Gets estimated standard deviation of measurement within current window.
      Returns:
      estimated standard deviation triad of measurement.
    • getStandardDeviationTriad

      public void getStandardDeviationTriad(T result)
      Gets estimated standard deviation of measurement within current window.
      Parameters:
      result - instance where estimated standard deviation triad of measurement will be stored.
    • getStandardDeviationNorm

      public double getStandardDeviationNorm()
      Gets norm of estimated standard deviation of measurement within current window expressed in its default unit (m/s^2 for acceleration, rad/s for angular speed or T for magnetic flux density).
      Returns:
      norm of estimated standard deviation of measurement.
    • getStandardDeviationNormAsMeasurement

      public M getStandardDeviationNormAsMeasurement()
      Gets norm of estimated standard deviation of measurement within current window.
      Returns:
      norm of estimated standard deviation of measurement.
    • getStandardDeviationNormAsMeasurement

      public void getStandardDeviationNormAsMeasurement(M result)
      Gets norm of estimated standard deviation of measurement within current window.
      Parameters:
      result - instance where norm of estimated standard deviation will be stored.
    • getAverageStandardDeviation

      public double getAverageStandardDeviation()
      Gets average of estimated standard deviation coordinates of measurement within current window expressed in its default unit (m/s^2 for acceleration, rad/s for angular speed or T for magnetic flux density).
      Returns:
      average of estimated standard deviation coordinates.
    • getAverageStandardDeviationAsMeasurement

      public M getAverageStandardDeviationAsMeasurement()
      Gets average of estimated standard deviation coordinates of measurement within current window.
      Returns:
      average of estimated standard deviation coordinates.
    • getAverageStandardDeviationAsMeasurement

      public void getAverageStandardDeviationAsMeasurement(M result)
      Gets average of estimated standard deviation coordinates of measurement within current window.
      Parameters:
      result - instance where average of estimated standard deviation coordinates will be stored.
    • getPsdX

      public double getPsdX()
      Gets measurement noise PSD (Power Spectral Density) on x axis expressed in (m^2 * s^-3) for accelerometer, (rad^2/s) for gyroscope or (T^2 * s) for magnetometer.
      Returns:
      measurement noise PSD on x axis.
    • getPsdY

      public double getPsdY()
      Gets measurement noise PSD (Power Spectral Density) on y axis expressed in (m^2 * s^-3) for accelerometer, (rad^2/s) for gyroscope or (T^2 * s) for magnetometer.
      Returns:
      measurement noise PSD on y axis.
    • getPsdZ

      public double getPsdZ()
      Gets measurement noise PSD (Power Spectral Density) on z axis expressed in (m^2 * s^-3) for accelerometer, (rad^2/s) for gyroscope or (T^2 * s) for magnetometer.
      Returns:
      measurement noise PSD on z axis.
    • getRootPsdX

      public double getRootPsdX()
      Gets measurement noise root PSD (Power Spectral Density) on x axis expressed in (m * s^-1.5) for accelerometer, (rad * s^-0.5) for gyroscope or (T * s^0.5) for magnetometer.
      Returns:
      measurement noise root PSD on x axis.
    • getRootPsdY

      public double getRootPsdY()
      Gets measurement noise root PSD (Power Spectral Density) on y axis expressed in (m * s^-1.5) for accelerometer, (rad * s^-0.5) for gyroscope or (T * s^0.5) for magnetometer.
      Returns:
      measurement noise root PSD on y axis.
    • getRootPsdZ

      public double getRootPsdZ()
      Gets measurement noise root PSD (Power Spectral Density) on z axis expressed in (m * s^-1.5) for accelerometer, (rad * s^-0.5) for gyroscope or (T * s^0.5) for magnetometer.
      Returns:
      measurement noise root PSD on z axis.
    • getAvgNoisePsd

      public double getAvgNoisePsd()
      Gets average measurement noise PSD (Power Spectral Density) among x,y,z components expressed as (m^2 * s^-3) for accelerometer, (rad^2/s) for gyroscope or (T^2 * s) for magnetometer.
      Returns:
      average measurement noise PSD.
    • getNoiseRootPsdNorm

      public double getNoiseRootPsdNorm()
      Gets norm of noise root PSD (Power Spectral Density) among x,y,z components expressed as (m * s^-1.5) for accelerometer, (rad * s^-0.5) for gyroscope or (T * s^0.5) for magnetometer.
      Returns:
      norm of measurement noise root PSD.
    • getNumberOfProcessedSamples

      public int getNumberOfProcessedSamples()
      Gets number of samples that have been processed so far.
      Returns:
      number of samples that have been processed so far.
    • getNumberOfSamplesInWindow

      public int getNumberOfSamplesInWindow()
      Gets number of currently windowed samples.
      Returns:
      number of samples within the window.
    • isRunning

      public boolean isRunning()
      Indicates whether estimator is currently running or not.
      Returns:
      true if estimator is running, false otherwise.
    • isWindowFilled

      public boolean isWindowFilled()
      Indicates whether window of samples is filled or not.
      Returns:
      true if window is filled, false otherwise.
    • addTriadAndProcess

      public void addTriadAndProcess(T triad) throws com.irurueta.navigation.LockedException
      Adds a triad of measurement samples and processes current window. Notice that if there are less than getWindowSize() processed samples in the window, the remaining ones are considered to be zero when average values and standard deviation is estimated.
      Parameters:
      triad - measurement triad to be added and processed.
      Throws:
      com.irurueta.navigation.LockedException - if estimator is currently running.
    • addTriadAndProcess

      public void addTriadAndProcess(double valueX, double valueY, double valueZ) throws com.irurueta.navigation.LockedException
      Adds a triad of measurement samples and processes current window. Values are expressed in measurement default unit (m/s^2 for acceleration, rad/s for angular speed or T for magnetic flux density). Notice that if there are less than getWindowSize() processed samples in the window, the remaining ones are considered to be zero when average values and standard deviation is estimated.
      Parameters:
      valueX - x coordinate of measurement to be added and processed.
      valueY - y coordinate of measurement to be added and processed.
      valueZ - z coordinate of measurement to be added and processed.
      Throws:
      com.irurueta.navigation.LockedException - if estimator is currently running.
    • addTriadAndProcess

      public void addTriadAndProcess(M valueX, M valueY, M valueZ) throws com.irurueta.navigation.LockedException
      Adds a triad of measurement samples and processes current window. Notice that if there are less than getWindowSize() processed samples in the window, the remaining ones are considered to be zero when average values and standard deviation is estimated.
      Parameters:
      valueX - x coordinate of measurement to be added and processed.
      valueY - y coordinate of measurement to be added and processed.
      valueZ - z coordinate of measurement to be added and processed.
      Throws:
      com.irurueta.navigation.LockedException - if estimator is currently running.
    • addTriad

      public void addTriad(T triad) throws com.irurueta.navigation.LockedException
      Adds a triad of measurement samples without processing current window or updating result values. Notice that if there are less than getWindowSize() processed samples in the window, the remaining ones are considered to be zero when average values and standard deviation is estimated.
      Parameters:
      triad - measurement triad to be added.
      Throws:
      com.irurueta.navigation.LockedException - if estimator is currently running.
    • addTriad

      public void addTriad(double valueX, double valueY, double valueZ) throws com.irurueta.navigation.LockedException
      Adds a triad of measurement samples without processing current window or updating result values. Values are expressed in measurement default unit (m/s^2 for acceleration, rad/s for angular speed or T for magnetic flux density). Notice that if there are less than getWindowSize() processed samples in the window, the remaining ones are considered to be zero when average values and standard deviation is estimated.
      Parameters:
      valueX - x coordinate of measurement to be added.
      valueY - y coordinate of measurement to be added.
      valueZ - z coordinate of measurement to be added.
      Throws:
      com.irurueta.navigation.LockedException - if estimator is currently running.
    • addTriad

      public void addTriad(M valueX, M valueY, M valueZ) throws com.irurueta.navigation.LockedException
      Adds a triad of measurement samples without processing current window or updating result values. Notice that if there are less than getWindowSize() processed samples in the window, the remaining ones are considered to be zero when average values and standard deviation is estimated.
      Parameters:
      valueX - x coordinate of measurement to be added.
      valueY - y coordinate of measurement to be added.
      valueZ - z coordinate of measurement to be added.
      Throws:
      com.irurueta.navigation.LockedException - if estimator is currently running.
    • reset

      public boolean reset() throws com.irurueta.navigation.LockedException
      Resets current estimator.
      Returns:
      true if estimator was successfully reset, false if no reset was needed.
      Throws:
      com.irurueta.navigation.LockedException - if estimator is currently running.
    • copyTriad

      protected abstract T copyTriad(T input)
      Creates a copy of a triad.
      Parameters:
      input - triad to be copied.
      Returns:
      copy of a triad.
    • createTriad

      protected abstract T createTriad(double valueX, double valueY, double valueZ, U unit)
      Creates a triad with provided values and unit.
      Parameters:
      valueX - x coordinate value.
      valueY - y coordinate value.
      valueZ - z coordinate value.
      unit - unit.
      Returns:
      created triad.
    • createTriad

      protected abstract T createTriad(M valueX, M valueY, M valueZ)
      Creates a triad with provided values.
      Parameters:
      valueX - x coordinate value.
      valueY - y coordinate value.
      valueZ - z coordinate value.
      Returns:
      created triad.
    • getDefaultUnit

      protected abstract U getDefaultUnit()
      Gets default unit for a measurement.
      Returns:
      default unit for a measurement.
    • createMeasurement

      protected abstract M createMeasurement(double value, U unit)
      Creates a measurement with provided value and unit.
      Parameters:
      value - value to be set.
      unit - unit to be set.
      Returns:
      created measurement.
    • internalAdd

      private void internalAdd(T triad, boolean process) throws com.irurueta.navigation.LockedException
      Internally adds a triad of measurement samples and processes current window if indicated.
      Parameters:
      triad - measurement triad to be added.
      process - true if window of samples must also be processed, false otherwise.
      Throws:
      com.irurueta.navigation.LockedException - if estimator is currently running.
    • processWindow

      private void processWindow()
      Processes current windowed samples.