Class GyroscopeMeasurementsGenerator
java.lang.Object
com.irurueta.navigation.inertial.calibration.generators.MeasurementsGenerator<BodyKinematicsSequence<StandardDeviationTimedBodyKinematics>,GyroscopeMeasurementsGenerator,GyroscopeMeasurementsGeneratorListener,TimedBodyKinematics>
com.irurueta.navigation.inertial.calibration.generators.GyroscopeMeasurementsGenerator
- All Implemented Interfaces:
AccelerometerNoiseRootPsdSource,GyroscopeNoiseRootPsdSource
public class GyroscopeMeasurementsGenerator
extends MeasurementsGenerator<BodyKinematicsSequence<StandardDeviationTimedBodyKinematics>,GyroscopeMeasurementsGenerator,GyroscopeMeasurementsGeneratorListener,TimedBodyKinematics>
implements GyroscopeNoiseRootPsdSource
Generates measurements for the calibration of gyroscopes by alternating
static and dynamic intervals where device is kept static or moved.
Generated measurements must be used with easy gyroscope calibrators.
Notice that accuracy of the gyroscope calibration is very sensitive to the
accuracy of detected dynamic intervals respect the average specific forces
during static intervals.
In order to increase the accuracy, calibration should be repeated trying different
threshold factors
MeasurementsGenerator.getThresholdFactor().
Such calibrators are the following ones:
- EasyGyroscopeCalibrator
- KnownBiasEasyGyroscopeCalibrator
- RobustEasyGyroscopeCalibrator and all its
implementations.
- RobustKnownBiasEasyGyroscopeCalibrator and all its
implementations.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate doubleEstimated acceleration standard deviation during initialization expressed in meters per squared second (m/s^2).private final AccumulatedAngularSpeedTriadNoiseEstimatorAccumulated noise estimator for angular speed measurements.private doubleEstimated norm of gyroscope noise root PSD (Power Spectral Density) expressed as (rad * s^-0.5).private doubleEstimated angular speed standard deviation during initialization expressed in radians per second (rad/s).protected final AngularSpeedTriadAn angular speed triad.private DoubleCurrent average x-coordinate of measurements expressed in meters per squared second (m/s^2).private DoubleCurrent average y-coordinate of measurements expressed in meters per squared second (m/s^2).private DoubleCurrent average z-coordinate of measurements expressed in meters per squared second (m/s^2).private List<StandardDeviationTimedBodyKinematics> Items to be added to a generated sequence when next static period occurs.private DoublePrevious average x-coordinate of measurements expressed in meters per squared second (m/s^2).private DoublePrevious average y-coordinate of measurements expressed in meters per squared second (m/s^2).private DoublePrevious average z-coordinate of measurements expressed in meters per squared second (m/s^2).Contains previous status while processing samples.Fields inherited from class com.irurueta.navigation.inertial.calibration.generators.MeasurementsGenerator
DEFAULT_MAX_DYNAMIC_SAMPLES, DEFAULT_MIN_STATIC_SAMPLES, listener, staticIntervalDetector, triad -
Constructor Summary
ConstructorsConstructorDescriptionConstructor.Constructor. -
Method Summary
Modifier and TypeMethodDescriptionprivate voidaddSequenceItem(TimedBodyKinematics sample) Adds an item to current sequence items.protected voidGets corresponding acceleration triad from provided input sample.doubleGets gyroscope base noise level that has been detected during initialization expressed in radians per second (rad/s).com.irurueta.units.AngularSpeedGets gyroscope base noise level that has been detected during initialization.voidgetGyroscopeBaseNoiseLevelAsMeasurement(com.irurueta.units.AngularSpeed result) Gets gyroscope base noise level that has been detected during initialization.doubleGets gyroscope base noise level PSD (Power Spectral Density) expressed in (rad^2/s).doubleGets gyroscope base noise level root PSD (Power Spectral Density) expressed in (rad * s^-0.5)Gets estimated standard deviation of angular rate during initialization phase.voidGets estimated standard deviation of angular rate during initialization phase.Gets estimated average angular rate during initialization phase.voidGets estimated average angular rate during initialization phase.protected voidHandles a dynamic-to-static interval change.protected voidHandles an initialization completion.protected voidHandles an error during initialization.protected voidhandleStaticToDynamicChange(double accumulatedAvgX, double accumulatedAvgY, double accumulatedAvgZ, double accumulatedStdX, double accumulatedStdY, double accumulatedStdZ) Handles a static-to-dynamic interval change.protected voidpostProcess(TimedBodyKinematics sample) Post process provided input sample.voidreset()Resets this generator.voidsetTimeInterval(double timeInterval) Sets time interval between input samples expressed in seconds (s).Methods inherited from class com.irurueta.navigation.inertial.calibration.generators.MeasurementsGenerator
checkProcessedSamples, getAccelerometerBaseNoiseLevel, getAccelerometerBaseNoiseLevelAsMeasurement, getAccelerometerBaseNoiseLevelAsMeasurement, getAccelerometerBaseNoiseLevelPsd, getAccelerometerBaseNoiseLevelRootPsd, getBaseNoiseLevelAbsoluteThreshold, getBaseNoiseLevelAbsoluteThresholdAsMeasurement, getBaseNoiseLevelAbsoluteThresholdAsMeasurement, getInitialStaticSamples, getInstantaneousNoiseLevelFactor, getListener, getMaxDynamicSamples, getMinStaticSamples, getProcessedDynamicSamples, getProcessedStaticSamples, getStatus, getThreshold, getThresholdAsMeasurement, getThresholdAsMeasurement, getThresholdFactor, getTimeInterval, getTimeIntervalAsTime, getTimeIntervalAsTime, getWindowSize, isDynamicIntervalSkipped, isRunning, isStaticIntervalSkipped, process, setBaseNoiseLevelAbsoluteThreshold, setBaseNoiseLevelAbsoluteThreshold, setInitialStaticSamples, setInstantaneousNoiseLevelFactor, setListener, setMaxDynamicSamples, setMinStaticSamples, setThresholdFactor, setTimeInterval, setWindowSize, updateCounters
-
Field Details
-
angularSpeedTriad
An angular speed triad. This is reused for memory efficiency. -
currentSequenceItems
Items to be added to a generated sequence when next static period occurs. -
accumulatedEstimator
Accumulated noise estimator for angular speed measurements. -
accelerationStandardDeviation
private double accelerationStandardDeviationEstimated acceleration standard deviation during initialization expressed in meters per squared second (m/s^2). -
angularSpeedStandardDeviation
private double angularSpeedStandardDeviationEstimated angular speed standard deviation during initialization expressed in radians per second (rad/s). -
angularSpeedNoiseRootPsd
private double angularSpeedNoiseRootPsdEstimated norm of gyroscope noise root PSD (Power Spectral Density) expressed as (rad * s^-0.5). -
previousAvgX
Previous average x-coordinate of measurements expressed in meters per squared second (m/s^2). -
previousAvgY
Previous average y-coordinate of measurements expressed in meters per squared second (m/s^2). -
previousAvgZ
Previous average z-coordinate of measurements expressed in meters per squared second (m/s^2). -
currentAvgX
Current average x-coordinate of measurements expressed in meters per squared second (m/s^2). -
currentAvgY
Current average y-coordinate of measurements expressed in meters per squared second (m/s^2). -
currentAvgZ
Current average z-coordinate of measurements expressed in meters per squared second (m/s^2). -
previousStatus
Contains previous status while processing samples.
-
-
Constructor Details
-
GyroscopeMeasurementsGenerator
public GyroscopeMeasurementsGenerator()Constructor.
-
-
Method Details
-
setTimeInterval
public void setTimeInterval(double timeInterval) throws com.irurueta.navigation.LockedException Sets time interval between input samples expressed in seconds (s).- Overrides:
setTimeIntervalin classMeasurementsGenerator<BodyKinematicsSequence<StandardDeviationTimedBodyKinematics>,GyroscopeMeasurementsGenerator, GyroscopeMeasurementsGeneratorListener, TimedBodyKinematics> - Parameters:
timeInterval- time interval between input samples.- Throws:
IllegalArgumentException- if provided value is negative.com.irurueta.navigation.LockedException- if generator is currently running.
-
reset
public void reset() throws com.irurueta.navigation.LockedExceptionResets this generator.- Overrides:
resetin classMeasurementsGenerator<BodyKinematicsSequence<StandardDeviationTimedBodyKinematics>,GyroscopeMeasurementsGenerator, GyroscopeMeasurementsGeneratorListener, TimedBodyKinematics> - Throws:
com.irurueta.navigation.LockedException- if generator is busy.
-
getInitialAvgAngularSpeedTriad
Gets estimated average angular rate during initialization phase.- Returns:
- estimated average angular rate during initialization phase.
-
getInitialAngularSpeedTriadStandardDeviation
Gets estimated standard deviation of angular rate during initialization phase.- Returns:
- estimated standard deviation of angular rate during initialization phase.
-
getGyroscopeBaseNoiseLevel
public double getGyroscopeBaseNoiseLevel()Gets gyroscope base noise level that has been detected during initialization expressed in radians per second (rad/s). This is equal to the standard deviation of the gyroscope measurements during initialization phase.- Returns:
- gyroscope base noise level.
-
getGyroscopeBaseNoiseLevelAsMeasurement
public com.irurueta.units.AngularSpeed getGyroscopeBaseNoiseLevelAsMeasurement()Gets gyroscope base noise level that has been detected during initialization. This is equal to the standard deviation of the gyroscope measurements during initialization phase.- Returns:
- gyroscope base noise level.
-
getGyroscopeBaseNoiseLevelAsMeasurement
public void getGyroscopeBaseNoiseLevelAsMeasurement(com.irurueta.units.AngularSpeed result) Gets gyroscope base noise level that has been detected during initialization. This is equal to the standard deviation of the gyroscope measurements during initialization phase.- Parameters:
result- instance where result will be stored.
-
getGyroscopeBaseNoiseLevelPsd
public double getGyroscopeBaseNoiseLevelPsd()Gets gyroscope base noise level PSD (Power Spectral Density) expressed in (rad^2/s).- Returns:
- gyroscope base noise level PSD.
-
getGyroscopeBaseNoiseLevelRootPsd
public double getGyroscopeBaseNoiseLevelRootPsd()Gets gyroscope base noise level root PSD (Power Spectral Density) expressed in (rad * s^-0.5)- Specified by:
getGyroscopeBaseNoiseLevelRootPsdin interfaceGyroscopeNoiseRootPsdSource- Returns:
- gyroscope base noise level root PSD.
-
handleStaticToDynamicChange
protected void handleStaticToDynamicChange(double accumulatedAvgX, double accumulatedAvgY, double accumulatedAvgZ, double accumulatedStdX, double accumulatedStdY, double accumulatedStdZ) Handles a static-to-dynamic interval change.- Specified by:
handleStaticToDynamicChangein classMeasurementsGenerator<BodyKinematicsSequence<StandardDeviationTimedBodyKinematics>,GyroscopeMeasurementsGenerator, GyroscopeMeasurementsGeneratorListener, TimedBodyKinematics> - Parameters:
accumulatedAvgX- average x-coordinate of measurements during last static period expressed in meters per squared second (m/s^2).accumulatedAvgY- average y-coordinate of specific force during last static period expressed in meters per squared second (m/s^2).accumulatedAvgZ- average z-coordinate of specific force during last static period expressed in meters per squared second (m/s^2).accumulatedStdX- standard deviation of x-coordinate of measurements during last static period expressed in meters per squared second (m/s^2).accumulatedStdY- standard deviation of y-coordinate of measurements during last static period expressed in meters per squared second (m/s^2).accumulatedStdZ- standard deviation of z-coordinate of measurements during last static period expressed in meters per squared second (m/s^2).
-
handleDynamicToStaticChange
protected void handleDynamicToStaticChange()Handles a dynamic-to-static interval change. -
handleInitializationCompleted
protected void handleInitializationCompleted()Handles an initialization completion. -
handleInitializationFailed
protected void handleInitializationFailed()Handles an error during initialization.
-