Class ExhaustiveMagnetometerIntervalDetectorThresholdFactorOptimizer
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.ExhaustiveMagnetometerIntervalDetectorThresholdFactorOptimizer
- All Implemented Interfaces:
com.irurueta.navigation.inertial.calibration.AccelerometerNoiseRootPsdSource
public class ExhaustiveMagnetometerIntervalDetectorThresholdFactorOptimizer
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 makes an exhaustive search between minimum and maximum
threshold factor values to find the threshold value that produces the
minimum Mean Square Error (MSE) for calibration parameters.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final double
Default step value to make exhaustive search of threshold factor values.private double
Step to make exhaustive search of threshold factor values betweenMagnetometerIntervalDetectorThresholdFactorOptimizer.getMaxThresholdFactor()
andMagnetometerIntervalDetectorThresholdFactorOptimizer.getMaxThresholdFactor()
.Fields inherited from class com.irurueta.navigation.inertial.calibration.intervals.thresholdfactor.MagnetometerIntervalDetectorThresholdFactorOptimizer
DEFAULT_MAX_THRESHOLD_FACTOR, DEFAULT_MIN_THRESHOLD_FACTOR, maxThresholdFactor, minThresholdFactor
Fields inherited from class com.irurueta.navigation.inertial.calibration.intervals.thresholdfactor.IntervalDetectorThresholdFactorOptimizer
dataSource, DEFAULT_PROGRESS_DELTA, listener, MAX_PROGRESS_DELTA, MIN_PROGRESS_DELTA, minMse, optimalThresholdFactor, previousProgress, progress, progressDelta, running
-
Constructor Summary
ConstructorsConstructorDescriptionConstructor.ExhaustiveMagnetometerIntervalDetectorThresholdFactorOptimizer
(MagnetometerIntervalDetectorThresholdFactorOptimizerDataSource dataSource) Constructor.ExhaustiveMagnetometerIntervalDetectorThresholdFactorOptimizer
(MagnetometerIntervalDetectorThresholdFactorOptimizerDataSource dataSource, com.irurueta.navigation.inertial.calibration.magnetometer.MagnetometerNonLinearCalibrator calibrator) Constructor.ExhaustiveMagnetometerIntervalDetectorThresholdFactorOptimizer
(com.irurueta.navigation.inertial.calibration.magnetometer.MagnetometerNonLinearCalibrator calibrator) Constructor. -
Method Summary
Modifier and TypeMethodDescriptiondouble
Gets the step to make exhaustive search of threshold values betweenMagnetometerIntervalDetectorThresholdFactorOptimizer.getMaxThresholdFactor()
andMagnetometerIntervalDetectorThresholdFactorOptimizer.getMaxThresholdFactor()
.double
optimize()
Optimizes the threshold factor for a static interval detector or measurement generator to minimize MSE (Minimum Squared Error) of estimated calibration parameters.void
setThresholdFactorStep
(double thresholdStep) Sets step to make exhaustive search of threshold values betweenMagnetometerIntervalDetectorThresholdFactorOptimizer.getMaxThresholdFactor()
andMagnetometerIntervalDetectorThresholdFactorOptimizer.getMaxThresholdFactor()
.Methods inherited from class com.irurueta.navigation.inertial.calibration.intervals.thresholdfactor.MagnetometerIntervalDetectorThresholdFactorOptimizer
evaluateForThresholdFactor, getAccelerometerBaseNoiseLevel, getAccelerometerBaseNoiseLevelAsMeasurement, getAccelerometerBaseNoiseLevelAsMeasurement, getAccelerometerBaseNoiseLevelPsd, getAccelerometerBaseNoiseLevelRootPsd, getBaseNoiseLevelAbsoluteThreshold, getBaseNoiseLevelAbsoluteThresholdAsMeasurement, getBaseNoiseLevelAbsoluteThresholdAsMeasurement, getCalibrator, getEstimatedHardIron, getEstimatedMm, getInitialStaticSamples, getInstantaneousNoiseLevelFactor, getMaxDynamicSamples, getMaxThresholdFactor, getMinStaticSamples, getMinThresholdFactor, getQualityScoreMapper, getThreshold, getThresholdAsMeasurement, getThresholdAsMeasurement, getTimeInterval, getTimeIntervalAsTime, getTimeIntervalAsTime, getWindowSize, isReady, setBaseNoiseLevelAbsoluteThreshold, setBaseNoiseLevelAbsoluteThreshold, setCalibrator, setInitialStaticSamples, setInstantaneousNoiseLevelFactor, setMaxDynamicSamples, setMinStaticSamples, setQualityScoreMapper, setThresholdFactorRange, setTimeInterval, setTimeInterval, setWindowSize
Methods inherited from class com.irurueta.navigation.inertial.calibration.intervals.thresholdfactor.IntervalDetectorThresholdFactorOptimizer
checkAndNotifyProgress, getDataSource, getListener, getMinMse, getOptimalThresholdFactor, getProgressDelta, initProgress, isRunning, setDataSource, setListener, setProgressDelta
-
Field Details
-
DEFAULT_STEP
public static final double DEFAULT_STEPDefault step value to make exhaustive search of threshold factor values.- See Also:
-
thresholdFactorStep
private double thresholdFactorStepStep to make exhaustive search of threshold factor values betweenMagnetometerIntervalDetectorThresholdFactorOptimizer.getMaxThresholdFactor()
andMagnetometerIntervalDetectorThresholdFactorOptimizer.getMaxThresholdFactor()
.
-
-
Constructor Details
-
ExhaustiveMagnetometerIntervalDetectorThresholdFactorOptimizer
public ExhaustiveMagnetometerIntervalDetectorThresholdFactorOptimizer()Constructor.
-
-
Method Details
-
getThresholdFactorStep
public double getThresholdFactorStep()Gets the step to make exhaustive search of threshold values betweenMagnetometerIntervalDetectorThresholdFactorOptimizer.getMaxThresholdFactor()
andMagnetometerIntervalDetectorThresholdFactorOptimizer.getMaxThresholdFactor()
.- Returns:
- step to make exhaustive search of threshold values.
-
setThresholdFactorStep
public void setThresholdFactorStep(double thresholdStep) throws com.irurueta.navigation.LockedException Sets step to make exhaustive search of threshold values betweenMagnetometerIntervalDetectorThresholdFactorOptimizer.getMaxThresholdFactor()
andMagnetometerIntervalDetectorThresholdFactorOptimizer.getMaxThresholdFactor()
.- Parameters:
thresholdStep
- step to make exhaustive search of threshold values.- Throws:
com.irurueta.navigation.LockedException
- if optimizer is already running.IllegalArgumentException
- if provided value is zero or negative.
-
optimize
public double optimize() throws com.irurueta.navigation.NotReadyException, com.irurueta.navigation.LockedException, IntervalDetectorThresholdFactorOptimizerExceptionOptimizes 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 classIntervalDetectorThresholdFactorOptimizer<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.
-