BaseGeomagneticAttitudeProcessor

Base class to estimate leveled absolute attitude using accelerometer (or gravity) and magnetometer sensors. Roll and pitch Euler angles are leveled using accelerometer or gravity sensors. Yaw angle is obtained from magnetometer once the leveling is estimated.

Parameters

M

type of accelerometer or gravity sensor measurement.

S

type of synced sensor measurement.

Inheritors

Constructors

Link copied to clipboard
constructor(processorListener: BaseGeomagneticAttitudeProcessor.OnProcessedListener<M, S>?)

Types

Link copied to clipboard

Interface to notify when a new leveled absolute attitude has been processed.

Properties

Link copied to clipboard

Indicates whether gravity norm must be adjusted to either Earth standard norm, or norm at provided location. If no location is provided, this should only be enabled when device is close to sea level.

Link copied to clipboard

Timestamp being used when World Magnetic Model is evaluated to obtain current magnetic declination. This is only taken into account if useWorldMagneticModel is true. If not defined, current date is assumed.

Link copied to clipboard
val fusedAttitude: Quaternion

Instance to be reused containing estimated attitude in NED coordinates by merging leveled attitude with magnetometer measurements.

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
val 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
val 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
val 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

Gets or sets device location

Link copied to clipboard

listener to notify new leveled absolute attitudes.

Link copied to clipboard

Indicates whether accurate leveling must be used or not.

Link copied to clipboard

Indicates whether 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.

Link copied to clipboard
var worldMagneticModel: WorldMagneticModel?

Earth's magnetic model. If null, the default model is used if useWorldMagneticModel is true. If useWorldMagneticModel is false, this is ignored.

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
abstract fun process(syncedMeasurement: S): Boolean

Processes provided synced measurement to estimate fused leveled absolute attitude.

Link copied to clipboard
fun reset()

Resets internal parameters.