Package-level declarations

Types

Link copied to clipboard
Link copied to clipboard

Estimates leveling of device (roll and pitch angle) by estimating gravity vector using accelerometer measurements only. This estimator does not estimate attitude yaw angle, as either a magnetometer or gyroscope would be needed. This estimator is more accurate than LevelingEstimator since it takes into account device location (which requires location permission), and at the expense of higher CPU load.

Link copied to clipboard
class AccurateLevelingEstimator2(context: Context, location: Location, sensorDelay: SensorDelay = SensorDelay.GAME, useAccelerometer: Boolean = true, startOffsetEnabled: Boolean = true, accelerometerSensorType: AccelerometerSensorType = AccelerometerSensorType.ACCELEROMETER_UNCALIBRATED, accelerometerAveragingFilter: AveragingFilter = LowPassAveragingFilter(), estimateCoordinateTransformation: Boolean = false, estimateEulerAngles: Boolean = true, levelingAvailableListener: AccurateLevelingEstimator2.OnLevelingAvailableListener? = null, accuracyChangedListener: AccurateLevelingEstimator2.OnAccuracyChangedListener? = null, adjustGravityNorm: Boolean = true) : BaseLevelingEstimator2<AccurateLevelingEstimator2, AccurateLevelingEstimator2.OnLevelingAvailableListener, AccurateLevelingEstimator2.OnAccuracyChangedListener>

Estimates leveling of device (roll and pitch angle) by estimating gravity vector using accelerometer measurements only. This estimator does not estimate attitude yaw angle, as either a magnetometer or gyroscope would be needed. This estimator is more accurate than LevelingEstimator2 since it takes into account device location (which requires location permission), and at the expense of higher CPU load.

class AccurateRelativeGyroscopeAttitudeEstimator(context: Context, sensorType: GyroscopeSensorType = GyroscopeSensorType.GYROSCOPE_UNCALIBRATED, sensorDelay: SensorDelay = SensorDelay.GAME, estimateCoordinateTransformation: Boolean = false, estimateEulerAngles: Boolean = true, attitudeAvailableListener: AccurateRelativeGyroscopeAttitudeEstimator.OnAttitudeAvailableListener? = null, gyroscopeMeasurementListener: GyroscopeSensorCollector.OnMeasurementListener? = null) : BaseRelativeGyroscopeAttitudeEstimator<AccurateRelativeGyroscopeAttitudeEstimator, AccurateRelativeGyroscopeAttitudeEstimator.OnAttitudeAvailableListener>

Estimates relative attitude respect to start attitude by integrating gyroscope sensor data using Runge-Kutta integration for greater accuracy, and without using any additional sensors.

Estimates relative attitude respect to start attitude by integrating gyroscope sensor data using Runge-Kutta integration for greater accuracy, and without using any additional sensors.

Link copied to clipboard
class AttitudeEstimator2(val context: Context, val sensorDelay: SensorDelay = SensorDelay.GAME, val attitudeSensorType: AttitudeSensorType = AttitudeSensorType.ABSOLUTE_ATTITUDE, val startOffsetEnabled: Boolean = true, val estimateCoordinateTransformation: Boolean = false, val estimateEulerAngles: Boolean = true, var attitudeAvailableListener: AttitudeEstimator2.OnAttitudeAvailableListener? = null, var accuracyChangedListener: AttitudeEstimator2.OnAccuracyChangedListener? = null)

Estimates absolute or relative attitude using Android rotation vector sensors. When using an AttitudeSensorType.ABSOLUTE_ATTITUDE, android combines accelerometer and magnetometer measurements to obtain a leveled absolute attitude respect to Earth. When using an AttitudeSensorType.RELATIVE_ATTITUDE, android does not use a magnetometer and a leveled attitude is obtained with an arbitrary yaw angle respect to Earth.

