FusedGeomagneticAttitudeEstimator

constructor(context: Context, location: Location? = null, sensorDelay: SensorDelay = SensorDelay.GAME, useAccelerometer: Boolean = true, accelerometerSensorType: AccelerometerSensorType = AccelerometerSensorType.ACCELEROMETER_UNCALIBRATED, magnetometerSensorType: MagnetometerSensorType = MagnetometerSensorType.MAGNETOMETER_UNCALIBRATED, accelerometerAveragingFilter: AveragingFilter = LowPassAveragingFilter(), gyroscopeSensorType: GyroscopeSensorType = GyroscopeSensorType.GYROSCOPE_UNCALIBRATED, worldMagneticModel: WorldMagneticModel? = null, timestamp: Date = Date(), useWorldMagneticModel: Boolean = false, useAccurateLevelingEstimator: Boolean = false, useAccurateRelativeGyroscopeAttitudeEstimator: Boolean = false, estimateCoordinateTransformation: Boolean = false, estimateEulerAngles: Boolean = true, attitudeAvailableListener: FusedGeomagneticAttitudeEstimator.OnAttitudeAvailableListener? = null, accelerometerMeasurementListener: AccelerometerSensorCollector.OnMeasurementListener? = null, gravityMeasurementListener: GravitySensorCollector.OnMeasurementListener? = null, gyroscopeMeasurementListener: GyroscopeSensorCollector.OnMeasurementListener? = null, magnetometerMeasurementListener: MagnetometerSensorCollector.OnMeasurementListener? = null, gravityEstimationListener: GravityEstimator.OnEstimationListener? = null)

Constructor.

Parameters

context

Android context.

location

Device location.

sensorDelay

Delay of sensors between samples.

useAccelerometer

true to use accelerometer sensor, false to use system gravity sensor for leveling purposes.

accelerometerSensorType

One of the supported accelerometer sensor types. (Only used if useAccelerometer is true).

magnetometerSensorType

One of the supported magnetometer sensor types.

accelerometerAveragingFilter

an averaging filter for accelerometer samples to obtain sensed gravity component of specific force. (Only used if useAccelerometer is true).

gyroscopeSensorType

One of the supported gyroscope sensor types.

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. Only taken into account if useWorldMagneticModel is tue.

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.

useAccurateRelativeGyroscopeAttitudeEstimator

true to use accurate non-leveled relative attitude estimator, false to use non-accurate non-leveled relative attitude estimator.

estimateCoordinateTransformation

true to estimate coordinate transformation, false otherwise. If not needed, it can be disabled to improve performance and decrease cpu load.

estimateEulerAngles

true to estimate euler angles, false otherwise. If not needed, it can be disabled to improve performance and decrease cpu load.

attitudeAvailableListener

listener to notify when a new attitude measurement is available.

accelerometerMeasurementListener

listener to notify new accelerometer measurements. (Only used if useAccelerometer is true).

gravityMeasurementListener

listener to notify new gravity measurements. (Only used if useAccelerometer is false).

gyroscopeMeasurementListener

listener to notify new gyroscope measurements.

magnetometerMeasurementListener

listener to notify new magnetometer measurements.

gravityEstimationListener

listener to notify when a new gravity estimation is available.