MagnetometerInternalCalibratorBuilder

Builds a magnetometer calibrator to be used internally by other calibrators.

Constructors

Link copied to clipboard
constructor(measurements: List<StandardDeviationBodyMagneticFluxDensity>, robustPreliminarySubsetSize: Int, minimumRequiredMeasurements: Int, groundTruthMagneticFluxDensityNorm: Double? = null, location: Location? = null, timestamp: Date? = Date(), robustMethod: RobustEstimatorMethod? = null, robustConfidence: Double = StaticIntervalMagnetometerCalibrator.ROBUST_DEFAULT_CONFIDENCE, robustMaxIterations: Int = StaticIntervalMagnetometerCalibrator.ROBUST_DEFAULT_MAX_ITERATIONS, robustThreshold: Double? = null, robustThresholdFactor: Double = StaticIntervalMagnetometerCalibrator.DEFAULT_ROBUST_THRESHOLD_FACTOR, robustStopThresholdFactor: Double = StaticIntervalMagnetometerCalibrator.DEFAULT_ROBUST_STOP_THRESHOLD_FACTOR, isGroundTruthInitialHardIron: Boolean = false, isCommonAxisUsed: Boolean = false, initialHardIronX: Double? = null, initialHardIronY: Double? = null, initialHardIronZ: Double? = null, initialSx: Double = 0.0, initialSy: Double = 0.0, initialSz: Double = 0.0, initialMxy: Double = 0.0, initialMxz: Double = 0.0, initialMyx: Double = 0.0, initialMyz: Double = 0.0, initialMzx: Double = 0.0, initialMzy: Double = 0.0, baseNoiseLevel: Double? = null, worldMagneticModel: WorldMagneticModel? = null, qualityScoreMapper: QualityScoreMapper<StandardDeviationBodyMagneticFluxDensity> = DefaultMagnetometerQualityScoreMapper())

Constructor.

Properties

Link copied to clipboard

magnetometer measurement base noise level that has been detected during initialization expressed in Teslas (T).

Link copied to clipboard

Norm of ground truth magnetic flux density norm to be expected at location where measurements have been made, expressed in Teslas (T).

Link copied to clipboard

x-coordinate of magnetometer hard iron used as an initial guess and expressed in Teslas (T).

Link copied to clipboard

y-coordinate of magnetometer hard iron used as an initial guess and expressed in Teslas (T).

Link copied to clipboard

z-coordinate of magnetometer hard iron used as an initial guess and expressed in Teslas (T).

Link copied to clipboard

initial x-y cross coupling error for magnetometer calibration.

Link copied to clipboard

initial x-z cross coupling error for magnetometer calibration.

Link copied to clipboard

initial y-x cross coupling error for magnetometer calibration.

Link copied to clipboard

initial y-z cross coupling error for magnetometer calibration.

Link copied to clipboard

initial z-x cross coupling error for magnetometer calibration.

Link copied to clipboard

initial z-y cross coupling error for magnetometer calibration.

Link copied to clipboard

initial x scaling factor for magnetometer calibration.

Link copied to clipboard

initial y scaling factor for magnetometer calibration.

Link copied to clipboard

initial z scaling factor for magnetometer calibration.

Link copied to clipboard

Indicates or specifies whether z-axis is assumed to be common for magnetometer, gyroscope and accelerometer.

Link copied to clipboard

Indicates whether magnetometer initial hard iron is considered a ground-truth known hard iron.

Link copied to clipboard

Location of device when running calibration. Either location and timestamp, or only groundTruthMagneticFluxDensityNorm must be provided.

Link copied to clipboard
var measurements: List<StandardDeviationBodyMagneticFluxDensity>

List of magnetometer measurements.

Link copied to clipboard

Minimum number of required measurements to start magnetometer calibration.

Link copied to clipboard
var qualityScoreMapper: QualityScoreMapper<StandardDeviationBodyMagneticFluxDensity>

mapper to convert collected magnetometer measurements into quality scores, based on the amount of standard deviation (the larger the variability, the worse the score will be).

Link copied to clipboard

Confidence of estimated magnetometer calibration result expressed as a value between 0.0 and 1.0. By default 99% of confidence is used, which indicates that with a probability of 99% estimation will be accurate because chosen sub-samples will be inliers (in other terms, outliers will be correctly discarded). This property is only taken into account if a not-null robustMethod is specified.

Link copied to clipboard

Maximum number of iterations to attempt to find a robust magnetometer calibration solution. By default this is 5000. This property is only taken into account if a not-null robustMethod is specified.

Link copied to clipboard
var robustMethod: RobustEstimatorMethod?

Indicates robust method used to solve magnetometer calibration.

Link copied to clipboard

Size of preliminary subsets picked while finding a robust magnetometer calibration solution. This properly is only taken into account if a not-null robustMethod is specified.

Link copied to clipboard

Additional factor to be taken into account for robust methods based on LMedS or PROMedS, where factor is not directly related to LMSE, but to a smaller value. This only applies to magnetometer calibration.

Link copied to clipboard

Threshold to be used to determine whether a measurement is considered an outlier by robust magnetometer calibration algorithms or not. Threshold varies depending on chosen robustMethod. By default, if null is provided, the estimated baseNoiseLevel will be used to determine a suitable threshold. Otherwise, if a value is provided, such value will be used instead. This properly is only taken into account if a not-null robustMethod is specified.

Link copied to clipboard

Factor to be used respect estimated magnetometer base noise level to consider a measurement an outlier when using robust calibration methods. By default this is 3.0 times baseNoiseLevel, which considering the noise level as the standard deviation of a Gaussian distribution, should account for 99% of the cases. Any measurement having an error greater than that in the estimated solution, will be considered an outlier and be discarded.

Link copied to clipboard

Current timestamp. Either location and timestamp, or only groundTruthMagneticFluxDensityNorm must be provided.

Link copied to clipboard
var worldMagneticModel: WorldMagneticModel?

Earth's magnetic model. Null indicates that default model is being used.

Functions

Link copied to clipboard
fun build(): MagnetometerNonLinearCalibrator

Builds an internal magnetometer calibrator based on all provided parameters.