Link copied to clipboard
abstract class BaseLevelingEstimator<T : BaseLevelingEstimator<T, L>, L : BaseLevelingEstimator.OnLevelingAvailableListener<T, L>>(val context: Context, val sensorDelay: SensorDelay = SensorDelay.GAME, val useAccelerometer: Boolean = false, val accelerometerSensorType: AccelerometerSensorType = AccelerometerSensorType.ACCELEROMETER_UNCALIBRATED, val accelerometerAveragingFilter: AveragingFilter = LowPassAveragingFilter(), val estimateCoordinateTransformation: Boolean = false, val estimateEulerAngles: Boolean = true, var levelingAvailableListener: L? = null, var gravityEstimationListener: GravityEstimator.OnEstimationListener? = null)

Base class for estimators of device leveling (roll and pitch angles) by estimating gravity vector using accelerometer measurements only. Implementations of this estimator does not estimate attitude yaw angle, as either a magnetometer or gyroscope would be needed.

Link copied to clipboard
abstract class BaseLevelingEstimator2<T : BaseLevelingEstimator2<T, L1, L2>, L1 : BaseLevelingEstimator2.OnLevelingAvailableListener<T, L1, L2>, L2 : BaseLevelingEstimator2.OnAccuracyChangedListener<T, L1, L2>>(val context: Context, val sensorDelay: SensorDelay, val useAccelerometer: Boolean, val startOffsetEnabled: Boolean, val accelerometerSensorType: AccelerometerSensorType, val accelerometerAveragingFilter: AveragingFilter, val estimateCoordinateTransformation: Boolean, val estimateEulerAngles: Boolean, var levelingAvailableListener: L1?, var accuracyChangedListener: L2?, adjustGravityNorm: Boolean)

Base class for estimators of device leveling (roll and pitch angles) by estimating gravity vector using accelerometer measurements only. Implementations of this estimator does not estimate attitude yaw angle, as either a magnetometer or gyroscope would be needed.

Link copied to clipboard
abstract class BaseRelativeGyroscopeAttitudeEstimator<T : BaseRelativeGyroscopeAttitudeEstimator<T, L>, L : BaseRelativeGyroscopeAttitudeEstimator.OnAttitudeAvailableListener<T, L>>(val context: Context, val sensorType: GyroscopeSensorType = GyroscopeSensorType.GYROSCOPE_UNCALIBRATED, val sensorDelay: SensorDelay = SensorDelay.GAME, val estimateCoordinateTransformation: Boolean = false, val estimateEulerAngles: Boolean = true, var attitudeAvailableListener: L? = null, var gyroscopeMeasurementListener: GyroscopeSensorCollector.OnMeasurementListener?)

Base class for estimators of device relative attitude respect to start attitude by integrating gyroscope sensor data without using any additional sensors.

Link copied to clipboard
abstract class BaseRelativeGyroscopeAttitudeEstimator2<T : BaseRelativeGyroscopeAttitudeEstimator2<T, L1, L2>, L1 : BaseRelativeGyroscopeAttitudeEstimator2.OnAttitudeAvailableListener<T, L1, L2>, L2 : BaseRelativeGyroscopeAttitudeEstimator2.OnAccuracyChangedListener<T, L1, L2>>(val context: Context, val sensorType: GyroscopeSensorType, val sensorDelay: SensorDelay, val startOffsetEnabled: Boolean, val estimateCoordinateTransformation: Boolean, val estimateEulerAngles: Boolean, var attitudeAvailableListener: L1?, var accuracyChangedListener: L2?)

Base class for estimators of device relative attitude respect to start attitude by integrating gyroscope sensor data without using any additional sensors.

Link copied to clipboard

Estimates a fused absolute attitude, where accelerometer + magnetometer measurements are fused with relative attitude obtained from gyroscope ones. This is equivalent to FusedGeomagneticAttitudeEstimator with an additional filtering layer, which requires additional cpu usage.

