GyroscopeMeasurementGenerator

class GyroscopeMeasurementGenerator(context: Context, accelerometerSensorType: AccelerometerSensorType = AccelerometerSensorType.ACCELEROMETER_UNCALIBRATED, accelerometerSensorDelay: SensorDelay = SensorDelay.FASTEST, val gyroscopeSensorType: GyroscopeSensorType = GyroscopeSensorType.GYROSCOPE_UNCALIBRATED, val gyroscopeSensorDelay: SensorDelay = SensorDelay.FASTEST, initializationStartedListener: SingleSensorCalibrationMeasurementGenerator.OnInitializationStartedListener<GyroscopeMeasurementGenerator>? = null, initializationCompletedListener: SingleSensorCalibrationMeasurementGenerator.OnInitializationCompletedListener<GyroscopeMeasurementGenerator>? = null, errorListener: SingleSensorCalibrationMeasurementGenerator.OnErrorListener<GyroscopeMeasurementGenerator>? = null, staticIntervalDetectedListener: SingleSensorCalibrationMeasurementGenerator.OnStaticIntervalDetectedListener<GyroscopeMeasurementGenerator>? = null, dynamicIntervalDetectedListener: SingleSensorCalibrationMeasurementGenerator.OnDynamicIntervalDetectedListener<GyroscopeMeasurementGenerator>? = null, staticIntervalSkippedListener: SingleSensorCalibrationMeasurementGenerator.OnStaticIntervalSkippedListener<GyroscopeMeasurementGenerator>? = null, dynamicIntervalSkippedListener: SingleSensorCalibrationMeasurementGenerator.OnDynamicIntervalSkippedListener<GyroscopeMeasurementGenerator>? = null, generatedMeasurementListener: SingleSensorCalibrationMeasurementGenerator.OnGeneratedMeasurementListener<GyroscopeMeasurementGenerator, BodyKinematicsSequence<StandardDeviationTimedBodyKinematics>>? = null, resetListener: SingleSensorCalibrationMeasurementGenerator.OnResetListener<GyroscopeMeasurementGenerator>? = null, accelerometerMeasurementListener: AccelerometerSensorCollector.OnMeasurementListener? = null, var gyroscopeMeasurementListener: GyroscopeSensorCollector.OnMeasurementListener? = null, accuracyChangedListener: SensorCollector.OnAccuracyChangedListener? = null) : SingleSensorCalibrationMeasurementGenerator<GyroscopeMeasurementGenerator, BodyKinematicsSequence<StandardDeviationTimedBodyKinematics>, GyroscopeMeasurementsGenerator, GyroscopeMeasurementsGeneratorListener, TimedBodyKinematics>

Generates measurements that can later be used by gyroscope calibrators. Measurements are generated by taking into account static and dynamic intervals on the device, when the device is kept static (e.g. motionless), or when some force is applied to the device changing its position or orientation. Measurement generator converts device ENU measurements into measurements expressed in local tangent plane NED coordinates.

Constructors

