Class RobustKnownFrameGyroscopeCalibrator
java.lang.Object
com.irurueta.navigation.inertial.calibration.gyroscope.RobustKnownFrameGyroscopeCalibrator
- All Implemented Interfaces:
GyroscopeCalibrator,GyroscopeNonLinearCalibrator,OrderedStandardDeviationFrameBodyKinematicsGyroscopeCalibrator,QualityScoredGyroscopeCalibrator,UnknownBiasGyroscopeCalibrator,UnknownBiasNonLinearGyroscopeCalibrator,GyroscopeBiasUncertaintySource,GyroscopeCalibrationSource
- Direct Known Subclasses:
LMedSRobustKnownFrameGyroscopeCalibrator,MSACRobustKnownFrameGyroscopeCalibrator,PROMedSRobustKnownFrameGyroscopeCalibrator,PROSACRobustKnownFrameGyroscopeCalibrator,RANSACRobustKnownFrameGyroscopeCalibrator
public abstract class RobustKnownFrameGyroscopeCalibrator
extends Object
implements GyroscopeNonLinearCalibrator, UnknownBiasNonLinearGyroscopeCalibrator, GyroscopeCalibrationSource, GyroscopeBiasUncertaintySource, OrderedStandardDeviationFrameBodyKinematicsGyroscopeCalibrator, QualityScoredGyroscopeCalibrator
This is an abstract class to robustly estimate gyroscope
biases, cross couplings and scaling factors
along with G-dependent cross biases introduced on the gyroscope by the
specific forces sensed by the accelerometer.
To use this calibrator at least 7 measurements at different known frames must be provided. In other words, accelerometer and gyroscope (i.e. body kinematics) samples must be obtained at 7 different positions, orientations and velocities (although typically velocities are always zero).
Measured gyroscope angular rates is assumed to follow the model shown below:
Ωmeas = bg + (I + Mg) * Ωtrue + Gg * ftrue + w
Where:
- Ωmeas is the measured gyroscope angular rates. This is a 3x1 vector.
- bg is the gyroscope bias. Ideally, on a perfect gyroscope, this should be a
3x1 zero vector.
- I is the 3x3 identity matrix.
- Mg is the 3x3 matrix containing cross-couplings and scaling factors. Ideally, on
a perfect gyroscope, this should be a 3x3 zero matrix.
- Ωtrue is ground-truth gyroscope angular rates.
- Gg is the G-dependent cross biases introduced by the specific forces sensed
by the accelerometer. Ideally, on a perfect gyroscope, this should be a 3x3
zero matrix.
- ftrue is ground-truth specific force. This is a 3x1 vector.
- w is measurement noise. This is a 3x1 vector.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static classInternal class containing estimated preliminary result. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate booleanThis flag indicates whether z-axis is assumed to be common for accelerometer and gyroscope.protected doubleAmount of confidence expressed as a value between 0.0 and 1.0 (which is equivalent to 100%).static final doubleConstant defining default confidence of the estimated result, which is 99%.static final booleanIndicates that covariance is kept by default after refining result.static final intDefault maximum allowed number of iterations.static final floatDefault amount of progress variation before notifying a change in estimation progress.static final booleanIndicates that by default preliminary solutions are refined.static final booleanIndicates that result is refined by default using a non-linear calibrator (which uses a Levenberg-Marquardt fitter).static final com.irurueta.numerical.robust.RobustEstimatorMethodDefault robust estimator method when none is provided.static final booleanIndicates whether by default a common z-axis is assumed for both the accelerometer and gyroscope.static final booleanIndicates that by default a linear calibrator is used for preliminary solution estimation.private double[]Estimated gyroscope biases for each IMU axis expressed in radians per second (rad/s).private doubleEstimated chi square value.private intEstimated degrees of freedom of chi square value.private com.irurueta.algebra.MatrixEstimated covariance of estimated position.private com.irurueta.algebra.MatrixEstimated G-dependent cross biases introduced on the gyroscope by the specific forces sensed by the accelerometer.private com.irurueta.algebra.MatrixEstimated gyroscope scale factors and cross coupling errors.private doubleEstimated mean square error respect to provided measurements.private doubleEstimated probability of finding a smaller chi square value expressed as a value between 0.0 and 1.0.private doubleEstimated measure of quality of estimated fit as a value between 0.0 and 1.0.private doubleEstimated reduced chi square value.private doubleInitial x-coordinate of gyroscope bias to be used to find a solution.private doubleInitial y-coordinate of gyroscope bias to be used to find a solution.private doubleInitial z-coordinate of gyroscope bias to be used to find a solution.private com.irurueta.algebra.MatrixInitial G-dependent cross biases introduced on the gyroscope by the specific forces sensed by the accelerometer.private doubleInitial x-y cross coupling error.private doubleInitial x-z cross coupling error.private doubleInitial y-x cross coupling error.private doubleInitial y-z cross coupling error.private doubleInitial z-x cross coupling error.private doubleInitial z-y cross coupling error.private doubleInitial x scaling factor.private doubleInitial y scaling factor.private doubleInitial z scaling factor.protected com.irurueta.numerical.robust.InliersDataData related to inliers found after calibration.private booleanIndicates whether covariance must be kept after refining result.private final KnownFrameGyroscopeLinearLeastSquaresCalibratorA linear least squares calibrator.Listener to be notified of events such as when calibration starts, ends or its progress significantly changes.static final doubleMaximum allowed confidence value.static final floatMaximum allowed value for progress delta.protected intMaximum allowed number of iterations.protected List<StandardDeviationFrameBodyKinematics> Contains a list of body kinematics measurements taken at different frames (positions, orientations and velocities) and containing the standard deviations of accelerometer and gyroscope measurements.static final doubleMinimum allowed confidence value.static final intMinimum allowed number of iterations.static final floatMinimum allowed value for progress delta.static final intRequired minimum number of measurements.private final KnownFrameGyroscopeNonLinearLeastSquaresCalibratorA non-linear least squares calibrator.protected intSize of subsets to be checked during robust estimation.protected floatAmount of progress variation before notifying a progress change during calibration.private booleanIndicates whether preliminary solutions must be refined after an initial linear solution is found.protected booleanIndicates whether result must be refined using a non linear calibrator over found inliers.protected booleanIndicates whether estimator is running.private booleanIndicates whether a linear calibrator is used or not for preliminary solutions. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedConstructor.protectedRobustKnownFrameGyroscopeCalibrator(boolean commonAxisUsed) Constructor.protectedRobustKnownFrameGyroscopeCalibrator(boolean commonAxisUsed, RobustKnownFrameGyroscopeCalibratorListener listener) Constructor.protectedConstructor.protectedConstructor.protectedRobustKnownFrameGyroscopeCalibrator(List<StandardDeviationFrameBodyKinematics> measurements, boolean commonAxisUsed) Constructor.protectedRobustKnownFrameGyroscopeCalibrator(List<StandardDeviationFrameBodyKinematics> measurements, boolean commonAxisUsed, RobustKnownFrameGyroscopeCalibratorListener listener) Constructor.protectedRobustKnownFrameGyroscopeCalibrator(List<StandardDeviationFrameBodyKinematics> measurements, RobustKnownFrameGyroscopeCalibratorListener listener) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidattemptRefine(RobustKnownFrameGyroscopeCalibrator.PreliminaryResult preliminaryResult) Attempts to refine calibration parameters if refinement is requested.protected doublecomputeError(StandardDeviationFrameBodyKinematics measurement, RobustKnownFrameGyroscopeCalibrator.PreliminaryResult preliminaryResult) Computes error of a preliminary result respect a given measurement.protected voidcomputePreliminarySolutions(int[] samplesIndices, List<RobustKnownFrameGyroscopeCalibrator.PreliminaryResult> solutions) Computes a preliminary solution for a subset of samples picked by a robust estimator.private static doubleconvertAngularSpeed(double value, com.irurueta.units.AngularSpeedUnit unit) Converts angular speed value and unit to radians per second.private static doubleconvertAngularSpeed(com.irurueta.units.AngularSpeed angularSpeed) Converts angular speed instance to radians per second.create()Creates a robust gyroscope calibrator using default robust method.create(boolean commonAxisUsed) Creates a robust gyroscope calibrator using default robust method.create(boolean commonAxisUsed, RobustKnownFrameGyroscopeCalibratorListener listener) Creates a robust gyroscope calibrator using default robust method.create(boolean commonAxisUsed, RobustKnownFrameGyroscopeCalibratorListener listener, com.irurueta.numerical.robust.RobustEstimatorMethod method) Creates a robust gyroscope calibrator.create(boolean commonAxisUsed, com.irurueta.numerical.robust.RobustEstimatorMethod method) Creates a robust gyroscope calibrator.create(double[] qualityScores) Creates a robust gyroscope calibrator using default robust method.create(double[] qualityScores, boolean commonAxisUsed) Creates a robust gyroscope calibrator using default robust method.create(double[] qualityScores, boolean commonAxisUsed, RobustKnownFrameGyroscopeCalibratorListener listener) Creates a robust gyroscope calibrator using default robust method.create(double[] qualityScores, boolean commonAxisUsed, RobustKnownFrameGyroscopeCalibratorListener listener, com.irurueta.numerical.robust.RobustEstimatorMethod method) Creates a robust gyroscope calibrator.create(double[] qualityScores, boolean commonAxisUsed, com.irurueta.numerical.robust.RobustEstimatorMethod method) Creates a robust gyroscope calibrator.create(double[] qualityScores, RobustKnownFrameGyroscopeCalibratorListener listener) Creates a robust gyroscope calibrator using default robust method.create(double[] qualityScores, RobustKnownFrameGyroscopeCalibratorListener listener, com.irurueta.numerical.robust.RobustEstimatorMethod method) Creates a robust gyroscope calibrator.create(double[] qualityScores, com.irurueta.numerical.robust.RobustEstimatorMethod method) Creates a robust gyroscope calibrator.create(double[] qualityScores, List<StandardDeviationFrameBodyKinematics> measurements) Creates a robust gyroscope calibrator using default robust methodcreate(double[] qualityScores, List<StandardDeviationFrameBodyKinematics> measurements, boolean commonAxisUsed) Creates a robust gyroscope calibrator using default robust method.create(double[] qualityScores, List<StandardDeviationFrameBodyKinematics> measurements, boolean commonAxisUsed, RobustKnownFrameGyroscopeCalibratorListener listener) Creates a robust gyroscope calibrator using default robust method.create(double[] qualityScores, List<StandardDeviationFrameBodyKinematics> measurements, boolean commonAxisUsed, RobustKnownFrameGyroscopeCalibratorListener listener, com.irurueta.numerical.robust.RobustEstimatorMethod method) Creates a robust gyroscope calibrator.create(double[] qualityScores, List<StandardDeviationFrameBodyKinematics> measurements, boolean commonAxisUsed, com.irurueta.numerical.robust.RobustEstimatorMethod method) Creates a robust gyroscope calibrator.create(double[] qualityScores, List<StandardDeviationFrameBodyKinematics> measurements, RobustKnownFrameGyroscopeCalibratorListener listener) Creates a robust gyroscope calibrator using default robust method.create(double[] qualityScores, List<StandardDeviationFrameBodyKinematics> measurements, RobustKnownFrameGyroscopeCalibratorListener listener, com.irurueta.numerical.robust.RobustEstimatorMethod method) Creates a robust gyroscope calibrator.create(double[] qualityScores, List<StandardDeviationFrameBodyKinematics> measurements, com.irurueta.numerical.robust.RobustEstimatorMethod method) Creates a robust gyroscope calibrator.Creates a robust gyroscope calibrator using default robust method.create(RobustKnownFrameGyroscopeCalibratorListener listener, com.irurueta.numerical.robust.RobustEstimatorMethod method) Creates a robust gyroscope calibrator.create(com.irurueta.numerical.robust.RobustEstimatorMethod method) Creates a robust gyroscope calibrator.create(List<StandardDeviationFrameBodyKinematics> measurements) Creates a robust gyroscope calibrator using default robust method.create(List<StandardDeviationFrameBodyKinematics> measurements, boolean commonAxisUsed) Creates a robust gyroscope calibrator using default robust method.create(List<StandardDeviationFrameBodyKinematics> measurements, boolean commonAxisUsed, RobustKnownFrameGyroscopeCalibratorListener listener) Creates a robust gyroscope calibrator using default robust method.create(List<StandardDeviationFrameBodyKinematics> measurements, boolean commonAxisUsed, RobustKnownFrameGyroscopeCalibratorListener listener, com.irurueta.numerical.robust.RobustEstimatorMethod method) Creates a robust gyroscope calibrator.create(List<StandardDeviationFrameBodyKinematics> measurements, boolean commonAxisUsed, com.irurueta.numerical.robust.RobustEstimatorMethod method) Creates a robust gyroscope calibrator.create(List<StandardDeviationFrameBodyKinematics> measurements, RobustKnownFrameGyroscopeCalibratorListener listener) Creates a robust gyroscope calibrator using default robust method.create(List<StandardDeviationFrameBodyKinematics> measurements, RobustKnownFrameGyroscopeCalibratorListener listener, com.irurueta.numerical.robust.RobustEstimatorMethod method) Creates a robust gyroscope calibrator.create(List<StandardDeviationFrameBodyKinematics> measurements, com.irurueta.numerical.robust.RobustEstimatorMethod method) Creates a robust gyroscope calibrator.doubleReturns amount of confidence expressed as a value between 0.0 and 1.0 (which is equivalent to 100%).com.irurueta.units.AngularSpeedGets x coordinate of estimated gyroscope bias.booleangetEstimatedBiasAngularSpeedX(com.irurueta.units.AngularSpeed result) Gets x coordinate of estimated gyroscope bias.com.irurueta.units.AngularSpeedGets y coordinate of estimated gyroscope bias.booleangetEstimatedBiasAngularSpeedY(com.irurueta.units.AngularSpeed result) Gets y coordinate of estimated gyroscope bias.com.irurueta.units.AngularSpeedGets z coordinate of estimated gyroscope bias.booleangetEstimatedBiasAngularSpeedZ(com.irurueta.units.AngularSpeed result) Gets z coordinate of estimated gyroscope bias.Gets estimated gyroscope bias.booleanGets estimated gyroscope bias.double[]Gets array containing x,y,z components of estimated gyroscope biases expressed in radians per second (rad/s).booleangetEstimatedBiases(double[] result) Gets array containing x,y,z components of estimated gyroscope biases expressed in radians per second (rad/s).com.irurueta.algebra.MatrixGets column matrix containing x,y,z components of estimated gyroscope biases expressed in radians per second (rad/s).booleangetEstimatedBiasesAsMatrix(com.irurueta.algebra.Matrix result) Gets column matrix containing x,y,z components of estimated gyroscope biases expressed in radians per second (rad/s).Gets standard deviation of estimated gyroscope bias coordinates.booleanGets standard deviation of estimated gyroscope bias coordinates.Gets average of estimated standard deviation of gyroscope bias coordinates expressed in radians per second (rad/s).com.irurueta.units.AngularSpeedGets average of estimated standard deviation of gyroscope bias coordinates.booleangetEstimatedBiasStandardDeviationAverageAsAngularSpeed(com.irurueta.units.AngularSpeed result) Gets average of estimated standard deviation of gyroscope bias coordinates.Gets norm of estimated standard deviation of gyroscope bias expressed in radians per second (rad/s).com.irurueta.units.AngularSpeedGets norm of estimated standard deviation of gyroscope bias.booleangetEstimatedBiasStandardDeviationNormAsAngularSpeed(com.irurueta.units.AngularSpeed result) Gets norm of estimated standard deviation of gyroscope bias coordinates.Gets x coordinate of estimated gyroscope bias expressed in radians per second (rad/s).Gets standard deviation of estimated x coordinate of gyroscope bias expressed in radians per second (rad/s).com.irurueta.units.AngularSpeedGets standard deviation of estimated x coordinate of gyroscope bias.booleangetEstimatedBiasXStandardDeviationAsAngularSpeed(com.irurueta.units.AngularSpeed result) Gets standard deviation of estimated x coordinate of gyroscope bias.Gets variance of estimated x coordinate of gyroscope bias expressed in (rad^2/s^2).Gets y coordinate of estimated gyroscope bias expressed in radians per second (rad/s).Gets standard deviation of estimated y coordinate of gyroscope bias expressed in radians per second (rad/s).com.irurueta.units.AngularSpeedGets standard deviation of estimated y coordinate of gyroscope bias.booleangetEstimatedBiasYStandardDeviationAsAngularSpeed(com.irurueta.units.AngularSpeed result) Gets standard deviation of estimated y coordinate of gyroscope bias.Gets variance of estimated y coordinate of gyroscope bias expressed in (rad^2/s^2).Gets z coordinate of estimated gyroscope bias expressed in radians per second (rad/s).Gets standard deviation of estimated z coordinate of gyroscope bias expressed in radians per second (rad/s).com.irurueta.units.AngularSpeedGets standard deviation of estimated z coordinate of gyroscope bias.booleangetEstimatedBiasZStandardDeviationAsAngularSpeed(com.irurueta.units.AngularSpeed result) Gets standard deviation of estimated z coordinate of gyroscope bias.Gets variance of estimated z coordinate of gyroscope bias expressed in (rad^2/s^2).doubleGets estimated chi square value.intGets estimated chi square degrees of freedom.com.irurueta.algebra.MatrixGets estimated covariance matrix for estimated calibration solution.com.irurueta.algebra.MatrixGets estimated G-dependent cross biases introduced on the gyroscope by the specific forces sensed by the accelerometer.com.irurueta.algebra.MatrixGets estimated gyroscope scale factors and cross coupling errors.doubleGets estimated mean square error respect to provided measurements.Gets estimated x-y cross-coupling error.Gets estimated x-z cross-coupling error.Gets estimated y-x cross-coupling error.Gets estimated y-z cross-coupling error.Gets estimated z-x cross-coupling error.Gets estimated z-y cross-coupling error.doubleGets estimated probability of finding a smaller chi square value expressed as a value between 0.0 and 1.0.doubleGets estimated measure of quality of estimated fit as a value between 0.0 and 1.0.doubleGets estimated reduced chi square value.Gets estimated x-axis scale factor.Gets estimated y-axis scale factor.Gets estimated z-axis scale factor.double[]Gets initial bias to be used to find a solution as an array.voidgetInitialBias(double[] result) Gets initial bias to be used to find a solution as an array.com.irurueta.units.AngularSpeedGets initial x-coordinate of gyroscope bias to be used to find a solution.voidgetInitialBiasAngularSpeedX(com.irurueta.units.AngularSpeed result) Gets initial x-coordinate of gyroscope bias to be used to find a solution.com.irurueta.units.AngularSpeedGets initial y-coordinate of gyroscope bias to be used to find a solution.voidgetInitialBiasAngularSpeedY(com.irurueta.units.AngularSpeed result) Gets initial y-coordinate of gyroscope bias to be used to find a solution.com.irurueta.units.AngularSpeedGets initial z-coordinate of gyroscope bias to be used to find a solution.voidgetInitialBiasAngularSpeedZ(com.irurueta.units.AngularSpeed result) Gets initial z-coordinate of gyroscope bias to be used to find a solution.com.irurueta.algebra.MatrixGets initial bias to be used to find a solution as a column matrix.voidgetInitialBiasAsMatrix(com.irurueta.algebra.Matrix result) Gets initial bias to be used to find a solution as a column matrix.Gets initial bias coordinates of gyroscope used to find a solution.voidGets initial bias coordinates of gyroscope used to find a solution.doubleGets initial x-coordinate of gyroscope bias to be used to find a solutions.doubleGets initial y-coordinate of gyroscope bias to be used to find a solution.doubleGets initial z-coordinate of gyroscope bias to be used to find a solution.com.irurueta.algebra.MatrixGets initial G-dependent cross biases introduced on the gyroscope by the specific forces sensed by the accelerometer.voidgetInitialGg(com.irurueta.algebra.Matrix result) Gets initial G-dependent cross biases introduced on the gyroscope by the specific forces sensed by the accelerometer.com.irurueta.algebra.MatrixGets initial scale factors and cross coupling errors matrix.voidgetInitialMg(com.irurueta.algebra.Matrix result) Gets initial scale factors and cross coupling errors matrix.doubleGets initial x-y cross coupling error.doubleGets initial x-z cross coupling error.doubleGets initial y-x cross coupling error.doubleGets initial y-z cross coupling error.doubleGets initial z-x cross coupling error.doubleGets initial z-y cross coupling error.doubleGets initial x scaling factor.doubleGets initial y scaling factor.doubleGets initial z scaling factor.com.irurueta.numerical.robust.InliersDataGets data related to inliers found after estimation.Gets listener to handle events raised by this estimator.intReturns maximum allowed number of iterations.Indicates the type of measurement or sequence used by this calibrator.Gets a list of body kinematics measurements taken at different frames (positions, orientations and velocities) and containing the standard deviations of accelerometer and gyroscope measurements.abstract com.irurueta.numerical.robust.RobustEstimatorMethodReturns method being used for robust estimation.intGets minimum number of required measurements.intGets size of subsets to be checked during robust estimation.floatReturns amount of progress variation before notifying a progress change during calibration.double[]Returns quality scores corresponding to each measurement.booleanIndicates whether z-axis is assumed to be common for accelerometer and gyroscope.booleanIndicates whether covariance must be kept after refining result.booleanIndicates whether a linear calibrator is used or not for preliminary solutions.booleanIndicates whether this calibrator requires ordered measurements or sequences in a list or not.booleanIndicates whether preliminary solutions must be refined after an initial linear solution is found.booleanisReady()Indicates whether calibrator is ready to start.booleanIndicates whether result must be refined using a non-linear solver over found inliers.booleanIndicates whether calibrator is currently running or not.voidsetCommonAxisUsed(boolean commonAxisUsed) Specifies whether z-axis is assumed to be common for accelerometer and gyroscope.voidsetConfidence(double confidence) Sets amount of confidence expressed as a value between 0.0 and 1.0 (which is equivalent to 100%).voidsetCovarianceKept(boolean keepCovariance) Specifies whether covariance must be kept after refining result.voidsetInitialBias(double[] initialBias) Sets initial bias to be used to find a solution as an array.voidsetInitialBias(double initialBiasX, double initialBiasY, double initialBiasZ) Sets initial bias coordinates of gyroscope used to find a solution expressed in radians per second (rad/s).voidsetInitialBias(com.irurueta.algebra.Matrix initialBias) Sets initial bias to be used to find a solution as a column matrix with values expressed in radians per second (rad/s).voidsetInitialBias(AngularSpeedTriad initialBias) Sets initial bias coordinates of gyroscope used to find a solution.voidsetInitialBias(com.irurueta.units.AngularSpeed initialBiasX, com.irurueta.units.AngularSpeed initialBiasY, com.irurueta.units.AngularSpeed initialBiasZ) Sets initial bias coordinates of gyroscope used to find a solution.voidsetInitialBiasX(double initialBiasX) Sets initial x-coordinate of gyroscope bias to be used to find a solution.voidsetInitialBiasX(com.irurueta.units.AngularSpeed initialBiasX) Sets initial x-coordinate of gyroscope bias to be used to find a solution.voidsetInitialBiasY(double initialBiasY) Sets initial y-coordinate of gyroscope bias to be used to find a solution.voidsetInitialBiasY(com.irurueta.units.AngularSpeed initialBiasY) Sets initial y-coordinate of gyroscope bias to be used to find a solution.voidsetInitialBiasZ(double initialBiasZ) Sets initial z-coordinate of gyroscope bias to be used to find a solution.voidsetInitialBiasZ(com.irurueta.units.AngularSpeed initialBiasZ) Sets initial z-coordinate of gyroscope bias to be used to find a solution.voidsetInitialCrossCouplingErrors(double initialMxy, double initialMxz, double initialMyx, double initialMyz, double initialMzx, double initialMzy) Sets initial cross coupling errors.voidsetInitialGg(com.irurueta.algebra.Matrix initialGg) Sets initial G-dependent cross biases introduced on the gyroscope by the specific forces sensed by the accelerometer.voidsetInitialMg(com.irurueta.algebra.Matrix initialMg) Sets initial scale factors and cross coupling errors matrix.voidsetInitialMxy(double initialMxy) Sets initial x-y cross coupling error.voidsetInitialMxz(double initialMxz) Sets initial x-z cross coupling error.voidsetInitialMyx(double initialMyx) Sets initial y-x cross coupling error.voidsetInitialMyz(double initialMyz) Sets initial y-z cross coupling error.voidsetInitialMzx(double initialMzx) Sets initial z-x cross coupling error.voidsetInitialMzy(double initialMzy) Sets initial z-y cross coupling error.voidsetInitialScalingFactors(double initialSx, double initialSy, double initialSz) Sets initial scaling factors.voidsetInitialScalingFactorsAndCrossCouplingErrors(double initialSx, double initialSy, double initialSz, double initialMxy, double initialMxz, double initialMyx, double initialMyz, double initialMzx, double initialMzy) Sets initial scaling factors and cross coupling errors.voidsetInitialSx(double initialSx) Sets initial x scaling factor.voidsetInitialSy(double initialSy) Sets initial y scaling factor.voidsetInitialSz(double initialSz) Sets initial z scaling factor.voidsetLinearCalibratorUsed(boolean linearCalibratorUsed) Specifies whether a linear calibrator is used or not for preliminary solutions.voidSets listener to handle events raised by this estimator.voidsetMaxIterations(int maxIterations) Sets maximum allowed number of iterations.voidsetMeasurements(List<StandardDeviationFrameBodyKinematics> measurements) Sets a list of body kinematics measurements taken at different frames (positions, orientations and velocities) and containing the standard deviations of accelerometer and gyroscope measurements.voidsetPreliminarySolutionRefined(boolean preliminarySolutionRefined) Specifies whether preliminary solutions must be refined after an initial linear solution is found.voidsetPreliminarySubsetSize(int preliminarySubsetSize) Sets size of subsets to be checked during robust estimation.voidsetProgressDelta(float progressDelta) Sets amount of progress variation before notifying a progress change during calibration.voidsetQualityScores(double[] qualityScores) Sets quality scores corresponding to each measurement.voidsetResultRefined(boolean refineResult) Specifies whether result must be refined using a non-linear solver over found inliers.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.irurueta.navigation.inertial.calibration.gyroscope.GyroscopeCalibrator
calibrate, isQualityScoresRequired
-
Field Details
-
DEFAULT_USE_COMMON_Z_AXIS
public static final boolean DEFAULT_USE_COMMON_Z_AXISIndicates whether by default a common z-axis is assumed for both the accelerometer and gyroscope.- See Also:
-
MINIMUM_MEASUREMENTS
public static final int MINIMUM_MEASUREMENTSRequired minimum number of measurements.- See Also:
-
DEFAULT_USE_LINEAR_CALIBRATOR
public static final boolean DEFAULT_USE_LINEAR_CALIBRATORIndicates that by default a linear calibrator is used for preliminary solution estimation. The result obtained on each preliminary solution might be later refined.- See Also:
-
DEFAULT_REFINE_PRELIMINARY_SOLUTIONS
public static final boolean DEFAULT_REFINE_PRELIMINARY_SOLUTIONSIndicates that by default preliminary solutions are refined.- See Also:
-
DEFAULT_ROBUST_METHOD
public static final com.irurueta.numerical.robust.RobustEstimatorMethod DEFAULT_ROBUST_METHODDefault robust estimator method when none is provided. -
DEFAULT_REFINE_RESULT
public static final boolean DEFAULT_REFINE_RESULTIndicates that result is refined by default using a non-linear calibrator (which uses a Levenberg-Marquardt fitter).- See Also:
-
DEFAULT_KEEP_COVARIANCE
public static final boolean DEFAULT_KEEP_COVARIANCEIndicates that covariance is kept by default after refining result.- See Also:
-
DEFAULT_PROGRESS_DELTA
public static final float DEFAULT_PROGRESS_DELTADefault amount of progress variation before notifying a change in estimation progress. By default this is set to 5%.- See Also:
-
MIN_PROGRESS_DELTA
public static final float MIN_PROGRESS_DELTAMinimum allowed value for progress delta.- See Also:
-
MAX_PROGRESS_DELTA
public static final float MAX_PROGRESS_DELTAMaximum allowed value for progress delta.- See Also:
-
DEFAULT_CONFIDENCE
public static final double DEFAULT_CONFIDENCEConstant defining default confidence of the estimated result, which is 99%. This means that with a probability of 99% estimation will be accurate because chosen sub-samples will be inliers.- See Also:
-
DEFAULT_MAX_ITERATIONS
public static final int DEFAULT_MAX_ITERATIONSDefault maximum allowed number of iterations.- See Also:
-
MIN_CONFIDENCE
public static final double MIN_CONFIDENCEMinimum allowed confidence value.- See Also:
-
MAX_CONFIDENCE
public static final double MAX_CONFIDENCEMaximum allowed confidence value.- See Also:
-
MIN_ITERATIONS
public static final int MIN_ITERATIONSMinimum allowed number of iterations.- See Also:
-
measurements
Contains a list of body kinematics measurements taken at different frames (positions, orientations and velocities) and containing the standard deviations of accelerometer and gyroscope measurements. If a single device IMU needs to be calibrated, typically all measurements are taken at the same position, with zero velocity and multiple orientations. However, if we just want to calibrate a given IMU model (e.g. obtain an average and less precise calibration for the IMU of a given phone model), we could take measurements collected throughout the planet at multiple positions while the phone remains static (e.g. while charging), hence each measurement position will change, velocity will remain zero and orientation will be typically constant at horizontal orientation while the phone remains on a flat surface. -
listener
Listener to be notified of events such as when calibration starts, ends or its progress significantly changes. -
running
protected boolean runningIndicates whether estimator is running. -
progressDelta
protected float progressDeltaAmount of progress variation before notifying a progress change during calibration. -
confidence
protected double confidenceAmount of confidence expressed as a value between 0.0 and 1.0 (which is equivalent to 100%). The amount of confidence indicates the probability that the estimated result is correct. Usually this value will be close to 1.0, but not exactly 1.0. -
maxIterations
protected int maxIterationsMaximum allowed number of iterations. When the maximum number of iterations is exceeded, result will not be available, however an approximate result will be available for retrieval. -
inliersData
protected com.irurueta.numerical.robust.InliersData inliersDataData related to inliers found after calibration. -
refineResult
protected boolean refineResultIndicates whether result must be refined using a non linear calibrator over found inliers. If true, inliers will be computed and kept in any implementation regardless of the settings. -
preliminarySubsetSize
protected int preliminarySubsetSizeSize of subsets to be checked during robust estimation. -
commonAxisUsed
private boolean commonAxisUsedThis flag indicates whether z-axis is assumed to be common for accelerometer and gyroscope. When enabled, this eliminates 3 variables from Ma matrix. -
initialBiasX
private double initialBiasXInitial x-coordinate of gyroscope bias to be used to find a solution. This is expressed in radians per second (rad/s). -
initialBiasY
private double initialBiasYInitial y-coordinate of gyroscope bias to be used to find a solution. This is expressed in radians per second (rad/s). -
initialBiasZ
private double initialBiasZInitial z-coordinate of gyroscope bias to be used to find a solution. This is expressed in radians per second (rad/s). -
initialSx
private double initialSxInitial x scaling factor. -
initialSy
private double initialSyInitial y scaling factor. -
initialSz
private double initialSzInitial z scaling factor. -
initialMxy
private double initialMxyInitial x-y cross coupling error. -
initialMxz
private double initialMxzInitial x-z cross coupling error. -
initialMyx
private double initialMyxInitial y-x cross coupling error. -
initialMyz
private double initialMyzInitial y-z cross coupling error. -
initialMzx
private double initialMzxInitial z-x cross coupling error. -
initialMzy
private double initialMzyInitial z-y cross coupling error. -
initialGg
private com.irurueta.algebra.Matrix initialGgInitial G-dependent cross biases introduced on the gyroscope by the specific forces sensed by the accelerometer. -
useLinearCalibrator
private boolean useLinearCalibratorIndicates whether a linear calibrator is used or not for preliminary solutions. -
refinePreliminarySolutions
private boolean refinePreliminarySolutionsIndicates whether preliminary solutions must be refined after an initial linear solution is found. -
estimatedBiases
private double[] estimatedBiasesEstimated gyroscope biases for each IMU axis expressed in radians per second (rad/s). -
estimatedMg
private com.irurueta.algebra.Matrix estimatedMgEstimated gyroscope scale factors and cross coupling errors. This is the product of matrix Tg containing cross coupling errors and Kg containing scaling factors. So that:Mg = [sx mxy mxz] = Tg*Kg [myx sy myz] [mzx mzy sz ]Where:Kg = [sx 0 0 ] [0 sy 0 ] [0 0 sz]andTg = [1 -alphaXy alphaXz ] [alphaYx 1 -alphaYz] [-alphaZx alphaZy 1 ]Hence:Mg = [sx mxy mxz] = Tg*Kg = [sx -sy * alphaXy sz * alphaXz ] [myx sy myz] [sx * alphaYx sy -sz * alphaYz] [mzx mzy sz ] [-sx * alphaZx sy * alphaZy sz ]This instance allows any 3x3 matrix however, typically alphaYx, alphaZx and alphaZy are considered to be zero if the gyroscope z-axis is assumed to be the same as the body z-axis. When this is assumed, myx = mzx = mzy = 0 and the Mg matrix becomes upper diagonal:Mg = [sx mxy mxz] [0 sy myz] [0 0 sz ]Values of this matrix are unit-less. -
estimatedGg
private com.irurueta.algebra.Matrix estimatedGgEstimated G-dependent cross biases introduced on the gyroscope by the specific forces sensed by the accelerometer. This instance allows any 3x3 matrix. -
keepCovariance
private boolean keepCovarianceIndicates whether covariance must be kept after refining result. This setting is only taken into account if result is refined. -
estimatedCovariance
private com.irurueta.algebra.Matrix estimatedCovarianceEstimated covariance of estimated position. This is only available when result has been refined and covariance is kept. -
estimatedChiSq
private double estimatedChiSqEstimated chi square value. -
estimatedChiSqDegreesOfFreedom
private int estimatedChiSqDegreesOfFreedomEstimated degrees of freedom of chi square value. Degrees of freedom is equal to the number of sampled data minus the number of estimated parameters. -
estimatedReducedChiSq
private double estimatedReducedChiSqEstimated reduced chi square value. This is equal to estimated chi square value divided by its degrees of freedom. Ideally this value should be close to 1.0. -
estimatedMse
private double estimatedMseEstimated mean square error respect to provided measurements. -
estimatedP
private double estimatedPEstimated probability of finding a smaller chi square value expressed as a value between 0.0 and 1.0. The smaller the found chi square value is, the better the fit of the estimated parameters to the actual parameter. Thus, the smaller the chance of finding a smaller chi square value, then the better the estimated fit is. -
estimatedQ
private double estimatedQEstimated measure of quality of estimated fit as a value between 0.0 and 1.0. The larger the quality value is, the better the fit that has been estimated. -
linearCalibrator
A linear least squares calibrator. -
nonLinearCalibrator
A non-linear least squares calibrator.
-
-
Constructor Details
-
RobustKnownFrameGyroscopeCalibrator
protected RobustKnownFrameGyroscopeCalibrator()Constructor. -
RobustKnownFrameGyroscopeCalibrator
protected RobustKnownFrameGyroscopeCalibrator(List<StandardDeviationFrameBodyKinematics> measurements) Constructor.- Parameters:
measurements- list of body kinematics measurements with standard deviations taken at different frames (positions, orientations and velocities).
-
RobustKnownFrameGyroscopeCalibrator
protected RobustKnownFrameGyroscopeCalibrator(boolean commonAxisUsed) Constructor.- Parameters:
commonAxisUsed- indicates whether z-axis is assumed to be common for accelerometer and gyroscope.
-
RobustKnownFrameGyroscopeCalibrator
protected RobustKnownFrameGyroscopeCalibrator(List<StandardDeviationFrameBodyKinematics> measurements, boolean commonAxisUsed) Constructor.- Parameters:
measurements- list of body kinematics measurements with standard deviations taken at different frames (positions, orientations and velocities).commonAxisUsed- indicates whether z-axis is assumed to be common for accelerometer and gyroscope.
-
-
Method Details
-
getInitialBiasX
public double getInitialBiasX()Gets initial x-coordinate of gyroscope bias to be used to find a solutions. This is expressed in radians per second (rad/s) and only taken into account if non-linear preliminary solutions are used.- Specified by:
getInitialBiasXin interfaceUnknownBiasNonLinearGyroscopeCalibrator- Returns:
- initial x-coordinate of gyroscope bias.
-
setInitialBiasX
public void setInitialBiasX(double initialBiasX) throws com.irurueta.navigation.LockedException Sets initial x-coordinate of gyroscope bias to be used to find a solution. This is expressed in radians per second (rad/s) and only taken into account if non-linear preliminary solutions are used.- Specified by:
setInitialBiasXin interfaceUnknownBiasNonLinearGyroscopeCalibrator- Parameters:
initialBiasX- initial x-coordinate of gyroscope bias.- Throws:
com.irurueta.navigation.LockedException- if calibrator is currently running.
-
getInitialBiasY
public double getInitialBiasY()Gets initial y-coordinate of gyroscope bias to be used to find a solution. This is expressed in radians per second (rad/s) and only taken into account if non-linear preliminary solutions are used.- Specified by:
getInitialBiasYin interfaceUnknownBiasNonLinearGyroscopeCalibrator- Returns:
- initial y-coordinate of gyroscope bias.
-
setInitialBiasY
public void setInitialBiasY(double initialBiasY) throws com.irurueta.navigation.LockedException Sets initial y-coordinate of gyroscope bias to be used to find a solution. This is expressed in radians per second (rad/s) and only taken into account if non-linear preliminary solutions are used.- Specified by:
setInitialBiasYin interfaceUnknownBiasNonLinearGyroscopeCalibrator- Parameters:
initialBiasY- initial y-coordinate of gyroscope bias.- Throws:
com.irurueta.navigation.LockedException- if calibrator is currently running.
-
getInitialBiasZ
public double getInitialBiasZ()Gets initial z-coordinate of gyroscope bias to be used to find a solution. This is expressed in radians per second (rad/s) and only taken into account if non-linear preliminary solutions are used.- Specified by:
getInitialBiasZin interfaceUnknownBiasNonLinearGyroscopeCalibrator- Returns:
- initial z-coordinate of gyroscope bias.
-
setInitialBiasZ
public void setInitialBiasZ(double initialBiasZ) throws com.irurueta.navigation.LockedException Sets initial z-coordinate of gyroscope bias to be used to find a solution. This is expressed in radians per second (rad/s) and only taken into account if non-linear preliminary solutions are used.- Specified by:
setInitialBiasZin interfaceUnknownBiasNonLinearGyroscopeCalibrator- Parameters:
initialBiasZ- initial z-coordinate of gyroscope bias.- Throws:
com.irurueta.navigation.LockedException- if calibrator is currently running.
-
getInitialBiasAngularSpeedX
public com.irurueta.units.AngularSpeed getInitialBiasAngularSpeedX()Gets initial x-coordinate of gyroscope bias to be used to find a solution.- Specified by:
getInitialBiasAngularSpeedXin interfaceUnknownBiasNonLinearGyroscopeCalibrator- Returns:
- initial x-coordinate of gyroscope bias.
-
getInitialBiasAngularSpeedX
public void getInitialBiasAngularSpeedX(com.irurueta.units.AngularSpeed result) Gets initial x-coordinate of gyroscope bias to be used to find a solution.- Specified by:
getInitialBiasAngularSpeedXin interfaceUnknownBiasNonLinearGyroscopeCalibrator- Parameters:
result- instance where result data will be stored.
-
setInitialBiasX
public void setInitialBiasX(com.irurueta.units.AngularSpeed initialBiasX) throws com.irurueta.navigation.LockedException Sets initial x-coordinate of gyroscope bias to be used to find a solution.- Specified by:
setInitialBiasXin interfaceUnknownBiasNonLinearGyroscopeCalibrator- Parameters:
initialBiasX- initial x-coordinate of gyroscope bias.- Throws:
com.irurueta.navigation.LockedException- if calibrator is currently running.
-
getInitialBiasAngularSpeedY
public com.irurueta.units.AngularSpeed getInitialBiasAngularSpeedY()Gets initial y-coordinate of gyroscope bias to be used to find a solution.- Specified by:
getInitialBiasAngularSpeedYin interfaceUnknownBiasNonLinearGyroscopeCalibrator- Returns:
- initial y-coordinate of gyroscope bias.
-
getInitialBiasAngularSpeedY
public void getInitialBiasAngularSpeedY(com.irurueta.units.AngularSpeed result) Gets initial y-coordinate of gyroscope bias to be used to find a solution.- Specified by:
getInitialBiasAngularSpeedYin interfaceUnknownBiasNonLinearGyroscopeCalibrator- Parameters:
result- instance where result data will be stored.
-
setInitialBiasY
public void setInitialBiasY(com.irurueta.units.AngularSpeed initialBiasY) throws com.irurueta.navigation.LockedException Sets initial y-coordinate of gyroscope bias to be used to find a solution.- Specified by:
setInitialBiasYin interfaceUnknownBiasNonLinearGyroscopeCalibrator- Parameters:
initialBiasY- initial y-coordinate of gyroscope bias.- Throws:
com.irurueta.navigation.LockedException- if calibrator is currently running.
-
getInitialBiasAngularSpeedZ
public com.irurueta.units.AngularSpeed getInitialBiasAngularSpeedZ()Gets initial z-coordinate of gyroscope bias to be used to find a solution.- Specified by:
getInitialBiasAngularSpeedZin interfaceUnknownBiasNonLinearGyroscopeCalibrator- Returns:
- initial z-coordinate of gyroscope bias.
-
getInitialBiasAngularSpeedZ
public void getInitialBiasAngularSpeedZ(com.irurueta.units.AngularSpeed result) Gets initial z-coordinate of gyroscope bias to be used to find a solution.- Specified by:
getInitialBiasAngularSpeedZin interfaceUnknownBiasNonLinearGyroscopeCalibrator- Parameters:
result- instance where result data will be stored.
-
setInitialBiasZ
public void setInitialBiasZ(com.irurueta.units.AngularSpeed initialBiasZ) throws com.irurueta.navigation.LockedException Sets initial z-coordinate of gyroscope bias to be used to find a solution.- Specified by:
setInitialBiasZin interfaceUnknownBiasNonLinearGyroscopeCalibrator- Parameters:
initialBiasZ- initial z-coordinate of gyroscope bias.- Throws:
com.irurueta.navigation.LockedException- if calibrator is currently running.
-
setInitialBias
public void setInitialBias(double initialBiasX, double initialBiasY, double initialBiasZ) throws com.irurueta.navigation.LockedException Sets initial bias coordinates of gyroscope used to find a solution expressed in radians per second (rad/s).- Specified by:
setInitialBiasin interfaceUnknownBiasNonLinearGyroscopeCalibrator- Parameters:
initialBiasX- initial x-coordinate of gyroscope bias.initialBiasY- initial y-coordinate of gyroscope bias.initialBiasZ- initial z-coordinate of gyroscope bias.- Throws:
com.irurueta.navigation.LockedException- if calibrator is currently running.
-
setInitialBias
public void setInitialBias(com.irurueta.units.AngularSpeed initialBiasX, com.irurueta.units.AngularSpeed initialBiasY, com.irurueta.units.AngularSpeed initialBiasZ) throws com.irurueta.navigation.LockedException Sets initial bias coordinates of gyroscope used to find a solution.- Specified by:
setInitialBiasin interfaceUnknownBiasNonLinearGyroscopeCalibrator- Parameters:
initialBiasX- initial x-coordinate of gyroscope bias.initialBiasY- initial y-coordinate of gyroscope bias.initialBiasZ- initial z-coordinate of gyroscope bias.- Throws:
com.irurueta.navigation.LockedException- if calibrator is currently running.
-
getInitialSx
public double getInitialSx()Gets initial x scaling factor. This is only taken into account if non-linear preliminary solutions are used.- Specified by:
getInitialSxin interfaceGyroscopeNonLinearCalibrator- Returns:
- initial x scaling factor.
-
setInitialSx
public void setInitialSx(double initialSx) throws com.irurueta.navigation.LockedException Sets initial x scaling factor. This is only taken into account if non-linear preliminary solutions are used.- Specified by:
setInitialSxin interfaceGyroscopeNonLinearCalibrator- Parameters:
initialSx- initial x scaling factor.- Throws:
com.irurueta.navigation.LockedException- if calibrator is currently running.
-
getInitialSy
public double getInitialSy()Gets initial y scaling factor. This is only taken into account if non-linear preliminary solutions are used.- Specified by:
getInitialSyin interfaceGyroscopeNonLinearCalibrator- Returns:
- initial y scaling factor.
-
setInitialSy
public void setInitialSy(double initialSy) throws com.irurueta.navigation.LockedException Sets initial y scaling factor. This is only taken into account if non-linear preliminary solutions are used.- Specified by:
setInitialSyin interfaceGyroscopeNonLinearCalibrator- Parameters:
initialSy- initial y scaling factor.- Throws:
com.irurueta.navigation.LockedException- if calibrator is currently running.
-
getInitialSz
public double getInitialSz()Gets initial z scaling factor. This is only taken into account if non-linear preliminary solutions are used.- Specified by:
getInitialSzin interfaceGyroscopeNonLinearCalibrator- Returns:
- initial z scaling factor.
-
setInitialSz
public void setInitialSz(double initialSz) throws com.irurueta.navigation.LockedException Sets initial z scaling factor. This is only taken into account if non-linear preliminary solutions are used.- Specified by:
setInitialSzin interfaceGyroscopeNonLinearCalibrator- Parameters:
initialSz- initial z scaling factor.- Throws:
com.irurueta.navigation.LockedException- if calibrator is currently running.
-
getInitialMxy
public double getInitialMxy()Gets initial x-y cross coupling error. This is only taken into account if non-linear preliminary solutions are used.- Specified by:
getInitialMxyin interfaceGyroscopeNonLinearCalibrator- Returns:
- initial x-y cross coupling error.
-
setInitialMxy
public void setInitialMxy(double initialMxy) throws com.irurueta.navigation.LockedException Sets initial x-y cross coupling error. This is only taken into account if non-linear preliminary solutions are used.- Specified by:
setInitialMxyin interfaceGyroscopeNonLinearCalibrator- Parameters:
initialMxy- initial x-y cross coupling error.- Throws:
com.irurueta.navigation.LockedException- if calibrator is currently running.
-
getInitialMxz
public double getInitialMxz()Gets initial x-z cross coupling error. This is only taken into account if non-linear preliminary solutions are used.- Specified by:
getInitialMxzin interfaceGyroscopeNonLinearCalibrator- Returns:
- initial x-z cross coupling error.
-
setInitialMxz
public void setInitialMxz(double initialMxz) throws com.irurueta.navigation.LockedException Sets initial x-z cross coupling error. This is only taken into account if non-linear preliminary solutions are used.- Specified by:
setInitialMxzin interfaceGyroscopeNonLinearCalibrator- Parameters:
initialMxz- initial x-z cross coupling error.- Throws:
com.irurueta.navigation.LockedException- if calibrator is currently running.
-
getInitialMyx
public double getInitialMyx()Gets initial y-x cross coupling error. This is only taken into account if non-linear preliminary solutions are used.- Specified by:
getInitialMyxin interfaceGyroscopeNonLinearCalibrator- Returns:
- initial y-x cross coupling error.
-
setInitialMyx
public void setInitialMyx(double initialMyx) throws com.irurueta.navigation.LockedException Sets initial y-x cross coupling error. This is only taken into account if non-linear preliminary solutions are used.- Specified by:
setInitialMyxin interfaceGyroscopeNonLinearCalibrator- Parameters:
initialMyx- initial y-x cross coupling error.- Throws:
com.irurueta.navigation.LockedException- if calibrator is currently running.
-
getInitialMyz
public double getInitialMyz()Gets initial y-z cross coupling error. This is only taken into account if non-linear preliminary solutions are used.- Specified by:
getInitialMyzin interfaceGyroscopeNonLinearCalibrator- Returns:
- initial y-z cross coupling error.
-
setInitialMyz
public void setInitialMyz(double initialMyz) throws com.irurueta.navigation.LockedException Sets initial y-z cross coupling error. This is only taken into account if non-linear preliminary solutions are used.- Specified by:
setInitialMyzin interfaceGyroscopeNonLinearCalibrator- Parameters:
initialMyz- initial y-z cross coupling error.- Throws:
com.irurueta.navigation.LockedException- if calibrator is currently running.
-
getInitialMzx
public double getInitialMzx()Gets initial z-x cross coupling error. This is only taken into account if non-linear preliminary solutions are used.- Specified by:
getInitialMzxin interfaceGyroscopeNonLinearCalibrator- Returns:
- initial z-x cross coupling error.
-
setInitialMzx
public void setInitialMzx(double initialMzx) throws com.irurueta.navigation.LockedException Sets initial z-x cross coupling error. This is only taken into account if non-linear preliminary solutions are used.- Specified by:
setInitialMzxin interfaceGyroscopeNonLinearCalibrator- Parameters:
initialMzx- initial z-x cross coupling error.- Throws:
com.irurueta.navigation.LockedException- if calibrator is currently running.
-
getInitialMzy
public double getInitialMzy()Gets initial z-y cross coupling error. This is only taken into account if non-linear preliminary solutions are used.- Specified by:
getInitialMzyin interfaceGyroscopeNonLinearCalibrator- Returns:
- initial z-y cross coupling error.
-
setInitialMzy
public void setInitialMzy(double initialMzy) throws com.irurueta.navigation.LockedException Sets initial z-y cross coupling error. This is only taken into account if non-linear preliminary solutions are used.- Specified by:
setInitialMzyin interfaceGyroscopeNonLinearCalibrator- Parameters:
initialMzy- initial z-y cross coupling error.- Throws:
com.irurueta.navigation.LockedException- if calibrator is currently running.
-
setInitialScalingFactors
public void setInitialScalingFactors(double initialSx, double initialSy, double initialSz) throws com.irurueta.navigation.LockedException Sets initial scaling factors. This is only taken into account if non-linear preliminary solutions are used.- Specified by:
setInitialScalingFactorsin interfaceGyroscopeNonLinearCalibrator- Parameters:
initialSx- initial x scaling factor.initialSy- initial y scaling factor.initialSz- initial z scaling factor.- Throws:
com.irurueta.navigation.LockedException- if calibrator is currently running.
-
setInitialCrossCouplingErrors
public void setInitialCrossCouplingErrors(double initialMxy, double initialMxz, double initialMyx, double initialMyz, double initialMzx, double initialMzy) throws com.irurueta.navigation.LockedException Sets initial cross coupling errors. This is only taken into account if non-linear preliminary solutions are used.- Specified by:
setInitialCrossCouplingErrorsin interfaceGyroscopeNonLinearCalibrator- Parameters:
initialMxy- initial x-y cross coupling error.initialMxz- initial x-z cross coupling error.initialMyx- initial y-x cross coupling error.initialMyz- initial y-z cross coupling error.initialMzx- initial z-x cross coupling error.initialMzy- initial z-y cross coupling error.- Throws:
com.irurueta.navigation.LockedException- if calibrator is currently running.
-
setInitialScalingFactorsAndCrossCouplingErrors
public void setInitialScalingFactorsAndCrossCouplingErrors(double initialSx, double initialSy, double initialSz, double initialMxy, double initialMxz, double initialMyx, double initialMyz, double initialMzx, double initialMzy) throws com.irurueta.navigation.LockedException Sets initial scaling factors and cross coupling errors. This is only taken into account if non-linear preliminary solutions are used.- Specified by:
setInitialScalingFactorsAndCrossCouplingErrorsin interfaceGyroscopeNonLinearCalibrator- Parameters:
initialSx- initial x scaling factor.initialSy- initial y scaling factor.initialSz- initial z scaling factor.initialMxy- initial x-y cross coupling error.initialMxz- initial x-z cross coupling error.initialMyx- initial y-x cross coupling error.initialMyz- initial y-z cross coupling error.initialMzx- initial z-x cross coupling error.initialMzy- initial z-y cross coupling error.- Throws:
com.irurueta.navigation.LockedException- if calibrator is currently running.
-
getInitialBias
public double[] getInitialBias()Gets initial bias to be used to find a solution as an array. Array values are expressed in radians per second (rad/s).- Specified by:
getInitialBiasin interfaceUnknownBiasNonLinearGyroscopeCalibrator- Returns:
- array containing coordinates of initial bias.
-
getInitialBias
public void getInitialBias(double[] result) Gets initial bias to be used to find a solution as an array. Array values are expressed in radians per second (rad/s).- Specified by:
getInitialBiasin interfaceUnknownBiasNonLinearGyroscopeCalibrator- Parameters:
result- instance where result data will be copied to.- Throws:
IllegalArgumentException- if provided array does not have length 3.
-
setInitialBias
public void setInitialBias(double[] initialBias) throws com.irurueta.navigation.LockedException Sets initial bias to be used to find a solution as an array. Array values are expressed in radians per second (rad/s).- Specified by:
setInitialBiasin interfaceUnknownBiasNonLinearGyroscopeCalibrator- Parameters:
initialBias- initial bias to find a solution.- Throws:
com.irurueta.navigation.LockedException- if calibrator is currently running.IllegalArgumentException- if provided array does not have length 3.
-
getInitialBiasAsMatrix
public com.irurueta.algebra.Matrix getInitialBiasAsMatrix()Gets initial bias to be used to find a solution as a column matrix. Values are expressed in radians per second (rad/s).- Specified by:
getInitialBiasAsMatrixin interfaceUnknownBiasNonLinearGyroscopeCalibrator- Returns:
- initial bias to be used to find a solution as a column matrix.
-
getInitialBiasAsMatrix
public void getInitialBiasAsMatrix(com.irurueta.algebra.Matrix result) Gets initial bias to be used to find a solution as a column matrix. Values are expressed in radians per second (rad/s).- Specified by:
getInitialBiasAsMatrixin interfaceUnknownBiasNonLinearGyroscopeCalibrator- Parameters:
result- instance where result data will be copied to.- Throws:
IllegalArgumentException- if provided matrix is not 3x1.
-
setInitialBias
public void setInitialBias(com.irurueta.algebra.Matrix initialBias) throws com.irurueta.navigation.LockedException Sets initial bias to be used to find a solution as a column matrix with values expressed in radians per second (rad/s).- Specified by:
setInitialBiasin interfaceUnknownBiasNonLinearGyroscopeCalibrator- Parameters:
initialBias- initial bias to find a solution.- Throws:
com.irurueta.navigation.LockedException- if calibrator is currently running.IllegalArgumentException- if provided matrix is not 3x1.
-
getInitialBiasAsTriad
Gets initial bias coordinates of gyroscope used to find a solution.- Specified by:
getInitialBiasAsTriadin interfaceUnknownBiasNonLinearGyroscopeCalibrator- Returns:
- initial bias coordinates.
-
getInitialMg
public com.irurueta.algebra.Matrix getInitialMg()Gets initial scale factors and cross coupling errors matrix.- Specified by:
getInitialMgin interfaceGyroscopeNonLinearCalibrator- Returns:
- initial scale factors and cross coupling errors matrix.
-
getInitialMg
public void getInitialMg(com.irurueta.algebra.Matrix result) Gets initial scale factors and cross coupling errors matrix.- Specified by:
getInitialMgin interfaceGyroscopeNonLinearCalibrator- Parameters:
result- instance where data will be stored.- Throws:
IllegalArgumentException- if provided matrix is not 3x3.
-
setInitialMg
public void setInitialMg(com.irurueta.algebra.Matrix initialMg) throws com.irurueta.navigation.LockedException Sets initial scale factors and cross coupling errors matrix.- Specified by:
setInitialMgin interfaceGyroscopeNonLinearCalibrator- Parameters:
initialMg- initial scale factors and cross coupling errors matrix.- Throws:
IllegalArgumentException- if provided matrix is not 3x3.com.irurueta.navigation.LockedException- if calibrator is currently running.
-
getInitialGg
public com.irurueta.algebra.Matrix getInitialGg()Gets initial G-dependent cross biases introduced on the gyroscope by the specific forces sensed by the accelerometer.- Specified by:
getInitialGgin interfaceGyroscopeNonLinearCalibrator- Returns:
- a 3x3 matrix containing initial g-dependent cross biases.
-
getInitialGg
public void getInitialGg(com.irurueta.algebra.Matrix result) Gets initial G-dependent cross biases introduced on the gyroscope by the specific forces sensed by the accelerometer.- Specified by:
getInitialGgin interfaceGyroscopeNonLinearCalibrator- Parameters:
result- instance where data will be stored.- Throws:
IllegalArgumentException- if provided matrix is not 3x3.
-
setInitialGg
public void setInitialGg(com.irurueta.algebra.Matrix initialGg) throws com.irurueta.navigation.LockedException Sets initial G-dependent cross biases introduced on the gyroscope by the specific forces sensed by the accelerometer.- Specified by:
setInitialGgin interfaceGyroscopeNonLinearCalibrator- Parameters:
initialGg- g-dependent cross biases.- Throws:
com.irurueta.navigation.LockedException- if calibrator is currently running.IllegalArgumentException- if provided matrix is not 3x3.
-
getMeasurements
Gets a list of body kinematics measurements taken at different frames (positions, orientations and velocities) and containing the standard deviations of accelerometer and gyroscope measurements. If a single device IMU needs to be calibrated, typically all measurements are taken at the same position, with zero velocity and multiple orientations. However, if we just want to calibrate the a given IMU model (e.g. obtain an average and less precise calibration for the IMU of a given phone model), we could take measurements collected throughout the planet at multiple positions while the phone remains static (e.g. while charging), hence each measurement position will change, velocity will remain zero and orientation will be typically constant at horizontal orientation while the phone remains on a flat surface.- Specified by:
getMeasurementsin interfaceOrderedStandardDeviationFrameBodyKinematicsGyroscopeCalibrator- Returns:
- a collection of body kinematics measurements taken at different frames (positions, orientations and velocities).
-
setMeasurements
public void setMeasurements(List<StandardDeviationFrameBodyKinematics> measurements) throws com.irurueta.navigation.LockedException Sets a list of body kinematics measurements taken at different frames (positions, orientations and velocities) and containing the standard deviations of accelerometer and gyroscope measurements. If a single device IMU needs to be calibrated, typically all measurements are taken at the same position, with zero velocity and multiple orientations. However, if we just want to calibrate the a given IMU model (e.g. obtain an average and less precise calibration for the IMU of a given phone model), we could take measurements collected throughout the planet at multiple positions while the phone remains static (e.g. while charging), hence each measurement position will change, velocity will remain zero and orientation will be typically constant at horizontal orientation while the phone remains on a flat surface.- Specified by:
setMeasurementsin interfaceOrderedStandardDeviationFrameBodyKinematicsGyroscopeCalibrator- Parameters:
measurements- collection of body kinematics measurements taken at different frames (positions, orientations and velocities).- Throws:
com.irurueta.navigation.LockedException- if calibrator is currently running.
-
getMeasurementOrSequenceType
Indicates the type of measurement or sequence used by this calibrator.- Specified by:
getMeasurementOrSequenceTypein interfaceGyroscopeCalibrator- Returns:
- type of measurement or sequence used by this calibrator.
-
isOrderedMeasurementsOrSequencesRequired
public boolean isOrderedMeasurementsOrSequencesRequired()Indicates whether this calibrator requires ordered measurements or sequences in a list or not.- Specified by:
isOrderedMeasurementsOrSequencesRequiredin interfaceGyroscopeCalibrator- Returns:
- true if measurements or sequences must be ordered, false otherwise.
-
isCommonAxisUsed
public boolean isCommonAxisUsed()Indicates whether z-axis is assumed to be common for accelerometer and gyroscope. When enabled, this eliminates 3 variables from Ma matrix.- Specified by:
isCommonAxisUsedin interfaceGyroscopeCalibrator- Returns:
- true if z-axis is assumed to be common for accelerometer and gyroscope, false otherwise.
-
setCommonAxisUsed
public void setCommonAxisUsed(boolean commonAxisUsed) throws com.irurueta.navigation.LockedException Specifies whether z-axis is assumed to be common for accelerometer and gyroscope. When enabled, this eliminates 3 variables from Ma matrix.- Specified by:
setCommonAxisUsedin interfaceGyroscopeCalibrator- Parameters:
commonAxisUsed- true if z-axis is assumed to be common for accelerometer and gyroscope, false otherwise.- Throws:
com.irurueta.navigation.LockedException- if calibrator is currently running.
-
getListener
Gets listener to handle events raised by this estimator.- Returns:
- listener to handle events raised by this estimator.
-
getMinimumRequiredMeasurementsOrSequences
public int getMinimumRequiredMeasurementsOrSequences()Gets minimum number of required measurements.- Specified by:
getMinimumRequiredMeasurementsOrSequencesin interfaceGyroscopeCalibrator- Returns:
- minimum number of required measurements.
-
isReady
public boolean isReady()Indicates whether calibrator is ready to start.- Specified by:
isReadyin interfaceGyroscopeCalibrator- Returns:
- true if calibrator is ready, false otherwise.
-
isRunning
public boolean isRunning()Indicates whether calibrator is currently running or not.- Specified by:
isRunningin interfaceGyroscopeCalibrator- Returns:
- true if calibrator is running, false otherwise.
-
isLinearCalibratorUsed
public boolean isLinearCalibratorUsed()Indicates whether a linear calibrator is used or not for preliminary solutions.- Returns:
- indicates whether a linear calibrator is used or not for preliminary solutions.
-
setLinearCalibratorUsed
public void setLinearCalibratorUsed(boolean linearCalibratorUsed) throws com.irurueta.navigation.LockedException Specifies whether a linear calibrator is used or not for preliminary solutions.- Parameters:
linearCalibratorUsed- indicates whether a linear calibrator is used or not for preliminary solutions.- Throws:
com.irurueta.navigation.LockedException- if calibrator is currently running.
-
isPreliminarySolutionRefined
public boolean isPreliminarySolutionRefined()Indicates whether preliminary solutions must be refined after an initial linear solution is found. If no initial solution is found using a linear solver, a non linear solver will be used regardless of this value using an average solution as the initial value to be refined.- Returns:
- true if preliminary solutions must be refined after an initial linear solution, false otherwise.
-
setPreliminarySolutionRefined
public void setPreliminarySolutionRefined(boolean preliminarySolutionRefined) throws com.irurueta.navigation.LockedException Specifies whether preliminary solutions must be refined after an initial linear solution is found. If no initial solution is found using a linear solver, a non linear solver will be used regardless of this value using an average solution as the initial value to be refined.- Parameters:
preliminarySolutionRefined- true if preliminary solutions must be refined after an initial linear solution, false otherwise.- Throws:
com.irurueta.navigation.LockedException- if calibrator is currently running.
-
getProgressDelta
public float getProgressDelta()Returns amount of progress variation before notifying a progress change during calibration.- Returns:
- amount of progress variation before notifying a progress change during calibration.
-
setProgressDelta
public void setProgressDelta(float progressDelta) throws com.irurueta.navigation.LockedException Sets amount of progress variation before notifying a progress change during calibration.- Parameters:
progressDelta- amount of progress variation before notifying a progress change during calibration.- Throws:
IllegalArgumentException- if progress delta is less than zero or greater than 1.com.irurueta.navigation.LockedException- if calibrator is currently running.
-
getConfidence
public double getConfidence()Returns amount of confidence expressed as a value between 0.0 and 1.0 (which is equivalent to 100%). The amount of confidence indicates the probability that the estimated result is correct. Usually this value will be close to 1.0, but not exactly 1.0.- Returns:
- amount of confidence as a value between 0.0 and 1.0.
-
setConfidence
public void setConfidence(double confidence) throws com.irurueta.navigation.LockedException Sets amount of confidence expressed as a value between 0.0 and 1.0 (which is equivalent to 100%). The amount of confidence indicates the probability that the estimated result is correct. Usually this value will be close to 1.0, but not exactly 1.0.- Parameters:
confidence- confidence to be set as a value between 0.0 and 1.0.- Throws:
IllegalArgumentException- if provided value is not between 0.0 and 1.0.com.irurueta.navigation.LockedException- if calibrator is currently running.
-
getMaxIterations
public int getMaxIterations()Returns maximum allowed number of iterations. If maximum allowed number of iterations is achieved without converging to a result when calling calibrate(), a RobustEstimatorException will be raised.- Returns:
- maximum allowed number of iterations.
-
setMaxIterations
public void setMaxIterations(int maxIterations) throws com.irurueta.navigation.LockedException Sets maximum allowed number of iterations. When the maximum number of iterations is exceeded, result will not be available, however an approximate result will be available for retrieval.- Parameters:
maxIterations- maximum allowed number of iterations to be set.- Throws:
IllegalArgumentException- if provided value is less than 1.com.irurueta.navigation.LockedException- if calibrator is currently running.
-
getInliersData
public com.irurueta.numerical.robust.InliersData getInliersData()Gets data related to inliers found after estimation.- Returns:
- data related to inliers found after estimation.
-
isResultRefined
public boolean isResultRefined()Indicates whether result must be refined using a non-linear solver over found inliers.- Returns:
- true to refine result, false to simply use result found by robust estimator without further refining.
-
setResultRefined
public void setResultRefined(boolean refineResult) throws com.irurueta.navigation.LockedException Specifies whether result must be refined using a non-linear solver over found inliers.- Parameters:
refineResult- true to refine result, false to simply use result found by robust estimator without further refining.- Throws:
com.irurueta.navigation.LockedException- if calibrator is currently running.
-
isCovarianceKept
public boolean isCovarianceKept()Indicates whether covariance must be kept after refining result. This setting is only taken into account if result is refined.- Returns:
- true if covariance must be kept after refining result, false otherwise.
-
setCovarianceKept
public void setCovarianceKept(boolean keepCovariance) throws com.irurueta.navigation.LockedException Specifies whether covariance must be kept after refining result. This setting is only taken into account if result is refined.- Parameters:
keepCovariance- true if covariance must be kept after refining result, false otherwise.- Throws:
com.irurueta.navigation.LockedException- if calibrator is currently running.
-
getQualityScores
public double[] getQualityScores()Returns quality scores corresponding to each measurement. The larger the score value the better the quality of the sample. This implementation always returns null. Subclasses using quality scores must implement proper behavior.- Specified by:
getQualityScoresin interfaceQualityScoredGyroscopeCalibrator- Returns:
- quality scores corresponding to each sample.
-
setQualityScores
public void setQualityScores(double[] qualityScores) throws com.irurueta.navigation.LockedException Sets quality scores corresponding to each measurement. The larger the score value the better the quality of the sample. This implementation makes no action. Subclasses using quality scores must implement proper behaviour.- Specified by:
setQualityScoresin interfaceQualityScoredGyroscopeCalibrator- Parameters:
qualityScores- quality scores corresponding to each pair of matched points.- Throws:
IllegalArgumentException- if provided quality scores length is smaller than minimum required samples.com.irurueta.navigation.LockedException- if calibrator is currently running.
-
getEstimatedBiases
public double[] getEstimatedBiases()Gets array containing x,y,z components of estimated gyroscope biases expressed in radians per second (rad/s).- Specified by:
getEstimatedBiasesin interfaceGyroscopeCalibrationSource- Specified by:
getEstimatedBiasesin interfaceUnknownBiasGyroscopeCalibrator- Returns:
- array containing x,y,z components of estimated gyroscope biases.
-
getEstimatedBiases
public boolean getEstimatedBiases(double[] result) Gets array containing x,y,z components of estimated gyroscope biases expressed in radians per second (rad/s).- Specified by:
getEstimatedBiasesin interfaceUnknownBiasGyroscopeCalibrator- Parameters:
result- instance where estimated gyroscope biases will be stored.- Returns:
- true if result instance was updated, false otherwise (when estimation is not yet available).
-
getEstimatedBiasesAsMatrix
public com.irurueta.algebra.Matrix getEstimatedBiasesAsMatrix()Gets column matrix containing x,y,z components of estimated gyroscope biases expressed in radians per second (rad/s).- Specified by:
getEstimatedBiasesAsMatrixin interfaceUnknownBiasGyroscopeCalibrator- Returns:
- column matrix containing x,y,z components of estimated gyroscope biases.
-
getEstimatedBiasesAsMatrix
public boolean getEstimatedBiasesAsMatrix(com.irurueta.algebra.Matrix result) throws com.irurueta.algebra.WrongSizeException Gets column matrix containing x,y,z components of estimated gyroscope biases expressed in radians per second (rad/s).- Specified by:
getEstimatedBiasesAsMatrixin interfaceUnknownBiasGyroscopeCalibrator- Parameters:
result- instance where result data will be stored.- Returns:
- true if result was updated, false otherwise.
- Throws:
com.irurueta.algebra.WrongSizeException- if provided result instance has invalid size.
-
getEstimatedBiasX
Gets x coordinate of estimated gyroscope bias expressed in radians per second (rad/s).- Specified by:
getEstimatedBiasXin interfaceUnknownBiasGyroscopeCalibrator- Returns:
- x coordinate of estimated gyroscope bias or null if not available.
-
getEstimatedBiasY
Gets y coordinate of estimated gyroscope bias expressed in radians per second (rad/s).- Specified by:
getEstimatedBiasYin interfaceUnknownBiasGyroscopeCalibrator- Returns:
- y coordinate of estimated gyroscope bias or null if not available.
-
getEstimatedBiasZ
Gets z coordinate of estimated gyroscope bias expressed in radians per second (rad/s).- Specified by:
getEstimatedBiasZin interfaceUnknownBiasGyroscopeCalibrator- Returns:
- z coordinate of estimated gyroscope bias or null if not available.
-
getEstimatedBiasAngularSpeedX
public com.irurueta.units.AngularSpeed getEstimatedBiasAngularSpeedX()Gets x coordinate of estimated gyroscope bias.- Specified by:
getEstimatedBiasAngularSpeedXin interfaceUnknownBiasGyroscopeCalibrator- Returns:
- x coordinate of estimated gyroscope bias or null if not available.
-
getEstimatedBiasAngularSpeedX
public boolean getEstimatedBiasAngularSpeedX(com.irurueta.units.AngularSpeed result) Gets x coordinate of estimated gyroscope bias.- Specified by:
getEstimatedBiasAngularSpeedXin interfaceUnknownBiasGyroscopeCalibrator- Parameters:
result- instance where result will be stored.- Returns:
- true if result was updated, false if estimation is not available.
-
getEstimatedBiasAngularSpeedY
public com.irurueta.units.AngularSpeed getEstimatedBiasAngularSpeedY()Gets y coordinate of estimated gyroscope bias.- Specified by:
getEstimatedBiasAngularSpeedYin interfaceUnknownBiasGyroscopeCalibrator- Returns:
- y coordinate of estimated gyroscope bias or null if not available.
-
getEstimatedBiasAngularSpeedY
public boolean getEstimatedBiasAngularSpeedY(com.irurueta.units.AngularSpeed result) Gets y coordinate of estimated gyroscope bias.- Specified by:
getEstimatedBiasAngularSpeedYin interfaceUnknownBiasGyroscopeCalibrator- Parameters:
result- instance where result will be stored.- Returns:
- true if result was updated, false if estimation is not available.
-
getEstimatedBiasAngularSpeedZ
public com.irurueta.units.AngularSpeed getEstimatedBiasAngularSpeedZ()Gets z coordinate of estimated gyroscope bias.- Specified by:
getEstimatedBiasAngularSpeedZin interfaceUnknownBiasGyroscopeCalibrator- Returns:
- z coordinate of estimated gyroscope bias or null if not available.
-
getEstimatedBiasAngularSpeedZ
public boolean getEstimatedBiasAngularSpeedZ(com.irurueta.units.AngularSpeed result) Gets z coordinate of estimated gyroscope bias.- Specified by:
getEstimatedBiasAngularSpeedZin interfaceUnknownBiasGyroscopeCalibrator- Parameters:
result- instance where result will be stored.- Returns:
- true if result was updated, false if estimation is not available.
-
getEstimatedBiasAsTriad
Gets estimated gyroscope bias.- Specified by:
getEstimatedBiasAsTriadin interfaceUnknownBiasGyroscopeCalibrator- Returns:
- estimated gyroscope bias or null if not available.
-
getEstimatedMg
public com.irurueta.algebra.Matrix getEstimatedMg()Gets estimated gyroscope scale factors and cross coupling errors. This is the product of matrix Tg containing cross coupling errors and Kg containing scaling factors. So that:Mg = [sx mxy mxz] = Tg*Kg [myx sy myz] [mzx mzy sz ]Where:Kg = [sx 0 0 ] [0 sy 0 ] [0 0 sz]andTg = [1 -alphaXy alphaXz ] [alphaYx 1 -alphaYz] [-alphaZx alphaZy 1 ]Hence:Mg = [sx mxy mxz] = Tg*Kg = [sx -sy * alphaXy sz * alphaXz ] [myx sy myz] [sx * alphaYx sy -sz * alphaYz] [mzx mzy sz ] [-sx * alphaZx sy * alphaZy sz ]This instance allows any 3x3 matrix however, typically alphaYx, alphaZx and alphaZy are considered to be zero if the gyroscope z-axis is assumed to be the same as the body z-axis. When this is assumed, myx = mzx = mzy = 0 and the Mg matrix becomes upper diagonal:Mg = [sx mxy mxz] [0 sy myz] [0 0 sz ]Values of this matrix are unit-less.- Specified by:
getEstimatedMgin interfaceGyroscopeCalibrationSource- Specified by:
getEstimatedMgin interfaceGyroscopeCalibrator- Returns:
- estimated gyroscope scale factors and cross coupling errors, or null if not available.
-
getEstimatedSx
Gets estimated x-axis scale factor.- Specified by:
getEstimatedSxin interfaceGyroscopeCalibrator- Returns:
- estimated x-axis scale factor or null if not available.
-
getEstimatedSy
Gets estimated y-axis scale factor.- Specified by:
getEstimatedSyin interfaceGyroscopeCalibrator- Returns:
- estimated y-axis scale factor or null if not available.
-
getEstimatedSz
Gets estimated z-axis scale factor.- Specified by:
getEstimatedSzin interfaceGyroscopeCalibrator- Returns:
- estimated z-axis scale factor or null if not available.
-
getEstimatedMxy
Gets estimated x-y cross-coupling error.- Specified by:
getEstimatedMxyin interfaceGyroscopeCalibrator- Returns:
- estimated x-y cross-coupling error or null if not available.
-
getEstimatedMxz
Gets estimated x-z cross-coupling error.- Specified by:
getEstimatedMxzin interfaceGyroscopeCalibrator- Returns:
- estimated x-z cross-coupling error or null if not available.
-
getEstimatedMyx
Gets estimated y-x cross-coupling error.- Specified by:
getEstimatedMyxin interfaceGyroscopeCalibrator- Returns:
- estimated y-x cross-coupling error or null if not available.
-
getEstimatedMyz
Gets estimated y-z cross-coupling error.- Specified by:
getEstimatedMyzin interfaceGyroscopeCalibrator- Returns:
- estimated y-z cross-coupling error or null if not available.
-
getEstimatedMzx
Gets estimated z-x cross-coupling error.- Specified by:
getEstimatedMzxin interfaceGyroscopeCalibrator- Returns:
- estimated z-x cross-coupling error or null if not available.
-
getEstimatedMzy
Gets estimated z-y cross-coupling error.- Specified by:
getEstimatedMzyin interfaceGyroscopeCalibrator- Returns:
- estimated z-y cross-coupling error or null if not available.
-
getEstimatedGg
public com.irurueta.algebra.Matrix getEstimatedGg()Gets estimated G-dependent cross biases introduced on the gyroscope by the specific forces sensed by the accelerometer. This instance allows any 3x3 matrix.- Specified by:
getEstimatedGgin interfaceGyroscopeCalibrationSource- Specified by:
getEstimatedGgin interfaceGyroscopeCalibrator- Returns:
- estimated G-dependent cross biases.
-
getEstimatedMse
public double getEstimatedMse()Gets estimated mean square error respect to provided measurements.- Specified by:
getEstimatedMsein interfaceGyroscopeNonLinearCalibrator- Returns:
- estimated mean square error respect to provided measurements.
-
getEstimatedChiSq
public double getEstimatedChiSq()Gets estimated chi square value.- Specified by:
getEstimatedChiSqin interfaceGyroscopeNonLinearCalibrator- Returns:
- estimated chi square value.
-
getEstimatedChiSqDegreesOfFreedom
public int getEstimatedChiSqDegreesOfFreedom()Gets estimated chi square degrees of freedom. Degrees of freedom is equal to the number of sampled data minus the number of estimated parameters.- Specified by:
getEstimatedChiSqDegreesOfFreedomin interfaceGyroscopeNonLinearCalibrator- Returns:
- estimated degrees of freedom of chi square value
-
getEstimatedReducedChiSq
public double getEstimatedReducedChiSq()Gets estimated reduced chi square value. This is equal to estimated chi square value divided by its degrees of freedom. Ideally this value should be close to 1.0, indicating that fit is optimal. A value larger than 1.0 indicates that fit is not good or noise has been underestimated, and a value smaller than 1.0 indicates that there is overfitting or noise has been overestimated.- Specified by:
getEstimatedReducedChiSqin interfaceGyroscopeNonLinearCalibrator- Returns:
- estimated reduced chi square value
-
getEstimatedP
public double getEstimatedP()Gets estimated probability of finding a smaller chi square value expressed as a value between 0.0 and 1.0. The smaller the found chi square value is, the better the fit of the estimated parameters to the actual parameter. Thus, the smaller the chance of finding a smaller chi square value, then the better the estimated fit is.- Specified by:
getEstimatedPin interfaceGyroscopeNonLinearCalibrator- Returns:
- estimated probability of finding a smaller chi square value.
-
getEstimatedQ
public double getEstimatedQ()Gets estimated measure of quality of estimated fit as a value between 0.0 and 1.0. The larger the quality value is, the better the fit that has been estimated.- Specified by:
getEstimatedQin interfaceGyroscopeNonLinearCalibrator- Returns:
- estimated measure of quality of estimated fit.
-
getEstimatedCovariance
public com.irurueta.algebra.Matrix getEstimatedCovariance()Gets estimated covariance matrix for estimated calibration solution. Diagonal elements of the matrix contains variance for the following parameters (following indicated order): bgx, bgy, bgz, sx, sy, sz, mxy, mxz, myx, myz, mzx, mzy, gg11, gg21, gg31, gg12, gg22, gg32, gg13, gg23, gg33. This is only available when result has been refined and covariance is kept.- Specified by:
getEstimatedCovariancein interfaceGyroscopeNonLinearCalibrator- Returns:
- estimated covariance matrix for estimated position.
-
getEstimatedBiasXVariance
Gets variance of estimated x coordinate of gyroscope bias expressed in (rad^2/s^2).- Returns:
- variance of estimated x coordinate of gyroscope bias or null if not available.
-
getEstimatedBiasXStandardDeviation
Gets standard deviation of estimated x coordinate of gyroscope bias expressed in radians per second (rad/s).- Returns:
- standard deviation of estimated x coordinate of gyroscope bias or null if not available.
-
getEstimatedBiasXStandardDeviationAsAngularSpeed
public com.irurueta.units.AngularSpeed getEstimatedBiasXStandardDeviationAsAngularSpeed()Gets standard deviation of estimated x coordinate of gyroscope bias.- Returns:
- standard deviation of estimated x coordinate of gyroscope bias or null if not available.
-
getEstimatedBiasXStandardDeviationAsAngularSpeed
public boolean getEstimatedBiasXStandardDeviationAsAngularSpeed(com.irurueta.units.AngularSpeed result) Gets standard deviation of estimated x coordinate of gyroscope bias.- Parameters:
result- instance where result will be stored.- Returns:
- true if standard deviation of estimated x coordinate of gyroscope bias is available, false otherwise.
-
getEstimatedBiasYVariance
Gets variance of estimated y coordinate of gyroscope bias expressed in (rad^2/s^2).- Returns:
- variance of estimated y coordinate of gyroscope bias or null if not available.
-
getEstimatedBiasYStandardDeviation
Gets standard deviation of estimated y coordinate of gyroscope bias expressed in radians per second (rad/s).- Returns:
- standard deviation of estimated y coordinate of gyroscope bias or null if not available.
-
getEstimatedBiasYStandardDeviationAsAngularSpeed
public com.irurueta.units.AngularSpeed getEstimatedBiasYStandardDeviationAsAngularSpeed()Gets standard deviation of estimated y coordinate of gyroscope bias.- Returns:
- standard deviation of estimated y coordinate of gyroscope bias or null if not available.
-
getEstimatedBiasYStandardDeviationAsAngularSpeed
public boolean getEstimatedBiasYStandardDeviationAsAngularSpeed(com.irurueta.units.AngularSpeed result) Gets standard deviation of estimated y coordinate of gyroscope bias.- Parameters:
result- instance where result will be stored.- Returns:
- true if standard deviation of estimated y coordinate of gyroscope bias is available, false otherwise.
-
getEstimatedBiasZVariance
Gets variance of estimated z coordinate of gyroscope bias expressed in (rad^2/s^2).- Returns:
- variance of estimated z coordinate of gyroscope bias or null if not available.
-
getEstimatedBiasZStandardDeviation
Gets standard deviation of estimated z coordinate of gyroscope bias expressed in radians per second (rad/s).- Returns:
- standard deviation of estimated z coordinate of gyroscope bias or null if not available.
-
getEstimatedBiasZStandardDeviationAsAngularSpeed
public com.irurueta.units.AngularSpeed getEstimatedBiasZStandardDeviationAsAngularSpeed()Gets standard deviation of estimated z coordinate of gyroscope bias.- Returns:
- standard deviation of estimated z coordinate of gyroscope bias or null if not available.
-
getEstimatedBiasZStandardDeviationAsAngularSpeed
public boolean getEstimatedBiasZStandardDeviationAsAngularSpeed(com.irurueta.units.AngularSpeed result) Gets standard deviation of estimated z coordinate of gyroscope bias.- Parameters:
result- instance where result will be stored.- Returns:
- true if standard deviation of estimated z coordinate of gyroscope bias is available, false otherwise.
-
getEstimatedBiasStandardDeviation
Gets standard deviation of estimated gyroscope bias coordinates.- Returns:
- standard deviation of estimated gyroscope bias coordinates.
-
getEstimatedBiasStandardDeviationAverage
Gets average of estimated standard deviation of gyroscope bias coordinates expressed in radians per second (rad/s).- Returns:
- average of estimated standard deviation of gyroscope bias coordinates or null if not available.
-
getEstimatedBiasStandardDeviationAverageAsAngularSpeed
public com.irurueta.units.AngularSpeed getEstimatedBiasStandardDeviationAverageAsAngularSpeed()Gets average of estimated standard deviation of gyroscope bias coordinates.- Returns:
- average of estimated standard deviation of gyroscope bias coordinates or null.
-
getEstimatedBiasStandardDeviationAverageAsAngularSpeed
public boolean getEstimatedBiasStandardDeviationAverageAsAngularSpeed(com.irurueta.units.AngularSpeed result) Gets average of estimated standard deviation of gyroscope bias coordinates.- Parameters:
result- instance where result will be stored.- Returns:
- true if average of estimated standard deviation of gyroscope bias is available, false otherwise.
-
getEstimatedBiasStandardDeviationNorm
Gets norm of estimated standard deviation of gyroscope bias expressed in radians per second (rad/s). This can be used as the initial gyroscope bias uncertainty forINSLooselyCoupledKalmanInitializerConfigorINSTightlyCoupledKalmanInitializerConfig.- Specified by:
getEstimatedBiasStandardDeviationNormin interfaceGyroscopeBiasUncertaintySource- Returns:
- norm of estimated standard deviation of gyroscope bias or null if not available.
-
getEstimatedBiasStandardDeviationNormAsAngularSpeed
public com.irurueta.units.AngularSpeed getEstimatedBiasStandardDeviationNormAsAngularSpeed()Gets norm of estimated standard deviation of gyroscope bias. This can be used as the initial gyroscope bias uncertainty forINSLooselyCoupledKalmanInitializerConfigorINSTightlyCoupledKalmanInitializerConfig.- Returns:
- norm of estimated standard deviation of gyroscope bias or null if not available.
-
getEstimatedBiasStandardDeviationNormAsAngularSpeed
public boolean getEstimatedBiasStandardDeviationNormAsAngularSpeed(com.irurueta.units.AngularSpeed result) Gets norm of estimated standard deviation of gyroscope bias coordinates. This can be used as the initial gyroscope bias uncertainty forINSLooselyCoupledKalmanInitializerConfigorINSTightlyCoupledKalmanInitializerConfig.- Parameters:
result- instance where result will be stored.- Returns:
- true if norm of estimated standard deviation of gyroscope bias is available, false otherwise.
-
getPreliminarySubsetSize
public int getPreliminarySubsetSize()Gets size of subsets to be checked during robust estimation. This has to be at leastMINIMUM_MEASUREMENTS.- Returns:
- size of subsets to be checked during robust estimation.
-
setPreliminarySubsetSize
public void setPreliminarySubsetSize(int preliminarySubsetSize) throws com.irurueta.navigation.LockedException Sets size of subsets to be checked during robust estimation. This has to be at leastMINIMUM_MEASUREMENTS.- Parameters:
preliminarySubsetSize- size of subsets to be checked during robust estimation.- Throws:
com.irurueta.navigation.LockedException- if calibrator is currently running.IllegalArgumentException- if provided value is less thanMINIMUM_MEASUREMENTS.
-
getMethod
public abstract com.irurueta.numerical.robust.RobustEstimatorMethod getMethod()Returns method being used for robust estimation.- Returns:
- method being used for robust estimation.
-
create
public static RobustKnownFrameGyroscopeCalibrator create(com.irurueta.numerical.robust.RobustEstimatorMethod method) Creates a robust gyroscope calibrator.- Parameters:
method- robust estimator method.- Returns:
- a robust gyroscope calibrator.
-
create
public static RobustKnownFrameGyroscopeCalibrator create(List<StandardDeviationFrameBodyKinematics> measurements, com.irurueta.numerical.robust.RobustEstimatorMethod method) Creates a robust gyroscope calibrator.- Parameters:
measurements- list of body kinematics measurements with standard deviations taken at different frames (positions, orientations and velocities).method- robust estimator method.- Returns:
- a robust gyroscope calibrator.
-
create
public static RobustKnownFrameGyroscopeCalibrator create(boolean commonAxisUsed, com.irurueta.numerical.robust.RobustEstimatorMethod method) Creates a robust gyroscope calibrator.- Parameters:
commonAxisUsed- indicates whether z-axis is assumed to be common for accelerometer and gyroscope.method- robust estimator method.- Returns:
- a robust gyroscope calibrator.
-
create
public static RobustKnownFrameGyroscopeCalibrator create(List<StandardDeviationFrameBodyKinematics> measurements, boolean commonAxisUsed, com.irurueta.numerical.robust.RobustEstimatorMethod method) Creates a robust gyroscope calibrator.- Parameters:
measurements- list of body kinematics measurements with standard deviations taken at different frames (positions, orientation and velocities).commonAxisUsed- indicates whether z-axis is assumed to be common for accelerometer and gyroscope.method- robust estimator method.- Returns:
- a robust gyroscope calibrator.
-
create
public static RobustKnownFrameGyroscopeCalibrator create(double[] qualityScores, com.irurueta.numerical.robust.RobustEstimatorMethod method) Creates a robust gyroscope calibrator.- Parameters:
qualityScores- quality scores corresponding to each provided measurement. The larger the score value the better the quality of the sample.method- robust estimator method.- Returns:
- a robust gyroscope calibrator.
-
create
public static RobustKnownFrameGyroscopeCalibrator create(double[] qualityScores, List<StandardDeviationFrameBodyKinematics> measurements, com.irurueta.numerical.robust.RobustEstimatorMethod method) Creates a robust gyroscope calibrator.- Parameters:
qualityScores- quality scores corresponding to each provided measurement. The larger the score value the better the quality of the sample.measurements- list of body kinematics measurements with standard deviations taken at different frames (positions, orientations and velocities).method- robust estimator method.- Returns:
- a robust gyroscope calibrator.
-
create
public static RobustKnownFrameGyroscopeCalibrator create(double[] qualityScores, boolean commonAxisUsed, com.irurueta.numerical.robust.RobustEstimatorMethod method) Creates a robust gyroscope calibrator.- Parameters:
qualityScores- quality scores corresponding to each provided measurement. The larger the score value the better the quality of the sample.commonAxisUsed- indicates whether z-axis is assumed to be common for accelerometer and gyroscope.method- robust estimator method.- Returns:
- a robust gyroscope calibrator.
-
create
public static RobustKnownFrameGyroscopeCalibrator create(double[] qualityScores, List<StandardDeviationFrameBodyKinematics> measurements, boolean commonAxisUsed, com.irurueta.numerical.robust.RobustEstimatorMethod method) Creates a robust gyroscope calibrator.- Parameters:
qualityScores- quality scores corresponding to each provided measurement. The larger the score value the better the quality of the sample.measurements- list of body kinematics measurements with standard deviations taken at different frames (positions, orientations and velocities).commonAxisUsed- indicates whether z-axis is assumed to be common for accelerometer and gyroscope.method- robust estimator method.- Returns:
- a robust gyroscope calibrator.
-
create
Creates a robust gyroscope calibrator using default robust method.- Returns:
- a robust gyroscope calibrator.
-
create
public static RobustKnownFrameGyroscopeCalibrator create(List<StandardDeviationFrameBodyKinematics> measurements) Creates a robust gyroscope calibrator using default robust method.- Parameters:
measurements- list of body kinematics measurements with standard deviations taken at different frames (positions, orientations and velocities).- Returns:
- a robust gyroscope calibrator.
-
create
Creates a robust gyroscope calibrator using default robust method.- Parameters:
commonAxisUsed- indicates whether z-axis is assumed to be common for accelerometer and gyroscope.- Returns:
- a robust accelerometer calibrator.
-
create
public static RobustKnownFrameGyroscopeCalibrator create(List<StandardDeviationFrameBodyKinematics> measurements, boolean commonAxisUsed) Creates a robust gyroscope calibrator using default robust method.- Parameters:
measurements- list of body kinematics measurements with standard deviations taken at different (positions, orientations and velocities).commonAxisUsed- indicates whether z-axis is assigned to be common for accelerometer and gyroscope.- Returns:
- a robust gyroscope calibrator.
-
create
Creates a robust gyroscope calibrator using default robust method.- Parameters:
qualityScores- quality scores corresponding to each provided measurement. The larger the score value the better the quality of the sample.- Returns:
- a robust gyroscope calibrator.
-
create
public static RobustKnownFrameGyroscopeCalibrator create(double[] qualityScores, List<StandardDeviationFrameBodyKinematics> measurements) Creates a robust gyroscope calibrator using default robust method- Parameters:
qualityScores- quality scores corresponding to each provided measurement. The larger the score value the better the quality of the sample.measurements- list of body kinematics measurements with standard deviations taken at different frames (positions, orientations and velocities).- Returns:
- a robust gyroscope calibrator.
-
create
public static RobustKnownFrameGyroscopeCalibrator create(double[] qualityScores, boolean commonAxisUsed) Creates a robust gyroscope calibrator using default robust method.- Parameters:
qualityScores- quality scores corresponding to each provided measurement. The larger the score value the better the quality of the sample.commonAxisUsed- indicates whether z-axis is assumed to be common for accelerometer and gyroscope.- Returns:
- a robust gyroscope calibrator.
-
create
public static RobustKnownFrameGyroscopeCalibrator create(double[] qualityScores, List<StandardDeviationFrameBodyKinematics> measurements, boolean commonAxisUsed) Creates a robust gyroscope calibrator using default robust method.- Parameters:
qualityScores- quality scores corresponding to each provided measurement. The larger the score value the better the quality of the sample.measurements- list of body kinematics measurements with standard deviations taken at different frames (positions, orientations and velocities).commonAxisUsed- indicates whether z-axis is assumed to be common for accelerometer and gyroscope.- Returns:
- a robust gyroscope calibrator.
-
computePreliminarySolutions
protected void computePreliminarySolutions(int[] samplesIndices, List<RobustKnownFrameGyroscopeCalibrator.PreliminaryResult> solutions) Computes a preliminary solution for a subset of samples picked by a robust estimator.- Parameters:
samplesIndices- indices of samples picked by the robust estimator.solutions- list where estimated preliminary solution will be stored.
-
convertAngularSpeed
private static double convertAngularSpeed(double value, com.irurueta.units.AngularSpeedUnit unit) Converts angular speed value and unit to radians per second.- Parameters:
value- angular speed value.unit- unit of angular speed value.- Returns:
- converted value.
-
convertAngularSpeed
private static double convertAngularSpeed(com.irurueta.units.AngularSpeed angularSpeed) Converts angular speed instance to radians per second.- Parameters:
angularSpeed- angular speed instance to be converted.- Returns:
- converted value.
-