Link copied to clipboard
class DoubleFusedGeomagneticAttitudeEstimator2(val context: Context, location: Location? = null, val sensorDelay: SensorDelay = SensorDelay.GAME, val useAccelerometer: Boolean = true, val startOffsetEnabled: Boolean = true, val accelerometerSensorType: AccelerometerSensorType = AccelerometerSensorType.ACCELEROMETER_UNCALIBRATED, val magnetometerSensorType: MagnetometerSensorType = MagnetometerSensorType.MAGNETOMETER_UNCALIBRATED, val accelerometerAveragingFilter: AveragingFilter = LowPassAveragingFilter(), val gyroscopeSensorType: GyroscopeSensorType = GyroscopeSensorType.GYROSCOPE_UNCALIBRATED, worldMagneticModel: WorldMagneticModel? = null, timestamp: Date = Date(), useWorldMagneticModel: Boolean = false, useAccurateLevelingEstimator: Boolean = false, useAccurateRelativeGyroscopeAttitudeEstimator: Boolean = false, val estimateCoordinateTransformation: Boolean = false, val estimateEulerAngles: Boolean = true, var attitudeAvailableListener: DoubleFusedGeomagneticAttitudeEstimator2.OnAttitudeAvailableListener? = null, var accuracyChangedListener: DoubleFusedGeomagneticAttitudeEstimator2.OnAccuracyChangedListener? = null, var bufferFilledListener: DoubleFusedGeomagneticAttitudeEstimator2.OnBufferFilledListener? = null, adjustGravityNorm: Boolean = true)

Estimates a double fused absolute attitude, where accelerometer + magnetometer measurements are fused with leveled relative attitude obtained from gyroscope ones.

Link copied to clipboard

Estimates a fused absolute attitude, where accelerometer + magnetometer measurements are fused with relative attitude obtained from gyroscope ones.

Link copied to clipboard
class FusedGeomagneticAttitudeEstimator2(val context: Context, location: Location? = null, val sensorDelay: SensorDelay = SensorDelay.GAME, val useAccelerometer: Boolean = true, val startOffsetEnabled: Boolean = true, val accelerometerSensorType: AccelerometerSensorType = AccelerometerSensorType.ACCELEROMETER_UNCALIBRATED, val magnetometerSensorType: MagnetometerSensorType = MagnetometerSensorType.MAGNETOMETER_UNCALIBRATED, val accelerometerAveragingFilter: AveragingFilter = LowPassAveragingFilter(), val gyroscopeSensorType: GyroscopeSensorType = GyroscopeSensorType.GYROSCOPE_UNCALIBRATED, worldMagneticModel: WorldMagneticModel? = null, timestamp: Date = Date(), useWorldMagneticModel: Boolean = false, useAccurateLevelingEstimator: Boolean = false, useAccurateRelativeGyroscopeAttitudeEstimator: Boolean = false, val estimateCoordinateTransformation: Boolean = false, val estimateEulerAngles: Boolean = true, var attitudeAvailableListener: FusedGeomagneticAttitudeEstimator2.OnAttitudeAvailableListener? = null, var accuracyChangedListener: FusedGeomagneticAttitudeEstimator2.OnAccuracyChangedListener? = null, var bufferFilledListener: FusedGeomagneticAttitudeEstimator2.OnBufferFilledListener? = null, adjustGravityNorm: Boolean = true)

Estimates a fused absolute attitude, where accelerometer + magnetometer measurements are fused with relative attitude obtained from gyroscope ones.

Link copied to clipboard

Estimates a leveled absolute attitude using accelerometer (or gravity) and magnetometer sensors. Gyroscope is not used in this estimator. Roll and pitch Euler angles are leveled using accelerometer or gravity sensors. Yaw angle is obtained from magnetometer once the leveling is estimated.

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

Estimates a leveled absolute attitude using accelerometer (or gravity) and magnetometer sensors. Gyroscope is not used in this estimator. Roll and pitch Euler angles are leveled using accelerometer or gravity sensors. Yaw angle is obtained from magnetometer once the leveling is estimated.

