GeomagneticAttitudeEstimator2

constructor(context: Context, location: Location? = null, sensorDelay: SensorDelay = SensorDelay.GAME, useAccelerometer: Boolean = true, startOffsetEnabled: Boolean = true, accelerometerSensorType: AccelerometerSensorType = AccelerometerSensorType.ACCELEROMETER_UNCALIBRATED, magnetometerSensorType: MagnetometerSensorType = MagnetometerSensorType.MAGNETOMETER_UNCALIBRATED, accelerometerAveragingFilter: AveragingFilter = LowPassAveragingFilter(), worldMagneticModel: WorldMagneticModel? = null, timestamp: Date? = null, useWorldMagneticModel: Boolean = false, useAccurateLevelingEstimator: Boolean = false, estimateCoordinateTransformation: Boolean = false, estimateEulerAngles: Boolean = true, attitudeAvailableListener: GeomagneticAttitudeEstimator2.OnAttitudeAvailableListener? = null, accuracyChangedListener: GeomagneticAttitudeEstimator2.OnAccuracyChangedListener? = null, bufferFilledListener: GeomagneticAttitudeEstimator2.OnBufferFilledListener? = null, adjustGravityNorm: Boolean = true)

Parameters

location

Device location.

worldMagneticModel

Earth's magnetic model. Null to use default model when useWorldMagneticModel is true. If useWorldMagneticModel is false, this is ignored.

timestamp

Timestamp when World Magnetic Model will be evaluated to obtain current magnetic declination. Only taken into account if useWorldMagneticModel is true.

useWorldMagneticModel

true so that world magnetic model is taken into account to adjust attitude yaw angle by current magnetic declination based on current World Magnetic Model, location and timestamp, false to ignore declination.

useAccurateLevelingEstimator

true to use accurate leveling, false to use a normal one.