Link copied to clipboard
constructor(context: Context, accelerometerSensorType: AccelerometerSensorType = AccelerometerSensorType.ACCELEROMETER_UNCALIBRATED, accelerometerSensorDelay: SensorDelay = SensorDelay.FASTEST, gyroscopeSensorType: GyroscopeSensorType = GyroscopeSensorType.GYROSCOPE_UNCALIBRATED, gyroscopeSensorDelay: SensorDelay = SensorDelay.FASTEST, initializationStartedListener: SingleSensorCalibrationMeasurementGenerator.OnInitializationStartedListener<GyroscopeMeasurementGenerator>? = null, initializationCompletedListener: SingleSensorCalibrationMeasurementGenerator.OnInitializationCompletedListener<GyroscopeMeasurementGenerator>? = null, errorListener: SingleSensorCalibrationMeasurementGenerator.OnErrorListener<GyroscopeMeasurementGenerator>? = null, staticIntervalDetectedListener: SingleSensorCalibrationMeasurementGenerator.OnStaticIntervalDetectedListener<GyroscopeMeasurementGenerator>? = null, dynamicIntervalDetectedListener: SingleSensorCalibrationMeasurementGenerator.OnDynamicIntervalDetectedListener<GyroscopeMeasurementGenerator>? = null, staticIntervalSkippedListener: SingleSensorCalibrationMeasurementGenerator.OnStaticIntervalSkippedListener<GyroscopeMeasurementGenerator>? = null, dynamicIntervalSkippedListener: SingleSensorCalibrationMeasurementGenerator.OnDynamicIntervalSkippedListener<GyroscopeMeasurementGenerator>? = null, generatedMeasurementListener: SingleSensorCalibrationMeasurementGenerator.OnGeneratedMeasurementListener<GyroscopeMeasurementGenerator, BodyKinematicsSequence<StandardDeviationTimedBodyKinematics>>? = null, resetListener: SingleSensorCalibrationMeasurementGenerator.OnResetListener<GyroscopeMeasurementGenerator>? = null, accelerometerMeasurementListener: AccelerometerSensorCollector.OnMeasurementListener? = null, gyroscopeMeasurementListener: GyroscopeSensorCollector.OnMeasurementListener? = null, accuracyChangedListener: SensorCollector.OnAccuracyChangedListener? = null)

Properties

Link copied to clipboard

Gets average time interval between accelerometer samples expressed in seconds (s). This is only available once this generator completes initialization.

Link copied to clipboard

Gets average time interval between accelerometer samples. This is only available once this generator completes initialization.

Link copied to clipboard

Gets accelerometer measurement base noise level that has been detected during initialization expressed in meters per squared second (m/s^2). This is only available once detector completes initialization.

Link copied to clipboard
open override val accelerometerBaseNoiseLevelAsMeasurement: Acceleration?

Gets accelerometer measurement base noise level that has been detected during initialization. This is only available once detector completes initialization.

Link copied to clipboard

Gets measurement base noise level PSD (Power Spectral Density) expressed in (m^2 * s^-3).

Link copied to clipboard

Gets measurement base noise level root PSD (Power Spectral Density) expressed in (m * s^-1.5). This is only available once detector completes initialization.

Link copied to clipboard

listener to notify when a new accelerometer measurement is received.

Link copied to clipboard

Gets accelerometer sensor being used to obtain measurements and detect static/dynamic intervals, or null if not available. This can be used to obtain additional information about the sensor.

Link copied to clipboard

Delay of sensor between samples.

Link copied to clipboard

One of the supported accelerometer sensor types.

Gets estimated standard deviation of time interval between accelerometer measurements expressed in seconds (s). This is only available once detector completes initialization.

Gets estimated standard deviation of time interval between accelerometer measurements. This is only available once detector completes initialization.

Link copied to clipboard

Gets estimated variance of time interval between accelerometer measurements expressed in squared seconds (s^2). This is only available once detector completes initialization.

Link copied to clipboard

listener to notify when sensor accuracy changes.

Link copied to clipboard

Gets or sets overall absolute threshold to determine whether there has been excessive motion during the whole initialization phase. Failure will be detected if estimated base noise level exceeds this threshold when initialization completes. This threshold is expressed in meters per squared second (m/s^2).

open override var baseNoiseLevelAbsoluteThresholdAsMeasurement: Acceleration

Gets or sets overall absolute threshold to determine whether there has been excessive motion during the whole initialization phase. Failure will be detected if estimated base noise level exceeds this threshold when initialization completes.

Link copied to clipboard

Android context.

Link copied to clipboard

listener to notify when a dynamic interval is skipped if its duration is too long.

Link copied to clipboard

listener to notify when a new calibration measurement is generated.

Link copied to clipboard

Gets gyroscope measurement base noise level that has been detected during initialization expressed in radians per second (rad/s). This is only available once generator completes initialization.

Link copied to clipboard

