BaseStaticIntervalWithMeasurementGeneratorCalibrator

abstract class BaseStaticIntervalWithMeasurementGeneratorCalibrator<C : StaticIntervalWithMeasurementGeneratorCalibrator<C, I>, I>(val context: Context, val accelerometerSensorType: AccelerometerSensorType = AccelerometerSensorType.ACCELEROMETER_UNCALIBRATED, val accelerometerSensorDelay: SensorDelay = SensorDelay.FASTEST, val solveCalibrationWhenEnoughMeasurements: Boolean = true, var initializationStartedListener: StaticIntervalWithMeasurementGeneratorCalibrator.OnInitializationStartedListener<C>? = null, var initializationCompletedListener: StaticIntervalWithMeasurementGeneratorCalibrator.OnInitializationCompletedListener<C>? = null, var errorListener: StaticIntervalWithMeasurementGeneratorCalibrator.OnErrorListener<C>? = null, var staticIntervalDetectedListener: StaticIntervalWithMeasurementGeneratorCalibrator.OnStaticIntervalDetectedListener<C>? = null, var dynamicIntervalDetectedListener: StaticIntervalWithMeasurementGeneratorCalibrator.OnDynamicIntervalDetectedListener<C>? = null, var staticIntervalSkippedListener: StaticIntervalWithMeasurementGeneratorCalibrator.OnStaticIntervalSkippedListener<C>? = null, var dynamicIntervalSkippedListener: StaticIntervalWithMeasurementGeneratorCalibrator.OnDynamicIntervalSkippedListener<C>? = null, var readyToSolveCalibrationListener: StaticIntervalWithMeasurementGeneratorCalibrator.OnReadyToSolveCalibrationListener<C>? = null, var calibrationSolvingStartedListener: StaticIntervalWithMeasurementGeneratorCalibrator.OnCalibrationSolvingStartedListener<C>? = null, var calibrationCompletedListener: StaticIntervalWithMeasurementGeneratorCalibrator.OnCalibrationCompletedListener<C>? = null, var stoppedListener: StaticIntervalWithMeasurementGeneratorCalibrator.OnStoppedListener<C>? = null, var accuracyChangedListener: SensorCollector.OnAccuracyChangedListener? = null) : StaticIntervalWithMeasurementGeneratorCalibrator<C, I>

Base class for static interval calibrators, which detects static period of accelerometer measurements along with other sensors (if needed) to solve calibration.

Parameters

I

type of input data to be processed by internal generator.

Inheritors

Constructors

constructor(context: Context, accelerometerSensorType: AccelerometerSensorType = AccelerometerSensorType.ACCELEROMETER_UNCALIBRATED, accelerometerSensorDelay: SensorDelay = SensorDelay.FASTEST, solveCalibrationWhenEnoughMeasurements: Boolean = true, initializationStartedListener: StaticIntervalWithMeasurementGeneratorCalibrator.OnInitializationStartedListener<C>? = null, initializationCompletedListener: StaticIntervalWithMeasurementGeneratorCalibrator.OnInitializationCompletedListener<C>? = null, errorListener: StaticIntervalWithMeasurementGeneratorCalibrator.OnErrorListener<C>? = null, staticIntervalDetectedListener: StaticIntervalWithMeasurementGeneratorCalibrator.OnStaticIntervalDetectedListener<C>? = null, dynamicIntervalDetectedListener: StaticIntervalWithMeasurementGeneratorCalibrator.OnDynamicIntervalDetectedListener<C>? = null, staticIntervalSkippedListener: StaticIntervalWithMeasurementGeneratorCalibrator.OnStaticIntervalSkippedListener<C>? = null, dynamicIntervalSkippedListener: StaticIntervalWithMeasurementGeneratorCalibrator.OnDynamicIntervalSkippedListener<C>? = null, readyToSolveCalibrationListener: StaticIntervalWithMeasurementGeneratorCalibrator.OnReadyToSolveCalibrationListener<C>? = null, calibrationSolvingStartedListener: StaticIntervalWithMeasurementGeneratorCalibrator.OnCalibrationSolvingStartedListener<C>? = null, calibrationCompletedListener: StaticIntervalWithMeasurementGeneratorCalibrator.OnCalibrationCompletedListener<C>? = null, stoppedListener: StaticIntervalWithMeasurementGeneratorCalibrator.OnStoppedListener<C>? = null, accuracyChangedListener: SensorCollector.OnAccuracyChangedListener? = null)

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard

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

