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 being reused to externally notify attitudes so that it does not have additional effects if it is modified.

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

Time interval expressed in seconds between consecutive gyroscope measurements

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

Factor to take into account when interpolation value is computed and useIndirectInterpolation is enabled to determine actual interpolation value based on current relative attitude rotation velocity.

Link copied to clipboard

Interpolation value to be used to combine both geomagnetic and relative attitudes. Must be between 0.0 and 1.0 (both included). The closer to 0.0 this value is, the more resemblance the result will have to a pure geomagnetic (which feels more jerky when using accelerometer). On the contrary, the closer to 1.0 this value is, the more resemblance the result will have to a pure non-leveled relative attitude (which feels softer but might have arbitrary roll pitch and yaw Euler angles).

Link copied to clipboard

Gets or sets device location

Link copied to clipboard

Threshold to determine that geomagnetic attitude has largely diverged and if situation is not reverted soon, attitude will be reset to geomagnetic one.

Link copied to clipboard

Threshold to determine that current geomagnetic attitude appears to be an outlier respect to estimated fused attitude. When geomagnetic attitude and fused attitudes diverge, fusion is not performed, and instead only gyroscope relative attitude is used for fusion estimation.

Link copied to clipboard

Threshold to determine when fused attitude has largely diverged for a given number of samples and must be reset.

Link copied to clipboard

Indicates whether accurate leveling must be used or not.

Indicates whether accurate non-leveled relative attitude processor must be used or not.

Link copied to clipboard

Indicates whether fusion between leveling and relative attitudes occurs based on changing interpolation value that depends on actual relative attitude rotation velocity.

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

Processes provided synced measurement to estimate current fused absolute attitude.

Link copied to clipboard
fun reset()

Resets internal parameters.