Gets gyroscope measurement base noise level that has been detected during initialization. This is only available once generator completes initialization.

Link copied to clipboard

listener to notify when a new gyroscope measurement is received.

Link copied to clipboard

Gets gyroscope sensor being used to obtain measurements, or null if not available. This can be used to obtain additional information about the sensor.

Link copied to clipboard

Delay of gyroscope sensor between samples.

Link copied to clipboard

One of the supported gyroscope sensor types.

Link copied to clipboard
open override var initialStaticSamples: Int

Gets or sets number of samples to be processed initially while keeping the sensor static in order to find the base noise level when device is static.

Link copied to clipboard

Gets or sets factor to determine that a sudden movement has occurred during initialization if instantaneous noise level exceeds accumulated noise level by this factor amount. This factor is unit-less.

Link copied to clipboard

Indicates whether last dynamic interval must be skipped.

Link copied to clipboard
open override val isStaticIntervalSkipped: Boolean

Indicates whether last static interval must be skipped.

Link copied to clipboard
open override var maxDynamicSamples: Int

Gets or sets maximum number of samples allowed in dynamic intervals. Dynamic intervals exceeding this value are discarded.

Link copied to clipboard
open override var minStaticSamples: Int

Gets or sets minimum number of samples required in a static interval to be taken into account. Smaller static intervals will be discarded.

Number of accelerometer measurements that have been processed.

Link copied to clipboard

Number of gyroscope measurements that have been processed.

Link copied to clipboard
open override val processedDynamicSamples: Int

Gets number of samples that have been processed in a dynamic period so far.

Link copied to clipboard
open override val processedStaticSamples: Int

Gets number of samples that have been processed in a static period so far.

Link copied to clipboard
Link copied to clipboard

Indicates whether this generator is already running.

Link copied to clipboard

listener to notify when a static interval is skipped if its duration is too short.

Link copied to clipboard
open override val status: Status

Gets status of measurement generator. Initially the generator will be idle. Once it starts, it will start the initialization phase, and once initialization is complete, it will switch between static or dynamic interval until generator is stopped or an error occurs.

Link copied to clipboard
open override val threshold: Double?

Gets estimated threshold to determine static/dynamic period changes expressed in meters per squared second (m/s^2). This is only available once detector completes initialization.

Link copied to clipboard
open override val thresholdAsMeasurement: Acceleration?

Gets estimated threshold to determine static/dynamic period changes. This is only available once detector completes initialization.

Link copied to clipboard
open override var thresholdFactor: Double

Gets or sets factor to be applied to detected base noise level in order to determine threshold for static/dynamic period changes. This factor is unit-less.

Link copied to clipboard
open override var windowSize: Int

Gets or sets length of number of samples to keep within the window being processed to determine instantaneous sensor noise level. Window size must always be larger than allowed minimum value, which is 2 and must have an odd value.

Functions

Gets average time interval between accelerometer measurements. This is only available once detector completes initialization.

open override fun getAccelerometerBaseNoiseLevelAsMeasurement(result: Acceleration): Boolean

Gets sensor measurement base noise level that has been detected during initialization. This is only available once detector completes initialization.

Gets estimated standard deviation of time interval between accelerometer measurements. This is only available once detector completes initialization.

open override fun getBaseNoiseLevelAbsoluteThresholdAsMeasurement(result: Acceleration)

Gets overall absolute threshold to determine whether there has been excessive motion during the whole initialization phase. Failure will be detected if estimated base noise level exceeds this threshold when initialization completes.

Link copied to clipboard

Gets gyroscope measurement base noise level that has been detected during initialization. This is only available once generator completes initialization.

Link copied to clipboard
open override fun getThresholdAsMeasurement(result: Acceleration): Boolean

Gets estimated threshold to determine static/dynamic period changes. This is only available once detector completes initialization.

Link copied to clipboard
open override fun start()

Starts collection of sensor measurements.

Link copied to clipboard
open override fun stop()

Stops collection of sensor measurements.