Link copied to clipboard

Gets average time interval between accelerometer samples. This is only available once the internal 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 internal generator 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 internal generator completes initialization.

Link copied to clipboard

Gets measurement base noise level PSD (Power Spectral Density) expressed in (m^2 * s^-3). This is only available once internal generator completes initialization.

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 internal generator completes initialization.

Link copied to clipboard

Gets accelerometer sensor being used for interval detection. 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 internal generator completes initialization.

Gets estimated standard deviation of time interval between accelerometer measurements. This is only available once internal generator 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 internal generator 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

listener to notify when calibration solving completes.

Link copied to clipboard
Link copied to clipboard
open override val context: Context

Android context.

Link copied to clipboard

listener to notify when a dynamic interval is detected.

Link copied to clipboard

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

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
open override var initialStaticSamples: Int

Gets or sets number of samples to be processed initially by the internal measurement generator, 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
abstract override val isReadyToSolveCalibration: Boolean

Indicates whether enough measurements have been picked at static intervals so that the calibration process can be solved.

Link copied to clipboard
open override val isStaticIntervalSkipped: Boolean

Indicates whether last static interval must be skipped.

Link copied to clipboard
abstract override val minimumRequiredMeasurements: Int

Gets minimum number of required measurements to start calibration. Each time that the device is kept static, a new measurement is collected. When the required number of measurements is collected, calibration can start.

Number of accelerometer 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

listener to notify when enough measurements have been collected and calibrator is ready to solve calibration.

Link copied to clipboard
open override var requiredMeasurements: Int

Required number of measurements to be collected before calibration can start. The number of required measurements must be greater than minimumRequiredMeasurements, otherwise at least minimumRequiredMeasurements will be collected before calibration can start.

Link copied to clipboard
open override var running: Boolean

Indicates whether calibrator is running. While calibrator is running, calibrator parameters cannot be changed.

Link copied to clipboard

true to automatically solve calibration once enough measurements are available, false otherwise.

Link copied to clipboard

listener to notify when a static interval is detected.

Link copied to clipboard

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

Link copied to clipboard

listener to notify when calibrator is stopped.

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 internal generator 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 internal generator 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 a 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 during initialization of the internal calibrator measurement generator. Window size must always be larger than allowed minimum value, which is 2 and must have an odd value.

Functions

Link copied to clipboard
open override fun calibrate(): Boolean

Solves calibration using collected measurements. This must be explicitly called after enough measurements are collected if solveCalibrationWhenEnoughMeasurements is false.

open override fun getAccelerometerAverageTimeIntervalAsTime(result: Time): Boolean

Gets average time interval between accelerometer measurements. This is only available once the internal generator 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 internal generator 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
open override fun getThresholdAsMeasurement(result: Acceleration): Boolean

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

Link copied to clipboard
open override fun start()

Starts calibrator. This method starts collecting sensor measurements. When calibrator is started, it begins with an initialization stage where sensor noise is estimated while device remains static. Once initialization is completed, calibrator determines intervals where device remains static when device has different poses, so that measurements are collected to solve calibration. If solveCalibrationWhenEnoughMeasurements is true, calibration is automatically solved once enough measurements are collected, otherwise a call to calibrate must be done to solve calibration.

Link copied to clipboard
open override fun stop()

Stops calibrator. When this is called, no more sensor measurements are collected.