KalmanAbsoluteAttitudeEstimator

class KalmanAbsoluteAttitudeEstimator(val context: Context, location: Location? = null, val sensorDelay: SensorDelay = SensorDelay.GAME, val startOffsetEnabled: Boolean = false, val accelerometerSensorType: AccelerometerSensorType = AccelerometerSensorType.ACCELEROMETER_UNCALIBRATED, val gyroscopeSensorType: GyroscopeSensorType = GyroscopeSensorType.GYROSCOPE_UNCALIBRATED, val magnetometerSensorType: MagnetometerSensorType = MagnetometerSensorType.MAGNETOMETER_UNCALIBRATED, val estimateCoordinateTransformation: Boolean = false, val estimateEulerAngles: Boolean = true, val estimateCovariances: Boolean = true, val gyroscopeNoisePsd: Double = KalmanAbsoluteAttitudeProcessor5.DEFAULT_GYROSCOPE_NOISE_PSD, val accelerometerNoiseStandardDeviation: Double = KalmanAbsoluteAttitudeProcessor5.DEFAULT_ACCELEROMETER_NOISE_STANDARD_DEVIATION, val magnetometerNoiseStandardDeviation: Double = KalmanAbsoluteAttitudeProcessor5.DEFAULT_MAGNETOMETER_NOISE_STANDARD_DEVIATION, val minimumUnreliableDurationSeconds: Double = DEFAULT_MINIMUM_UNRELIABLE_DURATION_SECONDS, var attitudeAvailableListener: KalmanAbsoluteAttitudeEstimator.OnAttitudeAvailableListener? = null, var accuracyChangedListener: KalmanAbsoluteAttitudeEstimator.OnAccuracyChangedListener? = null, var bufferFilledListener: KalmanAbsoluteAttitudeEstimator.OnBufferFilledListener? = null)

Estimates absolute attitude.

Constructors

Link copied to clipboard
constructor(context: Context, location: Location? = null, sensorDelay: SensorDelay = SensorDelay.GAME, startOffsetEnabled: Boolean = false, accelerometerSensorType: AccelerometerSensorType = AccelerometerSensorType.ACCELEROMETER_UNCALIBRATED, gyroscopeSensorType: GyroscopeSensorType = GyroscopeSensorType.GYROSCOPE_UNCALIBRATED, magnetometerSensorType: MagnetometerSensorType = MagnetometerSensorType.MAGNETOMETER_UNCALIBRATED, estimateCoordinateTransformation: Boolean = false, estimateEulerAngles: Boolean = true, estimateCovariances: Boolean = true, gyroscopeNoisePsd: Double = KalmanAbsoluteAttitudeProcessor5.DEFAULT_GYROSCOPE_NOISE_PSD, accelerometerNoiseStandardDeviation: Double = KalmanAbsoluteAttitudeProcessor5.DEFAULT_ACCELEROMETER_NOISE_STANDARD_DEVIATION, magnetometerNoiseStandardDeviation: Double = KalmanAbsoluteAttitudeProcessor5.DEFAULT_MAGNETOMETER_NOISE_STANDARD_DEVIATION, minimumUnreliableDurationSeconds: Double = DEFAULT_MINIMUM_UNRELIABLE_DURATION_SECONDS, attitudeAvailableListener: KalmanAbsoluteAttitudeEstimator.OnAttitudeAvailableListener? = null, accuracyChangedListener: KalmanAbsoluteAttitudeEstimator.OnAccuracyChangedListener? = null, bufferFilledListener: KalmanAbsoluteAttitudeEstimator.OnBufferFilledListener? = null)

Types

Link copied to clipboard
object Companion
Link copied to clipboard

Interface to notify when sensor (either accelerometer or gyroscope) accuracy changes.

Link copied to clipboard

Interface to notify when a new attitude measurement is available.

Link copied to clipboard

Interface to notify when a buffer gets completely filled. When buffers get filled, internal collectors will continue collection at the expense of loosing old data. Consumers of this listener should decide what to do at this point (which might require stopping this estimator).

Properties

Link copied to clipboard

Accelerometer standard deviation expressed in m/s^2. If not provided KalmanAbsoluteAttitudeProcessor5.DEFAULT_ACCELEROMETER_NOISE_STANDARD_DEVIATION will be used.

Link copied to clipboard

One of the supported accelerometer sensor types.

Link copied to clipboard
Link copied to clipboard

listener to notify when a new attitude measurement is available.

Link copied to clipboard

listener to notify that some buffer has been filled. This usually happens when consumer of measurements cannot keep up with the rate at which measurements are generated.

Link copied to clipboard

Android context.

Link copied to clipboard

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

Link copied to clipboard
Link copied to clipboard

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

Link copied to clipboard

Variance of the gyroscope output per Hz (or variance at 1Hz). This is equivalent to the gyroscope PSD (Power Spectral Density) that can be obtained during calibration or with noise estimators. If not provided KalmanAbsoluteAttitudeProcessor5.DEFAULT_GYROSCOPE_NOISE_PSD will be used.

Link copied to clipboard

One of the supported gyroscope sensor types.

Link copied to clipboard

Gets or sets current device location.

Link copied to clipboard

Minimum duration to keep unreliable accuracy when Kalman filter numerical instability is detected. This value is expressed in seconds (s).

Link copied to clipboard

Indicates whether this estimator is running or not.

Link copied to clipboard

Delay of sensors between samples.

Link copied to clipboard

indicates whether start offsets will be computed when first measurement is received or not. True indicates that offset is computed, false assumes that offset is null.

Functions

Link copied to clipboard
fun start(startTimestamp: Long = SystemClock.elapsedRealtimeNanos()): Boolean

Starts this estimator.

Link copied to clipboard
fun stop()

Stops this estimator.