Class GyroscopeIntervalDetectorThresholdFactorOptimizer

java.lang.Object
com.irurueta.navigation.inertial.calibration.intervals.thresholdfactor.IntervalDetectorThresholdFactorOptimizer<com.irurueta.navigation.inertial.calibration.TimedBodyKinematics,GyroscopeIntervalDetectorThresholdFactorOptimizerDataSource>
com.irurueta.navigation.inertial.calibration.intervals.thresholdfactor.GyroscopeIntervalDetectorThresholdFactorOptimizer
All Implemented Interfaces:
com.irurueta.navigation.inertial.calibration.AccelerometerNoiseRootPsdSource, com.irurueta.navigation.inertial.calibration.GyroscopeBiasUncertaintySource, com.irurueta.navigation.inertial.calibration.GyroscopeCalibrationSource, com.irurueta.navigation.inertial.calibration.GyroscopeNoiseRootPsdSource
Direct Known Subclasses:
BracketedGyroscopeIntervalDetectorThresholdFactorOptimizer, ExhaustiveGyroscopeIntervalDetectorThresholdFactorOptimizer

public abstract class GyroscopeIntervalDetectorThresholdFactorOptimizer extends IntervalDetectorThresholdFactorOptimizer<com.irurueta.navigation.inertial.calibration.TimedBodyKinematics,GyroscopeIntervalDetectorThresholdFactorOptimizerDataSource> implements com.irurueta.navigation.inertial.calibration.GyroscopeNoiseRootPsdSource, com.irurueta.navigation.inertial.calibration.GyroscopeBiasUncertaintySource, com.irurueta.navigation.inertial.calibration.GyroscopeCalibrationSource, com.irurueta.navigation.inertial.calibration.AccelerometerNoiseRootPsdSource
Optimizes the threshold factor for interval detection of gyroscope data based on results of calibration. Implementations of this class will attempt to find the best threshold factor between the provided range of values. Only gyroscope calibrators based on unknown orientation are supported (in other terms, calibrators must be GyroscopeNonLinearCalibrator and must support GyroscopeCalibratorMeasurementOrSequenceType.BODY_KINEMATICS_SEQUENCE).
  • Field Details

    • DEFAULT_MIN_THRESHOLD_FACTOR

      public static final double DEFAULT_MIN_THRESHOLD_FACTOR
      Default minimum threshold factor.
      See Also:
    • DEFAULT_MAX_THRESHOLD_FACTOR

      public static final double DEFAULT_MAX_THRESHOLD_FACTOR
      Default maximum threshold factor.
      See Also:
    • minThresholdFactor

      protected double minThresholdFactor
      Minimum threshold factor.
    • maxThresholdFactor

      protected double maxThresholdFactor
      Maximum threshold factor.
    • calibrator

      private com.irurueta.navigation.inertial.calibration.gyroscope.GyroscopeNonLinearCalibrator calibrator
      Gyroscope calibrator.
    • generator

      private com.irurueta.navigation.inertial.calibration.generators.GyroscopeMeasurementsGenerator generator
      A measurement generator for gyroscope calibrators.
    • sequences

      private List<com.irurueta.navigation.inertial.calibration.BodyKinematicsSequence<com.irurueta.navigation.inertial.calibration.StandardDeviationTimedBodyKinematics>> sequences
      Generated sequences to be used for gyroscope calibration.
    • qualityScoreMapper

      private QualityScoreMapper<com.irurueta.navigation.inertial.calibration.BodyKinematicsSequence<com.irurueta.navigation.inertial.calibration.StandardDeviationTimedBodyKinematics>> qualityScoreMapper
      Mapper to convert BodyKinematicsSequence sequences of StandardDeviationTimedBodyKinematics into quality scores.
    • angularSpeedNoiseRootPsd

      private double angularSpeedNoiseRootPsd
      Estimated norm of gyroscope noise root PSD (Power Spectral Density) expressed as (rad * s^-0.5).
    • baseNoiseLevel

      private double baseNoiseLevel
      Accelerometer base noise level that has been detected during initialization of the best solution that has been found expressed in meters per squared second (m/s^2). This is equal to the standard deviation of the accelerometer measurements during the initialization phase.
    • threshold

      private double threshold
      Threshold to determine static/dynamic period changes expressed in meters per squared second (m/s^2) for the best calibration solution that has been found.
    • estimatedCovariance

      private com.irurueta.algebra.Matrix estimatedCovariance
      Estimated covariance matrix for estimated parameters.
    • estimatedBiases

      private double[] estimatedBiases
      Estimated angular rate biases for each IMU axis expressed in radians per second (rad/s).
    • estimatedMg

      private com.irurueta.algebra.Matrix estimatedMg
      Estimated gyroscope scale factors and cross-coupling errors. This is the product of matrix Tg containing cross-coupling errors and Kg containing scaling factors. So that:
           Mg = [sx    mxy  mxz] = Tg*Kg
                [myx   sy   myz]
                [mzx   mzy  sz ]
       
      Where:
           Kg = [sx 0   0 ]
                [0  sy  0 ]
                [0  0   sz]
       
      and
           Tg = [1          -alphaXy    alphaXz ]
                [alphaYx    1           -alphaYz]
                [-alphaZx   alphaZy     1       ]
       
      Hence:
           Mg = [sx    mxy  mxz] = Tg*Kg =  [sx             -sy * alphaXy   sz * alphaXz ]
                [myx   sy   myz]            [sx * alphaYx   sy              -sz * alphaYz]
                [mzx   mzy  sz ]            [-sx * alphaZx  sy * alphaZy    sz           ]
       
      This instance allows any 3x3 matrix. However, typically alphaYx, alphaZx and alphaZy are considered to be zero if the gyroscope z-axis is assumed to be the same as the body z-axis. When this is assumed, myx = mzx = mzy = 0 and the Mg matrix becomes upper diagonal:
           Mg = [sx    mxy  mxz]
                [0     sy   myz]
                [0     0    sz ]
       
      Values of this matrix are unit-less.
    • estimatedGg

      private com.irurueta.algebra.Matrix estimatedGg
      Estimated G-dependent cross-biases introduced on the gyroscope by the specific forces sensed by the accelerometer. This instance allows any 3x3 matrix.
  • Constructor Details

    • GyroscopeIntervalDetectorThresholdFactorOptimizer

      protected GyroscopeIntervalDetectorThresholdFactorOptimizer()
      Constructor.
    • GyroscopeIntervalDetectorThresholdFactorOptimizer

      protected GyroscopeIntervalDetectorThresholdFactorOptimizer(GyroscopeIntervalDetectorThresholdFactorOptimizerDataSource dataSource)
      Constructor.
      Parameters:
      dataSource - instance in charge of retrieving data for this optimizer.
    • GyroscopeIntervalDetectorThresholdFactorOptimizer

      protected GyroscopeIntervalDetectorThresholdFactorOptimizer(com.irurueta.navigation.inertial.calibration.gyroscope.GyroscopeNonLinearCalibrator calibrator)
      Constructor.
      Parameters:
      calibrator - a gyroscope calibrator to be used to optimize its Mean Square Error (MSE).
      Throws:
      IllegalArgumentException - if gyroscope calibrator does not use BodyKinematicsSequence sequences of StandardDeviationTimedBodyKinematics.
    • GyroscopeIntervalDetectorThresholdFactorOptimizer

      protected GyroscopeIntervalDetectorThresholdFactorOptimizer(GyroscopeIntervalDetectorThresholdFactorOptimizerDataSource dataSource, com.irurueta.navigation.inertial.calibration.gyroscope.GyroscopeNonLinearCalibrator calibrator)
      Constructor.
      Parameters:
      dataSource - instance in charge of retrieving data for this optimizer.
      calibrator - a gyroscope calibrator to be used to optimize its Mean Square Error (MSE).
      Throws:
      IllegalArgumentException - if gyroscope calibrator does not use BodyKinematicsSequence sequences of StandardDeviationTimedBodyKinematics.
  • Method Details

    • getCalibrator

      public com.irurueta.navigation.inertial.calibration.gyroscope.GyroscopeNonLinearCalibrator getCalibrator()
      Gets provided gyroscope calibrator to be used to optimize its Mean Square Error (MSE).
      Returns:
      gyroscope calibrator to be used to optimize its MSE.
    • setCalibrator

      public void setCalibrator(com.irurueta.navigation.inertial.calibration.gyroscope.GyroscopeNonLinearCalibrator calibrator) throws com.irurueta.navigation.LockedException
      Sets gyroscope calibrator to be used to optimize its Mean Square Error (MSE).
      Parameters:
      calibrator - gyroscope calibrator to be use dto optimize its MSE.
      Throws:
      com.irurueta.navigation.LockedException - if optimizer is already running.
      IllegalArgumentException - if gyroscope calibrator does not use BodyKinematicsSequence sequences of StandardDeviationTimedBodyKinematics.
    • getQualityScoreMapper

      public QualityScoreMapper<com.irurueta.navigation.inertial.calibration.BodyKinematicsSequence<com.irurueta.navigation.inertial.calibration.StandardDeviationTimedBodyKinematics>> getQualityScoreMapper()
      Gets mapper to convert BodyKinematicsSequence sequences of StandardDeviationTimedBodyKinematics into quality scores.
      Returns:
      mapper to convert sequences into quality scores.
    • setQualityScoreMapper

      public void setQualityScoreMapper(QualityScoreMapper<com.irurueta.navigation.inertial.calibration.BodyKinematicsSequence<com.irurueta.navigation.inertial.calibration.StandardDeviationTimedBodyKinematics>> qualityScoreMapper) throws com.irurueta.navigation.LockedException
      Sets mapper to convert BodyKinematicsSequence sequences of StandardDeviationTimedBodyKinematics into quality scores.
      Parameters:
      qualityScoreMapper - mapper to convert sequences into quality scores.
      Throws:
      com.irurueta.navigation.LockedException - if optimizer is already running.
    • getMinThresholdFactor

      public double getMinThresholdFactor()
      Gets the minimum threshold factor.
      Returns:
      minimum threshold factor.
    • getMaxThresholdFactor

      public double getMaxThresholdFactor()
      Gets the maximum threshold factor.
      Returns:
      maximum threshold factor.
    • setThresholdFactorRange

      public void setThresholdFactorRange(double minThresholdFactor, double maxThresholdFactor) throws com.irurueta.navigation.LockedException
      Sets a range of threshold factor values to get an optimized threshold factor value.
      Parameters:
      minThresholdFactor - minimum threshold.
      maxThresholdFactor - maximum threshold.
      Throws:
      com.irurueta.navigation.LockedException - if optimizer is already running.
      IllegalArgumentException - if either minimum or maximum values are negative, or if the minimum value is larger than the maximum one.
    • isReady

      public boolean isReady()
      Indicates whether this optimizer is ready to start optimization.
      Overrides:
      isReady in class IntervalDetectorThresholdFactorOptimizer<com.irurueta.navigation.inertial.calibration.TimedBodyKinematics,GyroscopeIntervalDetectorThresholdFactorOptimizerDataSource>
      Returns:
      true if this optimizer is ready, false otherwise.
    • getTimeInterval

      public double getTimeInterval()
      Gets the time interval between input measurements provided to the IntervalDetectorThresholdFactorOptimizer.getDataSource() expressed in seconds (s).
      Returns:
      time interval between input measurements.
    • setTimeInterval

      public void setTimeInterval(double timeInterval) throws com.irurueta.navigation.LockedException
      Sets time interval between input measurements provided to the IntervalDetectorThresholdFactorOptimizer.getDataSource() expressed in seconds (s).
      Parameters:
      timeInterval - time interval between input measurements.
      Throws:
      com.irurueta.navigation.LockedException - if optimizer is already running.
      IllegalArgumentException - if provided value is negative.
    • getTimeIntervalAsTime

      public com.irurueta.units.Time getTimeIntervalAsTime()
      Gets the time interval between input measurements provided to the IntervalDetectorThresholdFactorOptimizer.getDataSource().
      Returns:
      time interval between input measurements.
    • getTimeIntervalAsTime

      public void getTimeIntervalAsTime(com.irurueta.units.Time result)
      Gets the time interval between input measurements provided to the IntervalDetectorThresholdFactorOptimizer.getDataSource().
      Parameters:
      result - instance where the time interval will be stored.
    • setTimeInterval

      public void setTimeInterval(com.irurueta.units.Time timeInterval) throws com.irurueta.navigation.LockedException
      Sets time interval between input measurements provided to the IntervalDetectorThresholdFactorOptimizer.getDataSource().
      Parameters:
      timeInterval - time interval between input measurements.
      Throws:
      com.irurueta.navigation.LockedException - if optimizer is already running.
      IllegalArgumentException - if provided value is negative.
    • getMinStaticSamples

      public int getMinStaticSamples()
      Gets minimum number of input measurements provided to the IntervalDetectorThresholdFactorOptimizer.getDataSource() required in a static interval to be taken into account. Smaller static intervals will be discarded.
      Returns:
      a minimum number of input measurements required in a static interval to be taken into account.
    • setMinStaticSamples

      public void setMinStaticSamples(int minStaticSamples) throws com.irurueta.navigation.LockedException
      Sets minimum number of input measurements provided to the IntervalDetectorThresholdFactorOptimizer.getDataSource() required in a static interval to be taken into account. Smaller static intervals will be discarded.
      Parameters:
      minStaticSamples - a minimum number of input measurements required in a static interval to be taken into account.
      Throws:
      com.irurueta.navigation.LockedException - if optimizer is already running.
      IllegalArgumentException - if provided value is less than 2.
    • getMaxDynamicSamples

      public int getMaxDynamicSamples()
      Gets maximum number of input measurements provided to the IntervalDetectorThresholdFactorOptimizer.getDataSource() allowed in dynamic intervals.
      Returns:
      maximum number of input measurements allowed in dynamic intervals.
    • setMaxDynamicSamples

      public void setMaxDynamicSamples(int maxDynamicSamples) throws com.irurueta.navigation.LockedException
      Sets maximum number of input measurements provided to the IntervalDetectorThresholdFactorOptimizer.getDataSource() allowed in dynamic intervals.
      Parameters:
      maxDynamicSamples - maximum number of input measurements allowed in dynamic intervals.
      Throws:
      com.irurueta.navigation.LockedException - if optimizer is already running.
      IllegalArgumentException - if provided value is less than 2.
    • getWindowSize

      public int getWindowSize()
      Gets length of number of input measurements provided to the IntervalDetectorThresholdFactorOptimizer.getDataSource() to keep within the window being processed to determine instantaneous accelerometer noise level.
      Returns:
      length of input measurements to keep within the window.
    • setWindowSize

      public void setWindowSize(int windowSize) throws com.irurueta.navigation.LockedException
      Sets length of number of input measurements provided to the IntervalDetectorThresholdFactorOptimizer.getDataSource() to keep within the window being processed to determine instantaneous noise level. Window size must always be larger than the allowed minimum value, which is 2 and must have an odd value.
      Parameters:
      windowSize - length of number of samples to keep within the window.
      Throws:
      com.irurueta.navigation.LockedException - if optimizer is already running.
      IllegalArgumentException - if provided value is not valid.
    • getInitialStaticSamples

      public int getInitialStaticSamples()
      Gets number of input measurements provided to the IntervalDetectorThresholdFactorOptimizer.getDataSource() to be processed initially while keeping the sensor static to find the base noise level when the 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 input parameters provided to the IntervalDetectorThresholdFactorOptimizer.getDataSource() to be processed initially while keeping the sensor static to find the base noise level when the device is static.
      Parameters:
      initialStaticSamples - number of samples ot be processed initially.
      Throws:
      com.irurueta.navigation.LockedException - if optimizer is already running.
      IllegalArgumentException - if provided value is less than TriadStaticIntervalDetector.MINIMUM_INITIAL_STATIC_SAMPLES.
    • 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 optimizer is already running.
      IllegalArgumentException - if provided value is zero or negative.
    • getBaseNoiseLevelAbsoluteThreshold

      public double getBaseNoiseLevelAbsoluteThreshold()
      Gets the 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).
      Returns:
      overall absolute threshold to determine whether there has been excessive motion.
    • setBaseNoiseLevelAbsoluteThreshold

      public void setBaseNoiseLevelAbsoluteThreshold(double baseNoiseLevelAbsoluteThreshold) throws com.irurueta.navigation.LockedException
      Sets the 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).
      Parameters:
      baseNoiseLevelAbsoluteThreshold - overall absolute threshold to determine whether there has been excessive motion.
      Throws:
      com.irurueta.navigation.LockedException - if optimizer is already running.
      IllegalArgumentException - if provided value is zero or negative.
    • getBaseNoiseLevelAbsoluteThresholdAsMeasurement

      public com.irurueta.units.Acceleration getBaseNoiseLevelAbsoluteThresholdAsMeasurement()
      Gets the overall absolute threshold to determine whether there has been excessive motion during the whole initialization phase.
      Returns:
      overall absolute threshold to determine whether there has been excessive motion.
    • getBaseNoiseLevelAbsoluteThresholdAsMeasurement

      public void getBaseNoiseLevelAbsoluteThresholdAsMeasurement(com.irurueta.units.Acceleration result)
      Gets the overall absolute threshold to determine whether there has been excessive motion during the whole initialization phase.
      Parameters:
      result - instance where the result will be stored.
    • setBaseNoiseLevelAbsoluteThreshold

      public void setBaseNoiseLevelAbsoluteThreshold(com.irurueta.units.Acceleration baseNoiseLevelAbsoluteThreshold) throws com.irurueta.navigation.LockedException
      Sets the overall absolute threshold to determine whether there has been excessive motion during the whole initialization phase.
      Parameters:
      baseNoiseLevelAbsoluteThreshold - overall absolute threshold to determine whether there has been excessive motion.
      Throws:
      com.irurueta.navigation.LockedException - if optimizer is already running.
      IllegalArgumentException - if provided value is zero or negative.
    • getAccelerometerBaseNoiseLevel

      public double getAccelerometerBaseNoiseLevel()
      Gets accelerometer base noise level that has been detected during initialization of the best solution that has been found expressed in meters per squared second (m/s^2). This is equal to the standard deviation of the accelerometer measurements during the initialization phase.
      Returns:
      accelerometer base noise level of the best solution that has been found.
    • getAccelerometerBaseNoiseLevelAsMeasurement

      public com.irurueta.units.Acceleration getAccelerometerBaseNoiseLevelAsMeasurement()
      Gets accelerometer base noise level that has been detected during initialization of the best solution that has been found. This is equal to the standard deviation of the accelerometer measurements during the initialization phase.
      Returns:
      accelerometer base noise level of the best solution that has been found.
    • getAccelerometerBaseNoiseLevelAsMeasurement

      public void getAccelerometerBaseNoiseLevelAsMeasurement(com.irurueta.units.Acceleration result)
      Gets accelerometer base noise level that has been detected during initialization of the best solution that has been found. This is equal to the standard deviation of the accelerometer measurements during the initialization phase.
      Parameters:
      result - instance where the result will be stored.
    • getGyroscopeBaseNoiseLevelPsd

      public double getGyroscopeBaseNoiseLevelPsd()
      Gets gyroscope base noise level PSD (Power Spectral Density) expressed in (rad^2/s).
      Returns:
      gyroscope base noise level PSD.
    • getGyroscopeBaseNoiseLevelRootPsd

      public double getGyroscopeBaseNoiseLevelRootPsd()
      Gets gyroscope base noise level root PSD (Power Spectral Density) expressed in (rad * s^-0.5)
      Specified by:
      getGyroscopeBaseNoiseLevelRootPsd in interface com.irurueta.navigation.inertial.calibration.GyroscopeNoiseRootPsdSource
      Returns:
      gyroscope base noise level root PSD.
    • getAccelerometerBaseNoiseLevelPsd

      public double getAccelerometerBaseNoiseLevelPsd()
      Gets accelerometer base noise level PSD (Power Spectral Density) expressed in (m^2 * s^-3).
      Returns:
      accelerometer base noise level PSD.
    • getAccelerometerBaseNoiseLevelRootPsd

      public double getAccelerometerBaseNoiseLevelRootPsd()
      Gets accelerometer base noise level root PSD (Power Spectral Density) expressed in (m * s^-1.5).
      Specified by:
      getAccelerometerBaseNoiseLevelRootPsd in interface com.irurueta.navigation.inertial.calibration.AccelerometerNoiseRootPsdSource
      Returns:
      accelerometer base noise level root PSD.
    • getThreshold

      public double getThreshold()
      Gets the threshold to determine static/dynamic period changes expressed in meters per squared second (m/s^2) for the best calibration solution that has been found.
      Returns:
      threshold to determine static/dynamic period changes for the best solution.
    • getThresholdAsMeasurement

      public com.irurueta.units.Acceleration getThresholdAsMeasurement()
      Gets the threshold to determine static/dynamic period changes for the best calibration solution that has been found.
      Returns:
      threshold to determine static/dynamic period changes for the best solution.
    • getThresholdAsMeasurement

      public void getThresholdAsMeasurement(com.irurueta.units.Acceleration result)
      Get the threshold to determine static/dynamic period changes for the best calibration solution that has been found.
      Parameters:
      result - instance where the result will be stored.
    • getEstimatedBiasStandardDeviationNorm

      public Double getEstimatedBiasStandardDeviationNorm()
      Gets estimated standard deviation norm of gyroscope bias expressed in radians per second (rad/s). This can be used as the initial gyroscope bias uncertainty for INSLooselyCoupledKalmanInitializerConfig or INSTightlyCoupledKalmanInitializerConfig.
      Specified by:
      getEstimatedBiasStandardDeviationNorm in interface com.irurueta.navigation.inertial.calibration.GyroscopeBiasUncertaintySource
      Returns:
      estimated standard deviation norm of gyroscope bias or null if not available.
    • getEstimatedBiasXVariance

      public Double getEstimatedBiasXVariance()
      Gets estimated x coordinate variance of gyroscope bias expressed in (rad^2/s^2).
      Returns:
      estimated x coordinate variance of gyroscope bias or null if not available.
    • getEstimatedBiasYVariance

      public Double getEstimatedBiasYVariance()
      Gets estimated y coordinate variance of gyroscope bias expressed in (rad^2/s^2).
      Returns:
      estimated y coordinate variance of gyroscope bias or null if not available.
    • getEstimatedBiasZVariance

      public Double getEstimatedBiasZVariance()
      Gets estimated z coordinate variance of gyroscope bias expressed in (rad^2/s^2).
      Returns:
      estimated z coordinate variance of gyroscope bias or null if not available.
    • getEstimatedBiases

      public double[] getEstimatedBiases()
      Gets the array containing x,y,z components of estimated gyroscope biases expressed in radians per second (rad/s).
      Specified by:
      getEstimatedBiases in interface com.irurueta.navigation.inertial.calibration.GyroscopeCalibrationSource
      Returns:
      array containing x,y,z components of estimated gyroscope biases.
    • getEstimatedMg

      public com.irurueta.algebra.Matrix getEstimatedMg()
      Gets estimated gyroscope scale factors and cross-coupling errors. This is the product of matrix Tg containing cross-coupling errors and Kg containing scaling factors. So that:
           Mg = [sx    mxy  mxz] = Tg*Kg
                [myx   sy   myz]
                [mzx   mzy  sz ]
       
      Where:
           Kg = [sx 0   0 ]
                [0  sy  0 ]
                [0  0   sz]
       
      and
           Tg = [1          -alphaXy    alphaXz ]
                [alphaYx    1           -alphaYz]
                [-alphaZx   alphaZy     1       ]
       
      Hence:
           Mg = [sx    mxy  mxz] = Tg*Kg =  [sx             -sy * alphaXy   sz * alphaXz ]
                [myx   sy   myz]            [sx * alphaYx   sy              -sz * alphaYz]
                [mzx   mzy  sz ]            [-sx * alphaZx  sy * alphaZy    sz           ]
       
      This instance allows any 3x3 matrix. However, typically alphaYx, alphaZx and alphaZy are considered to be zero if the gyroscope z-axis is assumed to be the same as the body z-axis. When this is assumed, myx = mzx = mzy = 0 and the Mg matrix becomes upper diagonal:
           Mg = [sx    mxy  mxz]
                [0     sy   myz]
                [0     0    sz ]
       
      Values of this matrix are unit-less.
      Specified by:
      getEstimatedMg in interface com.irurueta.navigation.inertial.calibration.GyroscopeCalibrationSource
      Returns:
      estimated gyroscope scale factors and cross-coupling errors.
    • getEstimatedGg

      public com.irurueta.algebra.Matrix getEstimatedGg()
      Gets estimated G-dependent cross-biases introduced on the gyroscope by the specific forces sensed by the accelerometer.
      Specified by:
      getEstimatedGg in interface com.irurueta.navigation.inertial.calibration.GyroscopeCalibrationSource
      Returns:
      a 3x3 matrix containing g-dependent cross biases.
    • evaluateForThresholdFactor

      protected double evaluateForThresholdFactor(double thresholdFactor) throws com.irurueta.navigation.LockedException, com.irurueta.navigation.inertial.calibration.CalibrationException, com.irurueta.navigation.NotReadyException, IntervalDetectorThresholdFactorOptimizerException
      Evaluates calibration Mean Square Error (MSE) for the provided threshold factor.
      Parameters:
      thresholdFactor - threshold factor to be used for interval detection and measurement generation to be used for calibration.
      Returns:
      calibration MSE.
      Throws:
      com.irurueta.navigation.LockedException - if the generator is busy.
      com.irurueta.navigation.inertial.calibration.CalibrationException - if calibration fails.
      com.irurueta.navigation.NotReadyException - if the calibrator is not ready.
      IntervalDetectorThresholdFactorOptimizerException - interval detection failed.
    • initialize

      private void initialize()
      Initializes gyroscope measurement generator to convert timed body kinematics measurements after interval detection into measurements used for gyroscope calibration.
    • keepBestResult

      private void keepBestResult(double mse, double thresholdFactor)
      Keeps the best calibration solution found so far.
      Parameters:
      mse - Estimated Mean Square Error during calibration.
      thresholdFactor - threshold factor to be kept.
    • createMeasurement

      private com.irurueta.units.Acceleration createMeasurement(double value, com.irurueta.units.AccelerationUnit unit)
      Creates an acceleration instance using the provided value and unit.
      Parameters:
      value - value of measurement.
      unit - unit of value.
      Returns:
      created acceleration.
    • getDefaultUnit

      private com.irurueta.units.AccelerationUnit getDefaultUnit()
      Gets the default unit for acceleration, which is meters per squared second (m/s^2).
      Returns:
      default unit for acceleration.