Class BracketedMagnetometerIntervalDetectorThresholdFactorOptimizer

java.lang.Object
com.irurueta.navigation.inertial.calibration.intervals.thresholdfactor.IntervalDetectorThresholdFactorOptimizer<com.irurueta.navigation.inertial.BodyKinematicsAndMagneticFluxDensity,MagnetometerIntervalDetectorThresholdFactorOptimizerDataSource>
com.irurueta.navigation.inertial.calibration.intervals.thresholdfactor.MagnetometerIntervalDetectorThresholdFactorOptimizer
com.irurueta.navigation.inertial.calibration.intervals.thresholdfactor.BracketedMagnetometerIntervalDetectorThresholdFactorOptimizer
All Implemented Interfaces:
com.irurueta.navigation.inertial.calibration.AccelerometerNoiseRootPsdSource

public class BracketedMagnetometerIntervalDetectorThresholdFactorOptimizer extends MagnetometerIntervalDetectorThresholdFactorOptimizer
Optimizes the threshold factor for interval detection of magnetometer data based on results of calibration. Only magnetometer calibrators based on unknown orientation are supported, in other terms, calibrators must be MagnetometerNonLinearCalibrator and must support MagnetometerCalibratorMeasurementType.STANDARD_DEVIATION_BODY_MAGNETIC_FLUX_DENSITY. This implementation uses a BracketedSingleOptimizer to find the threshold factor value that minimizes Mean Square Error (MSE) for calibration parameters.
  • Field Details

    • mseOptimizer

      private com.irurueta.numerical.optimization.BracketedSingleOptimizer mseOptimizer
      A bracketed single optimizer to find the threshold factor value that minimizes the Mean Square Error (MSE) for calibration parameters.
    • optimizerListener

      private com.irurueta.numerical.SingleDimensionFunctionEvaluatorListener optimizerListener
      Listener for optimizer.
    • iterationCompletedListener

      private com.irurueta.numerical.optimization.OnIterationCompletedListener iterationCompletedListener
      Iteration listener for BracketedSingleOptimizer.
  • Constructor Details

    • BracketedMagnetometerIntervalDetectorThresholdFactorOptimizer

      public BracketedMagnetometerIntervalDetectorThresholdFactorOptimizer()
      Constructor.
    • BracketedMagnetometerIntervalDetectorThresholdFactorOptimizer

      public BracketedMagnetometerIntervalDetectorThresholdFactorOptimizer(MagnetometerIntervalDetectorThresholdFactorOptimizerDataSource dataSource)
      Constructor.
      Parameters:
      dataSource - instance in charge of retrieving data for this optimizer.
    • BracketedMagnetometerIntervalDetectorThresholdFactorOptimizer

      public BracketedMagnetometerIntervalDetectorThresholdFactorOptimizer(com.irurueta.navigation.inertial.calibration.magnetometer.MagnetometerNonLinearCalibrator calibrator)
      Constructor.
      Parameters:
      calibrator - a magnetometer calibrator to be used to optimize its Mean Square Error (MSE).
      Throws:
      IllegalArgumentException - if magnetometer calibrator does not use StandardDeviationBodyMagneticFluxDensity measurements.
    • BracketedMagnetometerIntervalDetectorThresholdFactorOptimizer

      public BracketedMagnetometerIntervalDetectorThresholdFactorOptimizer(MagnetometerIntervalDetectorThresholdFactorOptimizerDataSource dataSource, com.irurueta.navigation.inertial.calibration.magnetometer.MagnetometerNonLinearCalibrator calibrator)
      Constructor.
      Parameters:
      dataSource - instance in charge of retrieving data for this optimizer.
      calibrator - a magnetometer calibrator to be used to optimize its Mean Square Error (MSE).
      Throws:
      IllegalArgumentException - if magnetometer calibrator does not use StandardDeviationBodyMagneticFluxDensity measurements.
    • BracketedMagnetometerIntervalDetectorThresholdFactorOptimizer

      public BracketedMagnetometerIntervalDetectorThresholdFactorOptimizer(com.irurueta.numerical.optimization.BracketedSingleOptimizer mseOptimizer)
      Constructor.
      Parameters:
      mseOptimizer - optimizer to find the threshold factor value that minimizes MSE for calibration parameters.
    • BracketedMagnetometerIntervalDetectorThresholdFactorOptimizer

      public BracketedMagnetometerIntervalDetectorThresholdFactorOptimizer(MagnetometerIntervalDetectorThresholdFactorOptimizerDataSource dataSource, com.irurueta.numerical.optimization.BracketedSingleOptimizer mseOptimizer)
      Constructor.
      Parameters:
      dataSource - instance in charge of retrieving data for this optimizer.
      mseOptimizer - optimizer to find the threshold value that minimizes MSE for calibration parameters.
    • BracketedMagnetometerIntervalDetectorThresholdFactorOptimizer

      public BracketedMagnetometerIntervalDetectorThresholdFactorOptimizer(com.irurueta.navigation.inertial.calibration.magnetometer.MagnetometerNonLinearCalibrator calibrator, com.irurueta.numerical.optimization.BracketedSingleOptimizer mseOptimizer)
      Constructor.
      Parameters:
      calibrator - a magnetometer calibrator to be used to optimize its Mean Square Error (MSE).
      mseOptimizer - optimizer to find the threshold value that minimizes MSE for calibration parameters.
      Throws:
      IllegalArgumentException - if magnetometer calibrator does not use StandardDeviationBodyMagneticFluxDensity measurements.
    • BracketedMagnetometerIntervalDetectorThresholdFactorOptimizer

      public BracketedMagnetometerIntervalDetectorThresholdFactorOptimizer(MagnetometerIntervalDetectorThresholdFactorOptimizerDataSource dataSource, com.irurueta.navigation.inertial.calibration.magnetometer.MagnetometerNonLinearCalibrator calibrator, com.irurueta.numerical.optimization.BracketedSingleOptimizer mseOptimizer)
      Constructor.
      Parameters:
      dataSource - instance in charge of retrieving data for this mseOptimizer.
      calibrator - a magnetometer calibrator to be used to optimize its Mean Square Error (MSE).
      mseOptimizer - optimizer to find the threshold value that minimizes MSE for calibration parameters.
      Throws:
      IllegalArgumentException - if magnetometer calibrator does not use StandardDeviationBodyMagneticFluxDensity measurements.
  • Method Details

    • getMseOptimizer

      public com.irurueta.numerical.optimization.BracketedSingleOptimizer getMseOptimizer()
      Gets the bracketed single optimizer used to find the threshold factor value that minimizes the Mean Square Error (MSE) for calibration parameters.
      Returns:
      optimizer to find the threshold factor value that minimizes the MSE for calibration parameters.
    • setMseOptimizer

      public void setMseOptimizer(com.irurueta.numerical.optimization.BracketedSingleOptimizer optimizer) throws com.irurueta.navigation.LockedException
      Sets the bracketed single optimizer used to find the threshold factor value that minimizes the Mean Square Error (MSE) for calibration parameters.
      Parameters:
      optimizer - optimizer to find the threshold factor value that minimizes the MSE for calibration parameters.
      Throws:
      com.irurueta.navigation.LockedException - if optimizer is already running.
    • isReady

      public boolean isReady()
      Indicates whether this optimizer is ready to start optimization.
      Overrides:
      isReady in class MagnetometerIntervalDetectorThresholdFactorOptimizer
      Returns:
      true if this optimizer is ready, false otherwise.
    • optimize

      public double optimize() throws com.irurueta.navigation.NotReadyException, com.irurueta.navigation.LockedException, IntervalDetectorThresholdFactorOptimizerException
      Optimizes the threshold factor for a static interval detector or measurement generator to minimize MSE (Minimum Squared Error) of estimated calibration parameters.
      Specified by:
      optimize in class IntervalDetectorThresholdFactorOptimizer<com.irurueta.navigation.inertial.BodyKinematicsAndMagneticFluxDensity,MagnetometerIntervalDetectorThresholdFactorOptimizerDataSource>
      Returns:
      optimized threshold factor.
      Throws:
      com.irurueta.navigation.NotReadyException - if this optimizer is not ready to start optimization.
      com.irurueta.navigation.LockedException - if optimizer is already running.
      IntervalDetectorThresholdFactorOptimizerException - if optimization fails for some reason.
    • initializeOptimizerListeners

      private void initializeOptimizerListeners()
      Initializes optimizer listener.