Class WindowedTriadNoiseEstimator<U extends Enum<?>,M extends com.irurueta.units.Measurement<U>,T extends Triad<U,M,T>,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,T>,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
FieldsModifier and TypeFieldDescriptionprivate doubleContains 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 doubleContains 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 doubleContains 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 doubleDefault time interval between accelerometer samples expressed in seconds (s).static final intNumber of samples to keep within the window by default.private LListener to handle events raised by this estimator.static final intMinimum allowed window size.private intNumber of processed acceleration triad samples.private booleanIndicates whether estimator is running or not.private doubleTime interval expressed in seconds (s) between consecutive triad samples.private doubleContains 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 doubleContains 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 doubleContains 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 intLength of number of samples to keep within the window being processed. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedConstructor.protectedWindowedTriadNoiseEstimator(L listener) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoidaddTriad(double valueX, double valueY, double valueZ) Adds a triad of measurement samples without processing current window or updating result values.voidAdds a triad of measurement samples without processing current window or updating result values.voidAdds a triad of measurement samples without processing current window or updating result values.voidaddTriadAndProcess(double valueX, double valueY, double valueZ) Adds a triad of measurement samples and processes current window.voidaddTriadAndProcess(M valueX, M valueY, M valueZ) Adds a triad of measurement samples and processes current window.voidaddTriadAndProcess(T triad) Adds a triad of measurement samples and processes current window.protected abstract TCreates a copy of a triad.protected abstract McreateMeasurement(double value, U unit) Creates a measurement with provided value and unit.protected abstract TcreateTriad(double valueX, double valueY, double valueZ, U unit) Creates a triad with provided values and unit.protected abstract TcreateTriad(M valueX, M valueY, M valueZ) Creates a triad with provided values.doubleGets 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.voidGets average of estimated standard deviation coordinates of measurement within current window.doubleGets 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.doubleGets 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.voidgetAvgNormAsMeasurement(M result) Gets norm of estimated average measurement within current window.Gets estimated average as a measurement triad.voidgetAvgTriad(T result) Gets estimated average as a measurement triad.doublegetAvgX()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.voidgetAvgXAsMeasurement(M result) Gets estimated average of x coordinate of measurement within current window.doublegetAvgY()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.voidgetAvgYAsMeasurement(M result) Gets estimated average of y coordinate of measurement within current window.doublegetAvgZ()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.voidgetAvgZAsMeasurement(M result) Gets estimated average of z coordinate of measurement within current window.protected abstract UGets default unit for a measurement.Gets first provided measurement triad within the window.booleangetFirstWindowedTriad(T result) Gets first provided measurement triad within the window.Gets last provided measurement triad within the window.booleangetLastWindowedTriad(T result) Gets last provided measurement triad within the window.Gets listener to handle events raised by this estimator.doubleGets 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.intGets number of samples that have been processed so far.intGets number of currently windowed samples.doublegetPsdX()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.doublegetPsdY()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.doublegetPsdZ()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.doubleGets 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.doubleGets 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.doubleGets 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.doubleGets 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.voidGets norm of estimated standard deviation of measurement within current window.Gets estimated standard deviation of measurement within current window.voidgetStandardDeviationTriad(T result) Gets estimated standard deviation of measurement within current window.doubleGets 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.voidgetStandardDeviationXAsMeasurement(M result) Gets estimated standard deviation of x coordinate of measurement within current window.doubleGets 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.voidgetStandardDeviationYAsMeasurement(M result) Gets estimated standard deviation of y coordinate of measurement within current window.doubleGets 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.voidgetStandardDeviationZAsMeasurement(M result) Gets estimated standard deviation of z coordinate of measurement within current window.doubleGets time interval between triad samples expressed in seconds (s).com.irurueta.units.TimeGets time interval between triad samples.voidgetTimeIntervalAsTime(com.irurueta.units.Time result) Gets time interval between triad samples.doubleGets 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).doubleGets 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).doubleGets 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).intGets length of number of samples to keep within the window being processed.private voidinternalAdd(T triad, boolean process) Internally adds a triad of measurement samples and processes current window if indicated.booleanIndicates whether estimator is currently running or not.booleanIndicates whether window of samples is filled or not.private voidProcesses current windowed samples.booleanreset()Resets current estimator.voidsetListener(L listener) Sets listener to handle events raised by this estimator.voidsetTimeInterval(double timeInterval) Sets time interval between triad samples expressed in seconds (s).voidsetTimeInterval(com.irurueta.units.Time timeInterval) Sets time interval between triad samples.voidsetWindowSize(int windowSize) Sets length of number of samples to keep within the window being processed.
-
Field Details
-
DEFAULT_WINDOW_SIZE
public static final int DEFAULT_WINDOW_SIZENumber 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_SIZEMinimum allowed window size.- See Also:
-
DEFAULT_TIME_INTERVAL_SECONDS
public static final double DEFAULT_TIME_INTERVAL_SECONDSDefault time interval between accelerometer samples expressed in seconds (s).- See Also:
-
windowSize
private int windowSizeLength 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 timeIntervalTime interval expressed in seconds (s) between consecutive triad samples. -
windowedSamples
Keeps the list of triad samples that remain within the window. -
listener
Listener to handle events raised by this estimator. -
avgX
private double avgXContains 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 avgYContains 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 avgZContains 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 varianceXContains 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 varianceYContains 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 varianceZContains 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 numberOfProcessedSamplesNumber of processed acceleration triad samples. -
running
private boolean runningIndicates whether estimator is running or not.
-
-
Constructor Details
-
WindowedTriadNoiseEstimator
protected WindowedTriadNoiseEstimator()Constructor. -
WindowedTriadNoiseEstimator
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
Gets listener to handle events raised by this estimator.- Returns:
- listener to handle events raised by this estimator.
-
setListener
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
Gets first provided measurement triad within the window.- Returns:
- first provided measurement triad within the window or null if not available.
-
getFirstWindowedTriad
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
Gets last provided measurement triad within the window.- Returns:
- last provided measurement triad within the window or null if not available.
-
getLastWindowedTriad
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
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
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
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
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
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
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
Gets estimated average as a measurement triad.- Returns:
- average measurement triad.
-
getAvgTriad
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
Gets norm of estimated average measurement within current window.- Returns:
- norm of estimated average measurement.
-
getAvgNormAsMeasurement
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
Gets estimated standard deviation of x coordinate of measurement within current window.- Returns:
- estimated standard deviation of x coordinate of measurement.
-
getStandardDeviationXAsMeasurement
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
Gets estimated standard deviation of y coordinate of measurement within current window.- Returns:
- estimated standard deviation of y coordinate of measurement.
-
getStandardDeviationYAsMeasurement
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
Gets estimated standard deviation of z coordinate of measurement within current window.- Returns:
- estimated standard deviation of z coordinate of measurement.
-
getStandardDeviationZAsMeasurement
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
Gets estimated standard deviation of measurement within current window.- Returns:
- estimated standard deviation triad of measurement.
-
getStandardDeviationTriad
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
Gets norm of estimated standard deviation of measurement within current window.- Returns:
- norm of estimated standard deviation of measurement.
-
getStandardDeviationNormAsMeasurement
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
Gets average of estimated standard deviation coordinates of measurement within current window.- Returns:
- average of estimated standard deviation coordinates.
-
getAverageStandardDeviationAsMeasurement
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
Adds a triad of measurement samples and processes current window. Notice that if there are less thangetWindowSize()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 thangetWindowSize()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 thangetWindowSize()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
Adds a triad of measurement samples without processing current window or updating result values. Notice that if there are less thangetWindowSize()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 thangetWindowSize()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
Adds a triad of measurement samples without processing current window or updating result values. Notice that if there are less thangetWindowSize()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.LockedExceptionResets 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
Creates a copy of a triad.- Parameters:
input- triad to be copied.- Returns:
- copy of a triad.
-
createTriad
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
Creates a triad with provided values.- Parameters:
valueX- x coordinate value.valueY- y coordinate value.valueZ- z coordinate value.- Returns:
- created triad.
-
getDefaultUnit
Gets default unit for a measurement.- Returns:
- default unit for a measurement.
-
createMeasurement
Creates a measurement with provided value and unit.- Parameters:
value- value to be set.unit- unit to be set.- Returns:
- created measurement.
-
internalAdd
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.
-