KalmanAbsoluteAttitudeProcessor3

class KalmanAbsoluteAttitudeProcessor3(location: Location? = null, var currentDate: Date? = null, var currentTemperature: Double = DEFAULT_TEMPERATURE_CELSIUS, val computeEulerAngles: Boolean = true, val computeCovariances: Boolean = true, val computeEcefAttitudeCovariance: Boolean = true, val computeEulerAnglesCovariance: Boolean = true, val computeEcefAccelerationCovariance: Boolean = true, val computeNedRotationAxisCovariance: Boolean = true, val gyroscopeNoisePsd: Double = DEFAULT_GYROSCOPE_NOISE_PSD, val accelerometerNoiseStandardDeviation: Double = DEFAULT_ACCELEROMETER_NOISE_STANDARD_DEVIATION, magnetometerNoiseStandardDeviation: Double = DEFAULT_MAGNETOMETER_NOISE_STANDARD_DEVIATION, temperatureStandardDeviation: Double = DEFAULT_TEMPERATURE_NOISE_STANDARD_DEVIATION, quaternionStepIntegratorType: QuaternionStepIntegratorType = QuaternionStepIntegrator.DEFAULT_TYPE, val freeFallThreshold: Double = DEFAULT_FREE_FALL_THRESHOLD, val symmetricThreshold: Double = SYMMETRIC_THRESHOLD, val processorListener: KalmanAbsoluteAttitudeProcessor3.OnProcessedListener? = null, val numericalInstabilitiesListener: KalmanAbsoluteAttitudeProcessor3.OnNumericalInstabilitiesDetectedListener? = null)

Class.

Parameters

location

Gets or sets current device location. If null, it is assumed that device is located at magnetic field equator (with zero dip and declination angles). This is only taken into account if useWorldMagneticModel is true.

currentDate

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

Constructors

Link copied to clipboard
constructor(location: Location? = null, currentDate: Date? = null, currentTemperature: Double = DEFAULT_TEMPERATURE_CELSIUS, computeEulerAngles: Boolean = true, computeCovariances: Boolean = true, computeEcefAttitudeCovariance: Boolean = true, computeEulerAnglesCovariance: Boolean = true, computeEcefAccelerationCovariance: Boolean = true, computeNedRotationAxisCovariance: Boolean = true, gyroscopeNoisePsd: Double = DEFAULT_GYROSCOPE_NOISE_PSD, accelerometerNoiseStandardDeviation: Double = DEFAULT_ACCELEROMETER_NOISE_STANDARD_DEVIATION, magnetometerNoiseStandardDeviation: Double = DEFAULT_MAGNETOMETER_NOISE_STANDARD_DEVIATION, temperatureStandardDeviation: Double = DEFAULT_TEMPERATURE_NOISE_STANDARD_DEVIATION, quaternionStepIntegratorType: QuaternionStepIntegratorType = QuaternionStepIntegrator.DEFAULT_TYPE, freeFallThreshold: Double = DEFAULT_FREE_FALL_THRESHOLD, symmetricThreshold: Double = SYMMETRIC_THRESHOLD, processorListener: KalmanAbsoluteAttitudeProcessor3.OnProcessedListener? = null, numericalInstabilitiesListener: KalmanAbsoluteAttitudeProcessor3.OnNumericalInstabilitiesDetectedListener? = null)

Types

Link copied to clipboard
object Companion
Link copied to clipboard

Interface to notify when error covariances are reset because numerical instabilities have been detected in Kalman filter.

Link copied to clipboard
fun interface OnProcessedListener

Interface to notify when a new attitude has been processed.

Properties

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
val ecefAcceleration: AccelerationTriad

Contains estimated linear acceleration applied to the device (which is equal to the sensed specific force minus the gravity component) expressed in ECEF coordinates. By integrating linear acceleration speed can be estimated, and by double integration, ECEF position can be estimated as well.

Link copied to clipboard

Error covariance of estimated ECEF acceleration state. This is only available if [computeCovariances and computeEcefAccelerationCovariance] are true.

Link copied to clipboard
val ecefAttitude: Quaternion

Estimated ECEF attitude.

Link copied to clipboard

Error covariance of estimated quaternion attitude expressed in ECEF coordinates. This is only available if computeCovariances and computeEcefAttitudeCovariance are true.

Link copied to clipboard

Euler angles associated to estimated NED attitude. Array contains roll, pitch and yaw angles expressed in radians (rad) and following order indicated here. This is only available if computeCovariances and computeEulerAngles are true.

Link copied to clipboard

Error covariance of estimate Euler angles for local NED attitude. This is only available if computeCovariances and computeEulerAnglesCovariance are true.

Link copied to clipboard
Link copied to clipboard

Gets expected gravity norm at current location. If no location is available, average gravity at sea level is returned instead.

Link copied to clipboard

Gyroscope interval between measurements expressed in seconds (s).

Link copied to clipboard
Link copied to clipboard

Gets or sets current device location.

Link copied to clipboard

Obtains magnetic field declination of local NED reference system expressed in radians if World Magnetic Model is used, otherwise zero is returned. Magnetic field declination indicates how much deviation the heading angle has between the magnetic north pole and the true geographic north pole.

Link copied to clipboard

Returns magnetic field dip angle of local NED reference system expressed in radians if World Magnetic Model is used, otherwise zero is returned. Magnetic field dip angle indicates how much the magnetic field points towards Earth's center. At magnetic equator dip angle is zero, at North magnetic pole is +90º, and at South magnetic pose is -90º. At the north hemisphere dip angle is positive (magnetic field points downwards), indicating the vertical deviation of magnetic field respect local Earth surface at a given position (latitude, longitude and height) At the south hemisphere dip angle is negative (magnetic field points upwards), indicating the vertical deviation of magnetic field respect local Earth surface at a given position (latitude, longitude and height)

Link copied to clipboard
val nedAttitude: Quaternion

Gets current local body attitude expressed in NED coordinate system.

Link copied to clipboard

Error covariance of estimated local body rotation axis expressed in NED coordinates. This is only available if computeCovariances and computeNedRotationAxisCovariance are true.

Link copied to clipboard
Link copied to clipboard

Indicates whether world magnetic model is taken into account magnetic field dip and declination angles, so that orientation pointing to the true north is estimated.

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

Processes provided synced accelerometer, gyroscope and magnetometer measurement to obtain a relative leveled attitude.

fun process(accelerometerMeasurement: AccelerometerSensorMeasurement, gyroscopeMeasurement: GyroscopeSensorMeasurement, magnetometerMeasurement: MagnetometerSensorMeasurement, timestamp: Long = gyroscopeMeasurement.timestamp): Boolean

Processes provided accelerometer, gyroscope and magnetometer measurements at provided timestamp to obtain a relative leveled attitude.

Link copied to clipboard
fun reset()

Resets internal parameters.