Link copied to clipboard
class GravityEstimator(val context: Context, val sensorDelay: SensorDelay = SensorDelay.FASTEST, val useAccelerometer: Boolean = false, val accelerometerSensorType: AccelerometerSensorType = AccelerometerSensorType.ACCELEROMETER_UNCALIBRATED, var estimationListener: GravityEstimator.OnEstimationListener? = null, val accelerometerAveragingFilter: AveragingFilter = LowPassAveragingFilter(), var accelerometerMeasurementListener: AccelerometerSensorCollector.OnMeasurementListener? = null, var gravityMeasurementListener: GravitySensorCollector.OnMeasurementListener? = null)

Estimates sensed specific force component associated to gravity by either using the OS gravity sensor or by low-pass filtering accelerometer measurements. It must be noticed that usage of AccelerometerSensorType.ACCELEROMETER is discouraged for posing purposes if useAccelerometer is enabled, as it will yield poor gravity estimation values. Instead either AccelerometerSensorType.ACCELEROMETER_UNCALIBRATED must be used or useAccelerometer must be disabled to use gravity sensor.

Link copied to clipboard
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.

Link copied to clipboard
class KalmanRelativeAttitudeEstimator(val context: Context, val sensorDelay: SensorDelay = SensorDelay.GAME, val startOffsetEnabled: Boolean = false, val accelerometerSensorType: AccelerometerSensorType = AccelerometerSensorType.ACCELEROMETER_UNCALIBRATED, val gyroscopeSensorType: GyroscopeSensorType = GyroscopeSensorType.GYROSCOPE_UNCALIBRATED, val estimateCoordinateTransformation: Boolean = false, val estimateEulerAngles: Boolean = true, val estimateCovariances: Boolean = true, val gyroscopeNoisePsd: Double = KalmanRelativeAttitudeProcessor2.DEFAULT_GYROSCOPE_NOISE_PSD, val accelerometerNoiseStandardDeviation: Double = KalmanRelativeAttitudeProcessor2.DEFAULT_ACCELEROMETER_NOISE_STANDARD_DEVIATION, val minimumUnreliableDurationSeconds: Double = DEFAULT_MINIMUM_UNRELIABLE_DURATION_SECONDS, var attitudeAvailableListener: KalmanRelativeAttitudeEstimator.OnAttitudeAvailableListener? = null, var accuracyChangedListener: KalmanRelativeAttitudeEstimator.OnAccuracyChangedListener? = null, var bufferFilledListener: KalmanRelativeAttitudeEstimator.OnBufferFilledListener? = null)

Estimates a leveled relative attitude, where only yaw Euler angle is relative to the start instant of this estimator. Roll and pitch Euler angles are leveled using accelerometer sensor.

Link copied to clipboard

Estimates a leveled relative attitude, where only yaw Euler angle is relative to the start instant of this estimator. Roll and pitch Euler angles are leveled using accelerometer or gravity sensors.

Link copied to clipboard
class LeveledRelativeAttitudeEstimator2(val context: Context, location: Location? = null, val sensorDelay: SensorDelay = SensorDelay.GAME, val useAccelerometer: Boolean = true, val startOffsetEnabled: Boolean = true, val accelerometerSensorType: AccelerometerSensorType = AccelerometerSensorType.ACCELEROMETER_UNCALIBRATED, val accelerometerAveragingFilter: AveragingFilter = LowPassAveragingFilter(), val gyroscopeSensorType: GyroscopeSensorType = GyroscopeSensorType.GYROSCOPE_UNCALIBRATED, useAccurateLevelingEstimator: Boolean = false, useAccurateRelativeGyroscopeAttitudeEstimator: Boolean = true, val estimateCoordinateTransformation: Boolean = false, val estimateEulerAngles: Boolean = true, var attitudeAvailableListener: LeveledRelativeAttitudeEstimator2.OnAttitudeAvailableListener? = null, var accuracyChangedListener: LeveledRelativeAttitudeEstimator2.OnAccuracyChangedListener? = null, var bufferFilledListener: LeveledRelativeAttitudeEstimator2.OnBufferFilledListener? = null, adjustGravityNorm: Boolean = true)

