SingleSensorStaticIntervalMagnetometerCalibrator

constructor(context: Context, location: Location? = null, timestamp: Date = Date(), worldMagneticModel: WorldMagneticModel? = null, sensorType: MagnetometerSensorType = MagnetometerSensorType.MAGNETOMETER_UNCALIBRATED, sensorDelay: SensorDelay = SensorDelay.FASTEST, solveCalibrationWhenEnoughMeasurements: Boolean = true, isGroundTruthInitialHardIron: Boolean = false, initializationStartedListener: SingleSensorStaticIntervalCalibrator.OnInitializationStartedListener<SingleSensorStaticIntervalMagnetometerCalibrator>? = null, initializationCompletedListener: SingleSensorStaticIntervalCalibrator.OnInitializationCompletedListener<SingleSensorStaticIntervalMagnetometerCalibrator>? = null, errorListener: SingleSensorStaticIntervalCalibrator.OnErrorListener<SingleSensorStaticIntervalMagnetometerCalibrator>? = null, initialHardIronAvailableListener: SingleSensorStaticIntervalMagnetometerCalibrator.OnInitialHardIronAvailableListener? = null, newCalibrationMeasurementAvailableListener: SingleSensorStaticIntervalCalibrator.OnNewCalibrationMeasurementAvailableListener<SingleSensorStaticIntervalMagnetometerCalibrator, StandardDeviationBodyMagneticFluxDensity>? = null, readyToSolveCalibrationListener: SingleSensorStaticIntervalCalibrator.OnReadyToSolveCalibrationListener<SingleSensorStaticIntervalMagnetometerCalibrator>? = null, calibrationSolvingStartedListener: SingleSensorStaticIntervalCalibrator.OnCalibrationSolvingStartedListener<SingleSensorStaticIntervalMagnetometerCalibrator>? = null, calibrationCompletedListener: SingleSensorStaticIntervalCalibrator.OnCalibrationCompletedListener<SingleSensorStaticIntervalMagnetometerCalibrator>? = null, stoppedListener: SingleSensorStaticIntervalCalibrator.OnStoppedListener<SingleSensorStaticIntervalMagnetometerCalibrator>? = null, qualityScoreMapper: QualityScoreMapper<StandardDeviationBodyMagneticFluxDensity> = DefaultMagnetometerQualityScoreMapper())

Constructor.

Parameters

context

Android context.

location

Current device location. If location and timestamp are provided, calibration will be based on Earth's magnetic model.If no location and timestamp is provided, calibration will be based on measured magnetic flux density norm at current location.

timestamp

Current timestamp.

worldMagneticModel

Earth's magnetic model. Null to use default model.

sensorType

One of the supported magnetometer sensor types.

sensorDelay

Delay of sensor between samples.

solveCalibrationWhenEnoughMeasurements

true to automatically solve calibration once enough measurements are available, false otherwise.

initializationStartedListener

listener to notify when initialization starts.

initializationCompletedListener

listener to notify when initialization completes.

errorListener

listener to notify errors.

initialHardIronAvailableListener

listener to notify when a guess of hard iron values is obtained.

newCalibrationMeasurementAvailableListener

listener to notify when a new calibration measurement is obtained.

readyToSolveCalibrationListener

listener to notify when calibrator is ready to be solved.

calibrationSolvingStartedListener

listener to notify when calibration solving starts.

calibrationCompletedListener

listener to notify when calibration is successfully completed.

stoppedListener

listener to notify when measurement collection stops.

qualityScoreMapper

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