Class TriadStaticIntervalDetector<U extends Enum<?>,M extends com.irurueta.units.Measurement<U>,T extends Triad<U,M>,D extends TriadStaticIntervalDetector<U,M,T,D,L>,L extends TriadStaticIntervalDetectorListener<U,M,T,D>>
java.lang.Object
com.irurueta.navigation.inertial.calibration.intervals.TriadStaticIntervalDetector<U,M,T,D,L>
- Type Parameters:
U
- type of unit.M
- a type of measurement.T
- a triad type.D
- a detector type.L
- a listener type.
- Direct Known Subclasses:
AccelerationTriadStaticIntervalDetector
,AngularSpeedTriadStaticIntervalDetector
,MagneticFluxDensityTriadStaticIntervalDetector
public abstract class TriadStaticIntervalDetector<U extends Enum<?>,M extends com.irurueta.units.Measurement<U>,T extends Triad<U,M>,D extends TriadStaticIntervalDetector<U,M,T,D,L>,L extends TriadStaticIntervalDetectorListener<U,M,T,D>>
extends Object
Abstract base class for detectors in charge of determining when a static period of
measurements starts and finishes.
Static periods are periods of time where the device is considered to
remain static (no movement applied to it).
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enum
Reason why this detector has failed during initialization.static enum
Possible detector status values. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate double
Average x-coordinate of measurements accumulated during last static period expressed in meters per squared second (m/s^2) for acceleration, radians per second (rad/s) for angular speed or Teslas (T) for magnetic flux density.private double
Average y-coordinate of measurements accumulated during last static period expressed in meters per squared second (m/s^2) for acceleration, radians per second (rad/s) for angular speed or Teslas (T) for magnetic flux density.private double
Average z-coordinate of measurements accumulated during last static period expressed in meters per squared second (m/s^2) for acceleration, radians per second (rad/s) for angular speed or Teslas (T) for magnetic flux density.private final AccumulatedTriadNoiseEstimator<U,
M, T, ?, ?> Estimator to find accumulated accelerometer noise level.private double
Standard deviation of x-coordinate of measurements accumulated during last static period expressed in meters per squared second (m/s^2) for acceleration, radians per second (rad/s) for angular speed or Teslas (T) for magnetic flux density.private double
Standard deviation of y-coordinate of measurements accumulated during last static period expressed in meters per squared second (m/s^2) for acceleration, radians per second (rad/s) for angular speed or Teslas (T) for magnetic flux density.private double
Standard deviation of z-coordinate of measurements accumulated during last static period expressed in meters per squared second (m/s^2) for acceleration, radians per second (rad/s) for angular speed or Teslas (T) for magnetic flux density.private double
Measurement base noise level that has been detected during initialization expressed in meters per squared second (m/s^2) for acceleration, radians per second (rad/s) for angular speed or Teslas (T) for magnetic flux density.private double
Overall absolute threshold to determine whether there has been excessive motion during the whole initialization phase.static final double
Default overall absolute threshold to determine whether there has been excessive motion during the whole initialization phase.static final int
Number of samples to process during the initial static period to determine the sensor (accelerometer, gyroscope or magnetometer) noise level.static final double
Default factor to determine that a sudden movement has occurred during initialization if instantaneous noise level exceeds accumulated noise level by this factor amount.static final double
Default factor to be applied to detected base noise level in order to determine threshold for static/dynamic period changes.static final int
Number of samples to keep within the window by default.private int
Number of samples to be processed initially while keeping the sensor static in order to find the base noise level when device is static.private double
Windowed average x-coordinate of measurements for each processed triad expressed in meters per squared second (m/s^2) for acceleration, radians per second (rad/s) for angular speed or Teslas (T) for magnetic flux density.private double
Windowed average y-coordinate of measurements for each processed triad expressed in meters per squared second (m/s^2) for acceleration, radians per second (rad/s) for angular speed or Teslas (T) for magnetic flux density.private double
Windowed average z-coordinate of measurements for each processed triad expressed in meters per squared second (m/s^2) for acceleration, radians per second (rad/s) for angular speed or Teslas (T) for magnetic flux density.private double
Factor to determine that a sudden movement has occurred during initialization if instantaneous noise level exceeds accumulated noise level by this factor amount.private double
Windowed standard deviation of x-coordinate of measurements for each processed triad expressed in meters per squared second (m/s^2) for acceleration, radians per second (rad/s) for angular speed or Teslas (T) for magnetic flux density.private double
Windowed standard deviation of y-coordinate of measurements for each processed triad expressed in meters per squared second (m/s^2) for acceleration, radians per second (rad/s) for angular speed or Teslas (T) for magnetic flux density.private double
Windowed standard deviation of z-coordinate of measurements for each processed triad expressed in meters per squared second (m/s^2) for acceleration, radians per second (rad/s) for angular speed or Teslas (T) for magnetic flux density.private L
Listener to handle events generated by this detector.static final int
Minimum allowed number of samples to be processed during the initial static period.private int
Number of samples that have been processed so far.private boolean
Indicates whether this detector is busy processing last provided sample.Current status of this detector.private double
Threshold to determine static/dynamic period changes expressed in meters per squared second (m/s^2) for acceleration, radians per second (rad/s) for angular speed or Teslas (T) for magnetic flux density.private double
Factor to be applied to detected base noise level in order to determine threshold for static/dynamic period changes.private final WindowedTriadNoiseEstimator<U,
M, T, ?, ?> Estimator to find instantaneous measurement noise level averaged for a certain window of samples.private int
Number of samples to keep in window to find instantaneous noise level averaged within the window of samples. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
TriadStaticIntervalDetector
(WindowedTriadNoiseEstimator<U, M, T, ?, ?> windowedNoiseEstimator, AccumulatedTriadNoiseEstimator<U, M, T, ?, ?> accumulatedNoiseEstimator) Constructor.protected
TriadStaticIntervalDetector
(WindowedTriadNoiseEstimator<U, M, T, ?, ?> windowedNoiseEstimator, AccumulatedTriadNoiseEstimator<U, M, T, ?, ?> accumulatedNoiseEstimator, L listener) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionprotected abstract double
convertMeasurement
(double value, U unit) Converts provided measurement value expressed in provided unit to the default measurement value, which is meters per squared second (m/s^2) for acceleration, radians per second (rad/s) for angular speed or Teslas (t) for magnetic flux density.protected double
convertMeasurement
(M measurement) Converts provided measurement instance to its default unit, which is meters per squared second (m/s^2) for acceleration, radians per second (rad/s) for angular speed or Teslas (T) for magnetic flux density.protected abstract M
createMeasurement
(double value, U unit) Creates a measurement instance using provided value and unit.protected abstract T
createTriad
(double valueX, double valueY, double valueZ, U unit) Creates a triad.Gets average measurements triad accumulated during last static period.void
getAccumulatedAvgTriad
(T result) Gets average measurements triad accumulated during last static period.double
Gets average x-coordinate of measurements accumulated during last static period expressed in meters per squared second (m/s^2) for acceleration, radians per second (rad/s) for angular speed or Teslas (T) for magnetic flux density.Gets average x-coordinate of measurements accumulated during last static period.void
getAccumulatedAvgXAsMeasurement
(M result) Gets average x-coordinate of measurements accumulated during last static period.double
Gets average y-coordinate of measurements accumulated during last static period expressed in meters per squared second (m/s^2) for acceleration, radians per second (rad/s) for angular speed or Teslas (T) for magnetic flux density.Gets average y-coordinate of measurements accumulated during last static period.void
getAccumulatedAvgYAsMeasurement
(M result) Gets average y-coordinate of measurements accumulated during last static period.double
Gets average z-coordinate of measurements accumulated during last static period expressed in meters per squared second (m/s^2) for acceleration, radians per second (rad/s) for angular speed or Teslas (T) for magnetic flux density.Gets average z-coordinate of measurements accumulated during last static period.void
getAccumulatedAvgZAsMeasurement
(M result) Gets average z-coordinate of measurements accumulated during last static period.Gets standard deviation of measurements accumulated during last static period.void
getAccumulatedStdTriad
(T result) Gets standard deviation of measurements accumulated during last static period.double
Gets standard deviation of x-coordinate of measurements accumulated during last static period expressed in meters per squared second (m/s^2) for acceleration, radians per second (rad/s) for angular speed or Teslas (T) for magnetic flux density.Gets standard deviation of x-coordinate of measurements accumulated during last static period.void
getAccumulatedStdXAsMeasurement
(M result) Gets standard deviation of x-coordinate of measurements accumulated during last static period.double
Gets standard deviation of y-coordinate of measurements accumulated during last static period expressed in meters per squared second (m/s^2) for acceleration, radians per second (rad/s) for angular speed or Teslas (T) for magnetic flux density.Gets standard deviation of y-coordinate of measurements accumulated during last static period.void
getAccumulatedStdYAsMeasurement
(M result) Gets standard deviation of y-coordinate of measurements accumulated during last static period.double
Gets standard deviation of z-coordinate of measurements accumulated during last static period expressed in meters per squared second (m/s^2) for acceleration, radians per second (rad/s) for angular speed or Teslas (T) for magnetic flux density.Gets standard deviation of z-coordinate of measurements accumulated during last static period.void
getAccumulatedStdZAsMeasurement
(M result) Gets standard deviation of z-coordinate of measurements accumulated during last static period.double
Gets measurement base noise level that has been detected during initialization expressed in meters per squared second (m/s^2) for acceleration, radians per second (rad/s) for angular speed or Teslas (T) for magnetic flux density.double
Gets overall absolute threshold to determine whether there has been excessive motion during the whole initialization phase.Gets overall absolute threshold to determine whether there has been excessive motion during the whole initialization phase.void
Gets overall absolute threshold to determine whether there has been excessive motion during the whole initialization phase.Gets measurement base noise level that has been detected during initialization.void
getBaseNoiseLevelAsMeasurement
(M result) Gets measurement base noise level that has been detected during initialization.double
Gets measurement base noise level PSD (Power Spectral Density) expressed in (m^2 * s^-3) for accelerometer, (rad^2/s) for gyroscope or (T^2 * s) for magnetometer.double
Gets measurement base noise level root PSD (Power SpectralDensity) expressed in (m * s^-1.5) for accelerometer, (rad * s^-0.5) for gyroscope or (T * s^0.5) for magnetometer.protected abstract U
Gets default unit for measurements this implementation works with.int
Gets number of samples to be processed initially while keeping the sensor static in order to find the base noise level when device is static.Gets windowed average of measurements for each processed triad.void
getInstantaneousAvgTriad
(T result) Gets windowed average of measurements for each processed triad.double
Gets windowed average x-coordinate of measurements for each processed triad expressed in meters per squared second (m/s^2) for acceleration, radians per second (rad/s) for angular speed or Teslas (T) for magnetic flux density.Gets windowed average x-coordinate of measurements for each processed triad.void
getInstantaneousAvgXAsMeasurement
(M result) Gets windowed average x-coordinate of measurements for each processed triad.double
Gets windowed average y-coordinate of measurements for each processed triad expressed in meters per squared second (m/s^2) for acceleration, radians per second (rad/s) for angular speed or Teslas (T) for magnetic flux density.Gets windowed average y-coordinate of measurements for each processed triad.void
getInstantaneousAvgYAsMeasurement
(M result) Gets windowed average y-coordinate of measurements for each processed triad.double
Gets windowed average z-coordinate of measurements for each processed triad expressed in meters per squared second (m/s^2) for acceleration, radians per second (rad/s) for angular speed or Teslas (T) for magnetic flux density.Gets windowed average z-coordinate of measurements for each processed triad.void
getInstantaneousAvgZAsMeasurement
(M result) Gets windowed average z-coordinate of measurements for each processed triad.double
Gets factor to determine that a sudden movement has occurred during initialization if instantaneous noise level exceeds accumulated noise level by this factor amount.Gets windowed standard deviation of measurements for each processed triad.void
getInstantaneousStdTriad
(T result) Gets windowed standard deviation of measurements for each processed triad.double
Gets windowed standard deviation of x-coordinate of measurements for each processed triad expressed in meters per squared second (m/s^2) for acceleration, radians per second (rad/s) for angular speed or Teslas (T) for magnetic flux density.Gets windowed standard deviation of x-coordinate of measurements for each processed triad.void
getInstantaneousStdXAsMeasurement
(M result) Gets windowed standard deviation of x-coordinate of measurements for each processed triad.double
Gets windowed standard deviation of y-coordinate of measurements for each processed triad expressed in meters per squared second (m/s^2) for acceleration, radians per second (rad/s) for angular speed or Teslas (T) for magnetic flux density.Gets windowed standard deviation of y-coordinate of measurements for each processed triad.void
getInstantaneousStdYAsMeasurement
(M result) Gets windowed standard deviation of y-coordinate of measurements for each processed triad.double
Gets windowed standard deviation of z-coordinate of measurements for each processed triad expressed in meters per squared second (m/s^2) for acceleration, radians per second (rad/s) for angular speed or Teslas (T) for magnetic flux density.Gets windowed standard deviation of z-coordinate of measurements for each processed triad.void
getInstantaneousStdZAsMeasurement
(M result) Gets windowed standard deviation of z-coordinate of measurements for each processed triad.Gets listener to handle events generated by this detector.int
Gets number of samples that have been processed so far.Gets current status of this detector.double
Gets threshold to determine static/dynamic period changes expressed in meters per squared second (m/s^2) for acceleration, radians per second (rad/s) for angular speed or Teslas (T) for magnetic flux density.Gets threshold to determine static/dynamic period changes.void
getThresholdAsMeasurement
(M result) Gets threshold to determine static/dynamic period changes.double
Gets factor to be applied to detected base noise level in order to determine threshold for static/dynamic period changes.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.int
Gets length of number of samples to keep within the window being processed to determine instantaneous accelerometer noise level.boolean
Indicates whether this detector is busy processing last provided sample.boolean
process
(double valueX, double valueY, double valueZ) Processes a new measurement triad sample.boolean
Processes a new measurement triad sample.boolean
Processes a new measurement triad sample.void
reset()
Resets this detector so that it is initialized again when new samples are added.void
setBaseNoiseLevelAbsoluteThreshold
(double baseNoiseLevelAbsoluteThreshold) Sets overall absolute threshold to determine whether there has been excessive motion during the whole initialization phase.void
setBaseNoiseLevelAbsoluteThreshold
(M baseNoiseLevelAbsoluteThreshold) Sets overall absolute threshold to determine whether there has been excessive motion during the whole initialization phase.void
setInitialStaticSamples
(int initialStaticSamples) Sets number of samples to be processed initially while keeping the sensor static in order to find the base noise level when device is static.void
setInstantaneousNoiseLevelFactor
(double instantaneousNoiseLevelFactor) Sets factor to determine that a sudden movement has occurred during initialization if instantaneous noise level exceeds accumulated noise level by this factor amount.void
setListener
(L listener) Sets listener to handle events generated by this detector.void
setThresholdFactor
(double thresholdFactor) Sets factor to be applied to detected base noise level in order to determine threshold for static/dynamic period changes.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 to determine instantaneous accelerometer noise level.
-
Field Details
-
DEFAULT_WINDOW_SIZE
public static final int DEFAULT_WINDOW_SIZENumber of samples to keep within the window by default. For a sensor generating 100 samples/second, this is equivalent to 1 second. For a sensor generating 50 samples/second, this is equivalent to 2 seconds.- See Also:
-
DEFAULT_INITIAL_STATIC_SAMPLES
public static final int DEFAULT_INITIAL_STATIC_SAMPLESNumber of samples to process during the initial static period to determine the sensor (accelerometer, gyroscope or magnetometer) noise level. For a sensor generating 100 samples/second, this is equivalent to 50 seconds. For a sensor generating 50 samples/second, this is equivalent to 100 seconds.- See Also:
-
MINIMUM_INITIAL_STATIC_SAMPLES
public static final int MINIMUM_INITIAL_STATIC_SAMPLESMinimum allowed number of samples to be processed during the initial static period.- See Also:
-
DEFAULT_THRESHOLD_FACTOR
public static final double DEFAULT_THRESHOLD_FACTORDefault factor to be applied to detected base noise level in order to determine threshold for static/dynamic period changes. This factor is unit-less.- See Also:
-
DEFAULT_INSTANTANEOUS_NOISE_LEVEL_FACTOR
public static final double DEFAULT_INSTANTANEOUS_NOISE_LEVEL_FACTORDefault factor to determine that a sudden movement has occurred during initialization if instantaneous noise level exceeds accumulated noise level by this factor amount. This factor is unit-less.- See Also:
-
DEFAULT_BASE_NOISE_LEVEL_ABSOLUTE_THRESHOLD
public static final double DEFAULT_BASE_NOISE_LEVEL_ABSOLUTE_THRESHOLDDefault overall absolute threshold to determine whether there has been excessive motion during the whole initialization phase. This threshold is expressed in meters per squared second (m/s^2) for acceleration, radians per second (rad/s) for angular speed or Teslas (T) for magnetic flux density, and by default it is set to the maximum allowed value, thus effectively disabling this error condition check during initialization.- See Also:
-
windowSize
private int windowSizeNumber of samples to keep in window to find instantaneous noise level averaged within the window of samples. Window size should contain about 1 or 2 seconds of data to be averaged to obtain a more reliable instantaneous noise level. -
initialStaticSamples
private int initialStaticSamplesNumber of samples to be processed initially while keeping the sensor static in order to find the base noise level when device is static. -
thresholdFactor
private double thresholdFactorFactor to be applied to detected base noise level in order to determine threshold for static/dynamic period changes. This factor is unit-less. -
instantaneousNoiseLevelFactor
private double instantaneousNoiseLevelFactorFactor to determine that a sudden movement has occurred during initialization if instantaneous noise level exceeds accumulated noise level by this factor amount. This factor is unit-less. -
baseNoiseLevelAbsoluteThreshold
private double baseNoiseLevelAbsoluteThresholdOverall absolute threshold to determine whether there has been excessive motion during the whole initialization phase. Failure will be detected if estimated base noise level exceeds this threshold when initialization completes. This threshold is expressed in meters per squared second (m/s^2) for acceleration, radians per second (rad/s) for angular speed or Teslas (T) for magnetic flux density. -
listener
Listener to handle events generated by this detector. -
status
Current status of this detector. -
baseNoiseLevel
private double baseNoiseLevelMeasurement base noise level that has been detected during initialization expressed in meters per squared second (m/s^2) for acceleration, radians per second (rad/s) for angular speed or Teslas (T) for magnetic flux density. -
threshold
private double thresholdThreshold to determine static/dynamic period changes expressed in meters per squared second (m/s^2) for acceleration, radians per second (rad/s) for angular speed or Teslas (T) for magnetic flux density. -
running
private boolean runningIndicates whether this detector is busy processing last provided sample. -
processedSamples
private int processedSamplesNumber of samples that have been processed so far. -
accumulatedAvgX
private double accumulatedAvgXAverage x-coordinate of measurements accumulated during last static period expressed in meters per squared second (m/s^2) for acceleration, radians per second (rad/s) for angular speed or Teslas (T) for magnetic flux density. This value is updated when switching from a static period to a dynamic one or after completing initialization. -
accumulatedAvgY
private double accumulatedAvgYAverage y-coordinate of measurements accumulated during last static period expressed in meters per squared second (m/s^2) for acceleration, radians per second (rad/s) for angular speed or Teslas (T) for magnetic flux density. This value is updated when switching from a static period to a dynamic one or after completing initialization. -
accumulatedAvgZ
private double accumulatedAvgZAverage z-coordinate of measurements accumulated during last static period expressed in meters per squared second (m/s^2) for acceleration, radians per second (rad/s) for angular speed or Teslas (T) for magnetic flux density. This value is updated when switching from a static period to a dynamic one or after completing initialization. -
accumulatedStdX
private double accumulatedStdXStandard deviation of x-coordinate of measurements accumulated during last static period expressed in meters per squared second (m/s^2) for acceleration, radians per second (rad/s) for angular speed or Teslas (T) for magnetic flux density. This value is updated when switching from a static period to a dynamic one or after completing initialization. -
accumulatedStdY
private double accumulatedStdYStandard deviation of y-coordinate of measurements accumulated during last static period expressed in meters per squared second (m/s^2) for acceleration, radians per second (rad/s) for angular speed or Teslas (T) for magnetic flux density. This value is updated when switching from a static period to a dynamic one or after completing initialization. -
accumulatedStdZ
private double accumulatedStdZStandard deviation of z-coordinate of measurements accumulated during last static period expressed in meters per squared second (m/s^2) for acceleration, radians per second (rad/s) for angular speed or Teslas (T) for magnetic flux density. This value is updated when switching from a static period to a dynamic one or after completing initialization. -
instantaneousAvgX
private double instantaneousAvgXWindowed average x-coordinate of measurements for each processed triad expressed in meters per squared second (m/s^2) for acceleration, radians per second (rad/s) for angular speed or Teslas (T) for magnetic flux density. This value is updated for each processed sample containing an average value for the samples within the window. -
instantaneousAvgY
private double instantaneousAvgYWindowed average y-coordinate of measurements for each processed triad expressed in meters per squared second (m/s^2) for acceleration, radians per second (rad/s) for angular speed or Teslas (T) for magnetic flux density. This value is updated for each processed sample containing an average value for the samples within the window. -
instantaneousAvgZ
private double instantaneousAvgZWindowed average z-coordinate of measurements for each processed triad expressed in meters per squared second (m/s^2) for acceleration, radians per second (rad/s) for angular speed or Teslas (T) for magnetic flux density. This value is updated for each processed sample containing an average value for the samples within the window. -
instantaneousStdX
private double instantaneousStdXWindowed standard deviation of x-coordinate of measurements for each processed triad expressed in meters per squared second (m/s^2) for acceleration, radians per second (rad/s) for angular speed or Teslas (T) for magnetic flux density. This value is updated for each processed sample containing measured standard deviation for the samples within the window. -
instantaneousStdY
private double instantaneousStdYWindowed standard deviation of y-coordinate of measurements for each processed triad expressed in meters per squared second (m/s^2) for acceleration, radians per second (rad/s) for angular speed or Teslas (T) for magnetic flux density. This value is updated for each processed sample containing measured standard deviation for the samples within the window. -
instantaneousStdZ
private double instantaneousStdZWindowed standard deviation of z-coordinate of measurements for each processed triad expressed in meters per squared second (m/s^2) for acceleration, radians per second (rad/s) for angular speed or Teslas (T) for magnetic flux density. This value is updated for each processed sample containing measured standard deviation for the samples within the window. -
windowedNoiseEstimator
private final WindowedTriadNoiseEstimator<U extends Enum<?>,M extends com.irurueta.units.Measurement<U>, windowedNoiseEstimatorT extends Triad<U, M>, ?, ?> Estimator to find instantaneous measurement noise level averaged for a certain window of samples. -
accumulatedNoiseEstimator
private final AccumulatedTriadNoiseEstimator<U extends Enum<?>,M extends com.irurueta.units.Measurement<U>, accumulatedNoiseEstimatorT extends Triad<U, M>, ?, ?> Estimator to find accumulated accelerometer noise level.
-
-
Constructor Details
-
Method Details
-
getWindowSize
public int getWindowSize()Gets length of number of samples to keep within the window being processed to determine instantaneous accelerometer noise level.- 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 to determine instantaneous accelerometer noise level. Window size must always be larger than allowed minimum value, which is 2 and must have and odd value.- Parameters:
windowSize
- length of number of samples to keep within the window.- Throws:
com.irurueta.navigation.LockedException
- if detector is busy processing a previous sample.IllegalArgumentException
- if provided value is not valid.
-
getInitialStaticSamples
public int getInitialStaticSamples()Gets number of samples to be processed initially while keeping the sensor static in order to find the base noise level when device is static.- Returns:
- number of samples to be processed initially.
-
setInitialStaticSamples
public void setInitialStaticSamples(int initialStaticSamples) throws com.irurueta.navigation.LockedException Sets number of samples to be processed initially while keeping the sensor static in order to find the base noise level when device is static.- Parameters:
initialStaticSamples
- number of samples to be processed initially.- Throws:
com.irurueta.navigation.LockedException
- if detector is busy.IllegalArgumentException
- if provided value is less thanMINIMUM_INITIAL_STATIC_SAMPLES
-
getThresholdFactor
public double getThresholdFactor()Gets factor to be applied to detected base noise level in order to determine threshold for static/dynamic period changes. This factor is unit-less.- Returns:
- factor to be applied to detected base noise level.
-
setThresholdFactor
public void setThresholdFactor(double thresholdFactor) throws com.irurueta.navigation.LockedException Sets factor to be applied to detected base noise level in order to determine threshold for static/dynamic period changes. This factor is unit-less.- Parameters:
thresholdFactor
- factor to be applied to detected base noise level.- Throws:
com.irurueta.navigation.LockedException
- if detector is busy.IllegalArgumentException
- if provided value is zero or negative.
-
getInstantaneousNoiseLevelFactor
public double getInstantaneousNoiseLevelFactor()Gets factor to determine that a sudden movement has occurred during initialization if instantaneous noise level exceeds accumulated noise level by this factor amount. This factor is unit-less.- Returns:
- factor to determine that a sudden movement has occurred.
-
setInstantaneousNoiseLevelFactor
public void setInstantaneousNoiseLevelFactor(double instantaneousNoiseLevelFactor) throws com.irurueta.navigation.LockedException Sets factor to determine that a sudden movement has occurred during initialization if instantaneous noise level exceeds accumulated noise level by this factor amount. This factor is unit-less.- Parameters:
instantaneousNoiseLevelFactor
- factor to determine that a sudden movement has occurred during initialization.- Throws:
com.irurueta.navigation.LockedException
- if detector is busy.IllegalArgumentException
- if provided value is zero or negative.
-
getBaseNoiseLevelAbsoluteThreshold
public double getBaseNoiseLevelAbsoluteThreshold()Gets overall absolute threshold to determine whether there has been excessive motion during the whole initialization phase. Failure will be detected if estimated base noise level exceeds this threshold when initialization completes. This threshold is expressed in meters per squared second (m/s^2) for acceleration, radians per second (rad/s) for angular speed or Teslas (T) for magnetic flux density.- Returns:
- overall absolute threshold to determine whether there has been excessive motion.
-
setBaseNoiseLevelAbsoluteThreshold
public void setBaseNoiseLevelAbsoluteThreshold(double baseNoiseLevelAbsoluteThreshold) throws com.irurueta.navigation.LockedException Sets overall absolute threshold to determine whether there has been excessive motion during the whole initialization phase. Failure will be detected if estimated base noise level exceeds this threshold when initialization completes. This threshold is expressed in meters per squared second (m/s^2) for acceleration, radians per second (rad/s) for angular speed or Teslas (T) for magnetic flux density.- Parameters:
baseNoiseLevelAbsoluteThreshold
- overall absolute threshold to determine whether there has been excessive motion.- Throws:
com.irurueta.navigation.LockedException
- if detector is busy.IllegalArgumentException
- if provided value is zero or negative.
-
getBaseNoiseLevelAbsoluteThresholdAsMeasurement
Gets overall absolute threshold to determine whether there has been excessive motion during the whole initialization phase. Failure will be detected if estimated base noise level exceeds this threshold when initialization completes.- Returns:
- overall absolute threshold to determine whether there has been excessive motion.
-
getBaseNoiseLevelAbsoluteThresholdAsMeasurement
Gets overall absolute threshold to determine whether there has been excessive motion during the whole initialization phase. Failure will be detected if estimated base noise level exceeds this threshold when initialization completes.- Parameters:
result
- instance where result will be stored.
-
setBaseNoiseLevelAbsoluteThreshold
public void setBaseNoiseLevelAbsoluteThreshold(M baseNoiseLevelAbsoluteThreshold) throws com.irurueta.navigation.LockedException Sets overall absolute threshold to determine whether there has been excessive motion during the whole initialization phase. Failure will be detected if estimated base noise level exceeds this threshold when initialization completes.- Parameters:
baseNoiseLevelAbsoluteThreshold
- overall absolute threshold to determine whether there has been excessive motion.- Throws:
com.irurueta.navigation.LockedException
- if detector is busy.IllegalArgumentException
- if provided value is zero or negative.
-
getListener
Gets listener to handle events generated by this detector.- Returns:
- listener to handle events.
-
setListener
Sets listener to handle events generated by this detector.- Parameters:
listener
- listener to handle events.- Throws:
com.irurueta.navigation.LockedException
- if detector is busy.
-
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:
IllegalArgumentException
- if provided value is negative.com.irurueta.navigation.LockedException
- if estimator is currently running.
-
getStatus
Gets current status of this detector.- Returns:
- current status of this detector.
-
getBaseNoiseLevel
public double getBaseNoiseLevel()Gets measurement base noise level that has been detected during initialization expressed in meters per squared second (m/s^2) for acceleration, radians per second (rad/s) for angular speed or Teslas (T) for magnetic flux density.- Returns:
- base noise level.
-
getBaseNoiseLevelAsMeasurement
Gets measurement base noise level that has been detected during initialization.- Returns:
- measurement base noise level.
-
getBaseNoiseLevelAsMeasurement
Gets measurement base noise level that has been detected during initialization.- Parameters:
result
- instance where result will be stored.
-
getBaseNoiseLevelPsd
public double getBaseNoiseLevelPsd()Gets measurement base noise level PSD (Power Spectral Density) expressed in (m^2 * s^-3) for accelerometer, (rad^2/s) for gyroscope or (T^2 * s) for magnetometer.- Returns:
- measurement base noise level PSD.
-
getBaseNoiseLevelRootPsd
public double getBaseNoiseLevelRootPsd()Gets measurement base noise level root PSD (Power SpectralDensity) expressed in (m * s^-1.5) for accelerometer, (rad * s^-0.5) for gyroscope or (T * s^0.5) for magnetometer.- Returns:
- measurement base noise level root PSD.
-
getThreshold
public double getThreshold()Gets threshold to determine static/dynamic period changes expressed in meters per squared second (m/s^2) for acceleration, radians per second (rad/s) for angular speed or Teslas (T) for magnetic flux density.- Returns:
- threshold to determine static/dynamic period changes.
-
getThresholdAsMeasurement
Gets threshold to determine static/dynamic period changes.- Returns:
- threshold to determine static/dynamic period changes.
-
getThresholdAsMeasurement
Gets threshold to determine static/dynamic period changes.- Parameters:
result
- instance where result will be stored.
-
isRunning
public boolean isRunning()Indicates whether this detector is busy processing last provided sample.- Returns:
- true if this detector is busy, false otherwise.
-
getProcessedSamples
public int getProcessedSamples()Gets number of samples that have been processed so far.- Returns:
- number of samples that have been processed so far.
-
getAccumulatedAvgX
public double getAccumulatedAvgX()Gets average x-coordinate of measurements accumulated during last static period expressed in meters per squared second (m/s^2) for acceleration, radians per second (rad/s) for angular speed or Teslas (T) for magnetic flux density. This value is updated when switching from a static period to a dynamic one or after completing initialization.- Returns:
- accumulated average x-coordinate of measurement during last static period.
-
getAccumulatedAvgXAsMeasurement
Gets average x-coordinate of measurements accumulated during last static period. This value is updated when switching from a static period to a dynamic one or after completing initialization.- Returns:
- accumulated average x-coordinate of measurement during last static period.
-
getAccumulatedAvgXAsMeasurement
Gets average x-coordinate of measurements accumulated during last static period. This value is updated when switching from a static period to a dynamic one or after completing initialization.- Parameters:
result
- instance where result will be stored.
-
getAccumulatedAvgY
public double getAccumulatedAvgY()Gets average y-coordinate of measurements accumulated during last static period expressed in meters per squared second (m/s^2) for acceleration, radians per second (rad/s) for angular speed or Teslas (T) for magnetic flux density. This value is updated when switching from a static period to a dynamic one or after completing initialization.- Returns:
- accumulated average y-coordinate of measurement during last static period.
-
getAccumulatedAvgYAsMeasurement
Gets average y-coordinate of measurements accumulated during last static period. This value is updated when switching from a static period to a dynamic one or after completing initialization.- Returns:
- accumulated average y-coordinate of measurement during last static period.
-
getAccumulatedAvgYAsMeasurement
Gets average y-coordinate of measurements accumulated during last static period. This value is updated when switching from a static period to a dynamic one or after completing initialization.- Parameters:
result
- instance where result will be stored.
-
getAccumulatedAvgZ
public double getAccumulatedAvgZ()Gets average z-coordinate of measurements accumulated during last static period expressed in meters per squared second (m/s^2) for acceleration, radians per second (rad/s) for angular speed or Teslas (T) for magnetic flux density. This value is updated when switching from a static period to a dynamic one or after completing initialization.- Returns:
- accumulated average y-coordinate of measurement during last static period.
-
getAccumulatedAvgZAsMeasurement
Gets average z-coordinate of measurements accumulated during last static period. This value is updated when switching from a static period to a dynamic one or after completing initialization.- Returns:
- accumulated average z-coordinate of measurement during last static period.
-
getAccumulatedAvgZAsMeasurement
Gets average z-coordinate of measurements accumulated during last static period. This value is updated when switching from a static period to a dynamic one or after completing initialization.- Parameters:
result
- instance where result will be stored.
-
getAccumulatedAvgTriad
Gets average measurements triad accumulated during last static period. This value is updated when switching from a static period to a dynamic one or after completing initialization.- Returns:
- accumulated average measurements triad during last static period.
-
getAccumulatedAvgTriad
Gets average measurements triad accumulated during last static period. This value is updated when switching from a static period to a dynamic one or after completing initialization.- Parameters:
result
- instance where result will be stored.
-
getAccumulatedStdX
public double getAccumulatedStdX()Gets standard deviation of x-coordinate of measurements accumulated during last static period expressed in meters per squared second (m/s^2) for acceleration, radians per second (rad/s) for angular speed or Teslas (T) for magnetic flux density. This value is updated when switching from a static period to a dynamic one or after completing initialization.- Returns:
- standard deviation of x-coordinate of measurements accumulated during last static period.
-
getAccumulatedStdXAsMeasurement
Gets standard deviation of x-coordinate of measurements accumulated during last static period. This value is updated when switching from a static period to a dynamic one or after completing initialization.- Returns:
- standard deviation of x-coordinate of measurements accumulated during last static period.
-
getAccumulatedStdXAsMeasurement
Gets standard deviation of x-coordinate of measurements accumulated during last static period. This value is updated when switching from a static period to a dynamic one or after completing initialization.- Parameters:
result
- instance where result will be stored.
-
getAccumulatedStdY
public double getAccumulatedStdY()Gets standard deviation of y-coordinate of measurements accumulated during last static period expressed in meters per squared second (m/s^2) for acceleration, radians per second (rad/s) for angular speed or Teslas (T) for magnetic flux density. This value is updated when switching from a static period to a dynamic one or after completing initialization.- Returns:
- standard deviation of y-coordinate of measurements accumulated during last static period.
-
getAccumulatedStdYAsMeasurement
Gets standard deviation of y-coordinate of measurements accumulated during last static period. This value is updated when switching from a static period to a dynamic one or after completing initialization.- Returns:
- standard deviation of y-coordinate of measurements accumulated during last static period.
-
getAccumulatedStdYAsMeasurement
Gets standard deviation of y-coordinate of measurements accumulated during last static period. This value is updated when switching from a static period to a dynamic one or after completing initialization.- Parameters:
result
- instance where result will be stored.
-
getAccumulatedStdZ
public double getAccumulatedStdZ()Gets standard deviation of z-coordinate of measurements accumulated during last static period expressed in meters per squared second (m/s^2) for acceleration, radians per second (rad/s) for angular speed or Teslas (T) for magnetic flux density. This value is updated when switching from a static period to a dynamic one or after completing initialization.- Returns:
- standard deviation of z-coordinate of measurements accumulated during last static period.
-
getAccumulatedStdZAsMeasurement
Gets standard deviation of z-coordinate of measurements accumulated during last static period. This value is updated when switching from a static period to a dynamic one or after completing initialization.- Returns:
- standard deviation of z-coordinate of measurements accumulated during last static period.
-
getAccumulatedStdZAsMeasurement
Gets standard deviation of z-coordinate of measurements accumulated during last static period. This value is updated when switching from a static period to a dynamic one or after completing initialization.- Parameters:
result
- instance where result will be stored.
-
getAccumulatedStdTriad
Gets standard deviation of measurements accumulated during last static period. This value is updated when switching from a static period to a dynamic one or after completing initialization.- Returns:
- standard deviation of measurements accumulated during last static period.
-
getAccumulatedStdTriad
Gets standard deviation of measurements accumulated during last static period. This value is updated when switching from a static period to a dynamic one or after completing initialization.- Parameters:
result
- instance where result will be stored.
-
getInstantaneousAvgX
public double getInstantaneousAvgX()Gets windowed average x-coordinate of measurements for each processed triad expressed in meters per squared second (m/s^2) for acceleration, radians per second (rad/s) for angular speed or Teslas (T) for magnetic flux density. This value is updated for each processed sample containing an average value for the samples within the window.- Returns:
- windowed average x-coordinate of measurements for each processed triad.
-
getInstantaneousAvgXAsMeasurement
Gets windowed average x-coordinate of measurements for each processed triad. This value is updated for each processed sample containing an average value for the samples within the window.- Returns:
- windowed average x-coordinate of measurements for each processed triad.
-
getInstantaneousAvgXAsMeasurement
Gets windowed average x-coordinate of measurements for each processed triad. This value is updated for each processed sample containing an average value for the samples within the window.- Parameters:
result
- instance where result will be stored.
-
getInstantaneousAvgY
public double getInstantaneousAvgY()Gets windowed average y-coordinate of measurements for each processed triad expressed in meters per squared second (m/s^2) for acceleration, radians per second (rad/s) for angular speed or Teslas (T) for magnetic flux density. This value is updated for each processed sample containing an average value for the samples within the window.- Returns:
- windowed average y-coordinate of measurements for each processed triad.
-
getInstantaneousAvgYAsMeasurement
Gets windowed average y-coordinate of measurements for each processed triad. This value is updated for each processed sample containing an average value for the samples within the window.- Returns:
- windowed average y-coordinate of measurements for each processed triad.
-
getInstantaneousAvgYAsMeasurement
Gets windowed average y-coordinate of measurements for each processed triad. This value is updated for each processed sample containing an average value for the samples within the window.- Parameters:
result
- instance where result will be stored.
-
getInstantaneousAvgZ
public double getInstantaneousAvgZ()Gets windowed average z-coordinate of measurements for each processed triad expressed in meters per squared second (m/s^2) for acceleration, radians per second (rad/s) for angular speed or Teslas (T) for magnetic flux density. This value is updated for each processed sample containing an average value for the samples within the window.- Returns:
- windowed average z-coordinate of measurements for each processed triad.
-
getInstantaneousAvgZAsMeasurement
Gets windowed average z-coordinate of measurements for each processed triad. This value is updated for each processed sample containing an average value for the samples within the window.- Returns:
- windowed average z-coordinate of measurements for each processed triad.
-
getInstantaneousAvgZAsMeasurement
Gets windowed average z-coordinate of measurements for each processed triad. This value is updated for each processed sample containing an average value for the samples within the window.- Parameters:
result
- instance where result will be stored.
-
getInstantaneousAvgTriad
Gets windowed average of measurements for each processed triad. This value is updated for each processed sample containing an average value for the samples within the window.- Returns:
- windowed average of measurements for each processed triad.
-
getInstantaneousAvgTriad
Gets windowed average of measurements for each processed triad. This value is updated for each processed sample containing an average value for the samples within the window.- Parameters:
result
- instance where result will be stored.
-
getInstantaneousStdX
public double getInstantaneousStdX()Gets windowed standard deviation of x-coordinate of measurements for each processed triad expressed in meters per squared second (m/s^2) for acceleration, radians per second (rad/s) for angular speed or Teslas (T) for magnetic flux density. This value is updated for each processed sample containing measured standard deviation for the samples within the window.- Returns:
- windowed standard deviation of x-coordinate of measurements for each processed triad.
-
getInstantaneousStdXAsMeasurement
Gets windowed standard deviation of x-coordinate of measurements for each processed triad. This value is updated for each processed sample containing measured standard deviation for the samples within the window.- Returns:
- windowed standard deviation of x-coordinate of measurements for each processed triad.
-
getInstantaneousStdXAsMeasurement
Gets windowed standard deviation of x-coordinate of measurements for each processed triad. This value is updated for each processed sample containing measured standard deviation for the samples within the window.- Parameters:
result
- instance where result will be stored.
-
getInstantaneousStdY
public double getInstantaneousStdY()Gets windowed standard deviation of y-coordinate of measurements for each processed triad expressed in meters per squared second (m/s^2) for acceleration, radians per second (rad/s) for angular speed or Teslas (T) for magnetic flux density. This value is updated for each processed sample containing measured standard deviation for the samples within the window.- Returns:
- windowed standard deviation of y-coordinate of measurements for each processed triad.
-
getInstantaneousStdYAsMeasurement
Gets windowed standard deviation of y-coordinate of measurements for each processed triad. This value is updated for each processed sample containing measured standard deviation of the samples within the window.- Returns:
- windowed standard deviation of y-coordinate of measurements for each processed triad.
-
getInstantaneousStdYAsMeasurement
Gets windowed standard deviation of y-coordinate of measurements for each processed triad. This value is updated for each processed sample containing measured standard deviation of the samples within the window.- Parameters:
result
- instance where result will be stored.
-
getInstantaneousStdZ
public double getInstantaneousStdZ()Gets windowed standard deviation of z-coordinate of measurements for each processed triad expressed in meters per squared second (m/s^2) for acceleration, radians per second (rad/s) for angular speed or Teslas (T) for magnetic flux density. This value is updated for each processed sample containing measured standard deviation for the samples within the window.- Returns:
- windowed standard deviation of z-coordinate of measurements for each processed triad.
-
getInstantaneousStdZAsMeasurement
Gets windowed standard deviation of z-coordinate of measurements for each processed triad. This value is updated for each processed sample containing measured standard deviation for the samples within the window.- Returns:
- windowed standard deviation of z-coordinate of measurements for each processed triad.
-
getInstantaneousStdZAsMeasurement
Gets windowed standard deviation of z-coordinate of measurements for each processed triad. This value is updated for each processed sample containing measured standard deviation for the samples within the window.- Parameters:
result
- instance where result will be stored.
-
getInstantaneousStdTriad
Gets windowed standard deviation of measurements for each processed triad. This value is updated for each processed sample containing measured standard deviation for the samples within the window.- Returns:
- windowed standard deviation of measurements for each processed triad.
-
getInstantaneousStdTriad
Gets windowed standard deviation of measurements for each processed triad. This value is updated for each processed sample containing measured standard deviation for the samples within the window.- Parameters:
result
- instance where result will be stored.
-
process
Processes a new measurement triad sample.- Parameters:
triad
- a new measurement triad to be processed.- Returns:
- true if provided triad has been processed, false if provided triad has been skipped because detector previously failed. If detector previously failed, it will need to be reset before processing additional samples.
- Throws:
com.irurueta.navigation.LockedException
- if detector is busy processing a previous sample.
-
process
Processes a new measurement triad sample.- Parameters:
valueX
- x-coordinate of sensed measurement.valueY
- y-coordinate of sensed measurement.valueZ
- z-coordinate of sensed measurement.- Returns:
- true if provided triad has been processed, false if provided triad has been skipped because detector previously failed. If detector previously failed, it will need to be reset before processing additional samples.
- Throws:
com.irurueta.navigation.LockedException
- if detector is busy processing a previous sample.
-
process
public boolean process(double valueX, double valueY, double valueZ) throws com.irurueta.navigation.LockedException Processes a new measurement triad sample. Provided measurement coordinates are expressed in meters per squared second (m/s^2) for acceleration, radians per second (rad/s) for angular speed or Teslas (T) for magnetic flux density.- Parameters:
valueX
- x-coordinate of sensed measurement.valueY
- y-coordinate of sensed measurement.valueZ
- z-coordinate of sensed measurement.- Returns:
- true if provided triad has been processed, false if provided triad has been skipped because detector previously failed. If detector previously failed, it will need to be reset before processing additional samples.
- Throws:
com.irurueta.navigation.LockedException
- if detector is busy processing a previous sample.
-
reset
public void reset() throws com.irurueta.navigation.LockedExceptionResets this detector so that it is initialized again when new samples are added.- Throws:
com.irurueta.navigation.LockedException
- if detector is busy.
-
convertMeasurement
Converts provided measurement instance to its default unit, which is meters per squared second (m/s^2) for acceleration, radians per second (rad/s) for angular speed or Teslas (T) for magnetic flux density.- Parameters:
measurement
- measurement to be converted.- Returns:
- converted value.
-
convertMeasurement
Converts provided measurement value expressed in provided unit to the default measurement value, which is meters per squared second (m/s^2) for acceleration, radians per second (rad/s) for angular speed or Teslas (t) for magnetic flux density.- Parameters:
value
- value to be converted.unit
- unit of value to be converted.- Returns:
- converted value.
-
createMeasurement
Creates a measurement instance using provided value and unit.- Parameters:
value
- value of measurement.unit
- unit of value.- Returns:
- created measurement
-
getDefaultUnit
Gets default unit for measurements this implementation works with.- Returns:
- default measurement unit.
-
createTriad
Creates a triad.- Parameters:
valueX
- x-coordinate value.valueY
- y-coordinate value.valueZ
- z-coordinate value.unit
- unit of values.- Returns:
- created triad.
-