AccurateLevelingProcessor

Estimates leveling of device (roll and pitch angle) by using estimated gravity vector. This processor 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.

Constructors

Link copied to clipboard
constructor(location: Location, processorListener: BaseLevelingProcessor.OnProcessedListener? = null)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
var attitude: Quaternion

Instance to be reused containing estimated leveling attitude (roll and pitch angles) in NED coordinates.

Link copied to clipboard
val gravity: AccelerationTriad

Gets a new triad containing gravity component of specific force expressed in NED coordinates and in meters per squared second (m/s^2).

Link copied to clipboard
var gx: Double

X-coordinates of last sensed gravity component of specific force expressed in NED coordinates and in meters per squared second (m/s^2).

Link copied to clipboard
var gy: Double

Y-coordinate of last sensed gravity component of specific force expressed in NED coordinates and in meters per squared second (m/s^2).

Link copied to clipboard
var gz: Double

Z-coordinate of last sensed gravity component of specific force expressed in NED coordinates and in meters per squared second (m/s^2).

Link copied to clipboard

device location.

Link copied to clipboard

listener to notify new leveling measurements.

Functions

Link copied to clipboard
fun getGravity(result: AccelerationTriad)

Updates provided triad to contain gravity component of specific force expressed in NED coordinates and in meters per squared second (m/s^2).

Link copied to clipboard
open override fun process(gx: Double, gy: Double, gz: Double)

Processes provided gravity components estimated using a BaseGravityProcessor.

Link copied to clipboard
fun reset()

Resets this processor to its initial values.