Estimates a leveled relative attitude, where only yaw Euler angle is relative to the start instant of this estimator. Roll and pitch Euler angles are leveled using accelerometer or gravity sensors.

Link copied to clipboard

Estimates leveling of device (roll and pitch angle) by estimating gravity vector using accelerometer measurements only. This estimator does not estimate attitude yaw angle, as either a magnetometer or gyroscope would be needed. When device is placed vertically (pitch values close to 90 degrees), this estimator might become unreliable. If device is expected to be in this orientation, avoid using this estimator and use AccurateLevelingEstimator instead.

Link copied to clipboard
class LevelingEstimator2(context: Context, sensorDelay: SensorDelay = SensorDelay.GAME, useAccelerometer: Boolean = true, startOffsetEnabled: Boolean = true, accelerometerSensorType: AccelerometerSensorType = AccelerometerSensorType.ACCELEROMETER_UNCALIBRATED, accelerometerAveragingFilter: AveragingFilter = LowPassAveragingFilter(), estimateCoordinateTransformation: Boolean = false, estimateEulerAngles: Boolean = true, levelingAvailableListener: LevelingEstimator2.OnLevelingAvailableListener? = null, accuracyChangedListener: LevelingEstimator2.OnAccuracyChangedListener? = null, location: Location? = null, adjustGravityNorm: Boolean = true) : BaseLevelingEstimator2<LevelingEstimator2, LevelingEstimator2.OnLevelingAvailableListener, LevelingEstimator2.OnAccuracyChangedListener>

Estimates leveling of device (roll and pitch angle) by estimating gravity vector using accelerometer measurements only. This estimator does not estimate attitude yaw angle, as either a magnetometer or gyroscope would be needed. When device is placed vertically (pitch values close to 90 degrees), this estimator might become unreliable. If device is expected to be in this orientation, avoid using this estimator and use AccurateLevelingEstimator2 instead.

Link copied to clipboard
class RelativeGyroscopeAttitudeEstimator(context: Context, sensorType: GyroscopeSensorType = GyroscopeSensorType.GYROSCOPE_UNCALIBRATED, sensorDelay: SensorDelay = SensorDelay.GAME, estimateCoordinateTransformation: Boolean = false, estimateDisplayEulerAngles: Boolean = true, attitudeAvailableListener: RelativeGyroscopeAttitudeEstimator.OnAttitudeAvailableListener? = null, gyroscopeMeasurementListener: GyroscopeSensorCollector.OnMeasurementListener? = null) : BaseRelativeGyroscopeAttitudeEstimator<RelativeGyroscopeAttitudeEstimator, RelativeGyroscopeAttitudeEstimator.OnAttitudeAvailableListener>

Estimates relative attitude respect to start attitude by integrating gyroscope sensor data without using any additional sensors.

Link copied to clipboard
class RelativeGyroscopeAttitudeEstimator2(context: Context, sensorType: GyroscopeSensorType = GyroscopeSensorType.GYROSCOPE_UNCALIBRATED, sensorDelay: SensorDelay = SensorDelay.GAME, startOffsetEnabled: Boolean = false, estimateCoordinateTransformation: Boolean = false, estimateEulerAngles: Boolean = true, attitudeAvailableListener: RelativeGyroscopeAttitudeEstimator2.OnAttitudeAvailableListener? = null, accuracyChangedListener: RelativeGyroscopeAttitudeEstimator2.OnAccuracyChangedListener? = null) : BaseRelativeGyroscopeAttitudeEstimator2<RelativeGyroscopeAttitudeEstimator2, RelativeGyroscopeAttitudeEstimator2.OnAttitudeAvailableListener, RelativeGyroscopeAttitudeEstimator2.OnAccuracyChangedListener>

Estimates relative attitude respect to start attitude by integrating gyroscope sensor data without using any additional sensors.