LevelingProcessor

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.

Constructors

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

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

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.