Class KnownBiasEasyGyroscopeCalibrator
- All Implemented Interfaces:
AccelerometerDependentGyroscopeCalibrator
,GyroscopeCalibrator
,GyroscopeNonLinearCalibrator
,KnownBiasGyroscopeCalibrator
,OrderedBodyKinematicsSequenceGyroscopeCalibrator
This calibrator assumes that the IMU is at a more or less fixed location on Earth, and evaluates sequences of measured body kinematics to perform calibration for unknown orientations on those provided sequences. Each provided sequence will be preceded by a static period where mean specific force will be measured to determine gravity (and hence partial body attitude).
To use this calibrator at least 7 sequences are needed (each containing at least 3 body kinematics measurements) when common z-axis is assumed and G-dependant cross biases are ignored, otherwise at least 10 sequences are required (each containing at least 3 body kinematics measurements) when common z-axis is not assumed. If G-dependent cross biases are being estimated, then at least 16 measurements are needed when common z-axis is assumed, otherwise at least 19 sequences are required (each containing at least 3 body kinematics measurements) when common z-axis is not assumed.
Measured gyroscope angular rates is assumed to follow the model shown below:
Ωmeas = bg + (I + Mg) * Ωtrue + Gg * ftrue + wWhere: - Ω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.
This calibrator is based on the ideas of David Tedaldi, Alberto Pretto, Emmanuelle Menegatti. A Robust and Easy to Implement Method for IMU Calibration without External Equipments.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final AccelerationFixer
Acceleration fixer.private double
Known x-coordinate of accelerometer bias to be used to fix measured specific force and find cross biases introduced by the accelerometer.private double
Known y-coordinate of accelerometer bias to be used to fix measured specific force and find cross biases introduced by the accelerometer.private double
Known z-coordinate of accelerometer bias to be used to fix measured specific force and find cross biases introduced by the accelerometer.private double
Known accelerometer x-y cross coupling error to be used to fix measured specific force and find cross biases introduced by the accelerometer.private double
Know accelerometer x-z cross coupling error to be used to fix measured specific force and find cross biases introduced by the accelerometer.private double
Known accelerometer y-x cross coupling error to be used to fix measured specific force and find cross biases introduced by the accelerometer.private double
Known accelerometer y-z cross coupling error to be used to fix measured specific force and find cross biases introduced by the accelerometer.private double
Known accelerometer z-x cross coupling error to be used to fix measured specific force and find cross biases introduced by the accelerometer.private double
Known accelerometer z-y cross coupling error to be used to fix measured specific force and find cross biases introduced by the accelerometer.private double
Known accelerometer x scaling factor to be used to fix measured specific force and find cross biases introduced by the accelerometer.private double
Known accelerometer y scaling factor to be used to fix measured specific force and find cross biases introduced by the accelerometer.private double
Known accelerometer z scaling factor to be used to fix measured specific force and find cross biases introduced by the accelerometer.private com.irurueta.algebra.Matrix
Internally holds biases during calibration.private double
X-coordinate of gyroscope known bias expressed in radians per second (rad/s).private double
Y-coordinate of gyroscope known bias expressed in radians per second (rad/s).private double
Z-coordinate of gyroscope known bias expressed in radians per second (rad/s).static final int
Number of unknowns when common z-axis is assumed for both the accelerometer and gyroscope when G-dependent cross biases are not being estimated.static final int
Number of unknowns when common z-axis is assumed for both the accelerometer and gyroscope when G-dependent cross biases are being estimated.private boolean
This flag indicates whether z-axis is assumed to be common for accelerometer and gyroscope.static final boolean
Indicates that by default G-dependent cross biases introduced by the accelerometer on the gyroscope are estimated.static final boolean
Indicates whether by default a common z-axis is assumed for both the accelerometer and gyroscope.private final com.irurueta.geometry.InhomogeneousPoint3D
Holds normalized gravity versor at the end of a sequence.private double
Estimated chi square value.private com.irurueta.algebra.Matrix
Estimated covariance matrix for estimated parameters.private com.irurueta.algebra.Matrix
Estimated G-dependent cross biases introduced on the gyroscope by the specific forces sensed by the accelerometer.private com.irurueta.algebra.Matrix
Estimated gyroscope scale factors and cross coupling errors.private double
Estimated mean square error respect to provided measurements.private boolean
This flag indicates whether G-dependent cross biases are being estimated or not.private final com.irurueta.geometry.InhomogeneousPoint3D
Contains expected gravity versor obtained from measurements fixed using known accelerometer parameters.private final com.irurueta.numerical.fitting.LevenbergMarquardtMultiDimensionFitter
Levenberg-Marquardt fitter to find a non-linear solution.Contains a copy of input sequences where fixed body kinematics will be updated.private com.irurueta.algebra.Matrix
Internally hold g-dependent cross biases during calibration.static final int
Number of unknowns for the general case when G-dependent cross biases are not being estimated.static final int
Number of unknowns for the general case when G-dependent cross biases are being estimated.private int
Index of current point being evaluated.private com.irurueta.algebra.Matrix
Initial G-dependent cross biases introduced on the gyroscope by the specific forces sensed by the accelerometer.private double
Initial gyroscope x-y cross coupling error.private double
Initial gyroscope x-z cross coupling error.private double
Initial gyroscope y-x cross coupling error.private double
Initial gyroscope y-z cross coupling error.private double
Initial gyroscope z-x cross coupling error.private double
Initial gyroscope z-y cross coupling error.private double
Initial gyroscope x scaling factor.private double
Initial gyroscope y scaling factor.private double
Initial gyroscope z scaling factor.private com.irurueta.algebra.Matrix
Internally holds inverse of cross-coupling errors during calibration.Listener to handle events raised by this calibrator.private com.irurueta.algebra.Matrix
Internally holds cross-coupling errors during calibration.private com.irurueta.algebra.Matrix
Contains measured angular rate on a sample within a sequence expressed as a 3x1 matrix.private com.irurueta.algebra.Matrix
Contains measured specific force on a sample within a sequence expressed as a 3x1 matrix.static final int
Required minimum number of sequences when common z-axis is assumed and G-dependent cross biases are being ignored.static final int
Required minimum number of sequences when common z-axis is assumed and G-dependent cross biases are being estimated.static final int
Required minimum number of sequences for the general case and G-dependent cross biases are being ignored.static final int
Required minimum number of sequences for the general case and G-dependent cross biases are being estimated.private double[]
Array containing normalized gravity versor before (former 3 values) and after (latter 3 values) a given sequence.private final com.irurueta.geometry.Quaternion
Holds integrated rotation of a sequence.private boolean
Indicates whether calibrator is running.Contains a collection of sequences of timestamped body kinematics measurements taken at a given position where the device moves freely with different orientations.private final com.irurueta.geometry.InhomogeneousPoint3D
Holds normalized gravity versor at the start of a sequence.private com.irurueta.algebra.Matrix
Internally holds angular rate bias due to g-dependent cross biasesprivate com.irurueta.algebra.Matrix
Contains fixed specific force for a sample within a sequence using current parameters being estimated.private com.irurueta.algebra.Matrix
Contains fixed specific force for a sample within a sequence using provided accelerometer parameters and expressed as a 3x1 matrix. -
Constructor Summary
ConstructorsConstructorDescriptionConstructor.KnownBiasEasyGyroscopeCalibrator
(List<BodyKinematicsSequence<StandardDeviationTimedBodyKinematics>> sequences, boolean commonAxisUsed, boolean estimateGDependentCrossBiases, double[] bias, com.irurueta.algebra.Matrix initialMg, com.irurueta.algebra.Matrix initialGg) Constructor.KnownBiasEasyGyroscopeCalibrator
(List<BodyKinematicsSequence<StandardDeviationTimedBodyKinematics>> sequences, boolean commonAxisUsed, boolean estimateGDependentCrossBiases, double[] bias, com.irurueta.algebra.Matrix initialMg, com.irurueta.algebra.Matrix initialGg, double[] accelerometerBias, com.irurueta.algebra.Matrix accelerometerMa) Constructor.KnownBiasEasyGyroscopeCalibrator
(List<BodyKinematicsSequence<StandardDeviationTimedBodyKinematics>> sequences, boolean commonAxisUsed, boolean estimateGDependentCrossBiases, double[] bias, com.irurueta.algebra.Matrix initialMg, com.irurueta.algebra.Matrix initialGg, double[] accelerometerBias, com.irurueta.algebra.Matrix accelerometerMa, KnownBiasEasyGyroscopeCalibratorListener listener) Constructor.KnownBiasEasyGyroscopeCalibrator
(List<BodyKinematicsSequence<StandardDeviationTimedBodyKinematics>> sequences, boolean commonAxisUsed, boolean estimateGDependentCrossBiases, double[] bias, com.irurueta.algebra.Matrix initialMg, com.irurueta.algebra.Matrix initialGg, KnownBiasEasyGyroscopeCalibratorListener listener) Constructor.KnownBiasEasyGyroscopeCalibrator
(List<BodyKinematicsSequence<StandardDeviationTimedBodyKinematics>> sequences, boolean commonAxisUsed, boolean estimateGDependentCrossBiases, com.irurueta.algebra.Matrix bias, com.irurueta.algebra.Matrix initialMg, com.irurueta.algebra.Matrix initialGg) Constructor.KnownBiasEasyGyroscopeCalibrator
(List<BodyKinematicsSequence<StandardDeviationTimedBodyKinematics>> sequences, boolean commonAxisUsed, boolean estimateGDependentCrossBiases, com.irurueta.algebra.Matrix bias, com.irurueta.algebra.Matrix initialMg, com.irurueta.algebra.Matrix initialGg, com.irurueta.algebra.Matrix accelerometerBias, com.irurueta.algebra.Matrix accelerometerMa) Constructor.KnownBiasEasyGyroscopeCalibrator
(List<BodyKinematicsSequence<StandardDeviationTimedBodyKinematics>> sequences, boolean commonAxisUsed, boolean estimateGDependentCrossBiases, com.irurueta.algebra.Matrix bias, com.irurueta.algebra.Matrix initialMg, com.irurueta.algebra.Matrix initialGg, com.irurueta.algebra.Matrix accelerometerBias, com.irurueta.algebra.Matrix accelerometerMa, KnownBiasEasyGyroscopeCalibratorListener listener) Constructor.KnownBiasEasyGyroscopeCalibrator
(List<BodyKinematicsSequence<StandardDeviationTimedBodyKinematics>> sequences, boolean commonAxisUsed, boolean estimateGDependentCrossBiases, com.irurueta.algebra.Matrix bias, com.irurueta.algebra.Matrix initialMg, com.irurueta.algebra.Matrix initialGg, KnownBiasEasyGyroscopeCalibratorListener listener) Constructor.KnownBiasEasyGyroscopeCalibrator
(List<BodyKinematicsSequence<StandardDeviationTimedBodyKinematics>> sequences, double[] bias, com.irurueta.algebra.Matrix initialMg, com.irurueta.algebra.Matrix initialGg) Constructor.KnownBiasEasyGyroscopeCalibrator
(List<BodyKinematicsSequence<StandardDeviationTimedBodyKinematics>> sequences, double[] bias, com.irurueta.algebra.Matrix initialMg, com.irurueta.algebra.Matrix initialGg, double[] accelerometerBias, com.irurueta.algebra.Matrix accelerometerMa) Constructor.KnownBiasEasyGyroscopeCalibrator
(List<BodyKinematicsSequence<StandardDeviationTimedBodyKinematics>> sequences, double[] bias, com.irurueta.algebra.Matrix initialMg, com.irurueta.algebra.Matrix initialGg, double[] accelerometerBias, com.irurueta.algebra.Matrix accelerometerMa, KnownBiasEasyGyroscopeCalibratorListener listener) Constructor.KnownBiasEasyGyroscopeCalibrator
(List<BodyKinematicsSequence<StandardDeviationTimedBodyKinematics>> sequences, double[] bias, com.irurueta.algebra.Matrix initialMg, com.irurueta.algebra.Matrix initialGg, KnownBiasEasyGyroscopeCalibratorListener listener) Constructor.KnownBiasEasyGyroscopeCalibrator
(List<BodyKinematicsSequence<StandardDeviationTimedBodyKinematics>> sequences, com.irurueta.algebra.Matrix bias, com.irurueta.algebra.Matrix initialMg, com.irurueta.algebra.Matrix initialGg) Constructor.KnownBiasEasyGyroscopeCalibrator
(List<BodyKinematicsSequence<StandardDeviationTimedBodyKinematics>> sequences, com.irurueta.algebra.Matrix bias, com.irurueta.algebra.Matrix initialMg, com.irurueta.algebra.Matrix initialGg, com.irurueta.algebra.Matrix accelerometerBias, com.irurueta.algebra.Matrix accelerometerMa) Constructor.KnownBiasEasyGyroscopeCalibrator
(List<BodyKinematicsSequence<StandardDeviationTimedBodyKinematics>> sequences, com.irurueta.algebra.Matrix bias, com.irurueta.algebra.Matrix initialMg, com.irurueta.algebra.Matrix initialGg, com.irurueta.algebra.Matrix accelerometerBias, com.irurueta.algebra.Matrix accelerometerMa, KnownBiasEasyGyroscopeCalibratorListener listener) Constructor.KnownBiasEasyGyroscopeCalibrator
(List<BodyKinematicsSequence<StandardDeviationTimedBodyKinematics>> sequences, com.irurueta.algebra.Matrix bias, com.irurueta.algebra.Matrix initialMg, com.irurueta.algebra.Matrix initialGg, KnownBiasEasyGyroscopeCalibratorListener listener) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoid
Estimates gyroscope calibration parameters containing scale factors, cross-coupling errors and G-dependent coupling.private void
Internal method to perform calibration when common z-axis is assumed for both the accelerometer and gyroscope and G-dependent cross biases are ignored.private void
Internal method to perform calibration when common z-axis is assumed for both the accelerometer and gyroscope and when G-dependent cross biases are being estimated.private void
Internal method to perform general calibration when G-dependant cross biases are ignored.private void
Internal method to perform general calibration when G-dependent cross biases are being estimated.private static double
computeAverageAngularRateStandardDeviation
(BodyKinematicsSequence<StandardDeviationTimedBodyKinematics> sequence) Computes average angular rate standard deviation for measurements in provided sequence.private static double
convertAcceleration
(com.irurueta.units.Acceleration acceleration) Converts acceleration instance to meters per squared second.private static double
convertAngularSpeed
(double value, com.irurueta.units.AngularSpeedUnit unit) Converts angular speed instance to radians per second (rad/s).private static double
convertAngularSpeed
(com.irurueta.units.AngularSpeed angularSpeed) Converts angular speed instance to radians per second (rad/s).private double
evaluate
(int i, double m11, double m21, double m31, double m12, double m22, double m32, double m13, double m23, double m33, double g11, double g21, double g31, double g12, double g22, double g32, double g13, double g23, double g33) Computes gravity versor error at the end of a sequence using provided parameters.private double
evaluateCommonAxis
(int i, double[] params) Computes gravity versor error at the end of a sequence using provided parameters.private double
evaluateCommonAxisWithGDependentCrossBiases
(int i, double[] params) Computes gravity versor error at the end of a sequence using provided parameters.private double
evaluateGeneral
(int i, double[] params) Computes gravity versor error at the end of a sequence using provided parameters.private double
evaluateGeneralWithGDependentCrossBiases
(int i, double[] params) Computes gravity versor error at the end of a sequence using provided parameters.private void
fixKinematics
(BodyKinematics kinematics, BodyKinematics result) Fixes provided kinematics with provided accelerometer parameters and current gyroscope parameters.double[]
Gets known accelerometer bias to be used to fix measured specific force and find cross biases introduced by the accelerometer.void
getAccelerometerBias
(double[] result) Gets known accelerometer bias to be used to fix measured specific force and find cross biases introduced by the accelerometer.com.irurueta.algebra.Matrix
Gets known accelerometer bias to be used to fix measured specific force and find cross biases introduced by the accelerometer.void
getAccelerometerBiasAsMatrix
(com.irurueta.algebra.Matrix result) Gets known accelerometer bias to be used to fix measured specific force and find cross biases introduced by the accelerometer.double
Gets known x-coordinate of accelerometer bias to be used to fix measured specific force and find cross biases introduced by the accelerometer.com.irurueta.units.Acceleration
Gets known x-coordinate of accelerometer bias to be used to fix measured specific force and find cross biases introduced by the accelerometer.void
getAccelerometerBiasXAsAcceleration
(com.irurueta.units.Acceleration result) Gets known x-coordinate of accelerometer bias to be used to fix measured specific force and find cross biases introduced by the accelerometer.double
Gets known y-coordinate of accelerometer bias to be used to fix measured specific force and find cross biases introduced by the accelerometer.com.irurueta.units.Acceleration
Gets known y-coordinate of accelerometer bias to be used to fix measured specific force and find cross biases introduced by the accelerometer.void
getAccelerometerBiasYAsAcceleration
(com.irurueta.units.Acceleration result) Gets known y-coordinate of accelerometer bias to be used to fix measured specific force and find cross biases introduced by the accelerometer.double
Gets known z-coordinate of accelerometer bias to be used to fix measured specific force and find cross biases introduced by the accelerometer.com.irurueta.units.Acceleration
Gets known z-coordinate of accelerometer bias to be used to fix measured specific force and find cross biases introduced by the accelerometer.void
getAccelerometerBiasZAsAcceleration
(com.irurueta.units.Acceleration result) Gets known z-coordinate of accelerometer bias to be used to fix measured specific force and find cross biases introduced by the accelerometer.com.irurueta.algebra.Matrix
Gets known accelerometer scale factors and cross coupling errors matrix.void
getAccelerometerMa
(com.irurueta.algebra.Matrix result) Gets known accelerometer scale factors and cross coupling errors matrix.double
Gets known accelerometer x-y cross coupling error to be used to fix measured specific force and find cross biases introduced by the accelerometer.double
Gets known accelerometer x-z cross coupling error to be used to fix measured specific force and find cross biases introduced by the accelerometer.double
Gets known accelerometer y-x cross coupling error to be used to fix measured specific force and find cross biases introduced by the accelerometer.double
Gets known accelerometer y-z cross coupling error to be used to fix measured specific force and find cross biases introduced by the accelerometer.double
Gets known accelerometer z-x cross coupling error to be used to fix measured specific force and find cross biases introduced by the accelerometer.double
Gets known accelerometer z-y cross coupling error to be used to fix measured specific force and find cross biases introduced by the accelerometer.double
Gets known accelerometer x scaling factor to be used to fix measured specific force and find cross biases introduced by the accelerometer.double
Gets known accelerometer y scaling factor to be used to fix measured specific force and find cross biases introduced by the accelerometer.double
Gets known accelerometer z scaling factor to be used to fix measured specific force and find cross biases introduced by the accelerometer.double[]
getBias()
Gets gyroscope known bias as an array.void
getBias
(double[] result) Gets gyroscope known bias as an array.com.irurueta.units.AngularSpeed
Gets x-coordinate of gyroscope known bias.void
getBiasAngularSpeedX
(com.irurueta.units.AngularSpeed result) Gets x-coordinate of gyroscope known bias.com.irurueta.units.AngularSpeed
Gets y-coordinate of gyroscope known bias.void
getBiasAngularSpeedY
(com.irurueta.units.AngularSpeed result) Gets y-coordinate of gyroscope known bias.com.irurueta.units.AngularSpeed
Gets z-coordinate of gyroscope known bias.void
getBiasAngularSpeedZ
(com.irurueta.units.AngularSpeed result) Gets z-coordinate of gyroscope known bias.com.irurueta.algebra.Matrix
Gets gyroscope known bias as a column matrix.void
getBiasAsMatrix
(com.irurueta.algebra.Matrix result) Gets gyroscope known bias as a column matrix.Gets known gyroscope bias.void
getBiasAsTriad
(AngularSpeedTriad result) Gets known gyroscope bias.double
getBiasX()
Gets x-coordinate of gyroscope known bias.double
getBiasY()
Gets y-coordinate of gyroscope known bias.double
getBiasZ()
Gets z-coordinate of gyroscope known bias.double
Gets estimated chi square value.com.irurueta.algebra.Matrix
Gets estimated covariance matrix for estimated parameters.com.irurueta.algebra.Matrix
Gets estimated G-dependent cross biases introduced on the gyroscope by the specific forces sensed by the accelerometer.com.irurueta.algebra.Matrix
Gets estimated gyroscope scale factors and cross coupling errors.double
Gets estimated mean square error respect to provided measurements.Gets estimated gyroscope x-y cross-coupling error.Gets estimated gyroscope x-z cross-coupling error.Gets estimated gyroscope y-x cross-coupling error.Gets estimated gyroscope y-z cross-coupling error.Gets estimated gyroscope z-x cross-coupling error.Gets estimated gyroscope z-y cross-coupling error.Gets estimated gyroscope x-axis scale factor.Gets estimated gyroscope y-axis scale factor.Gets estimated gyroscope z-axis scale factor.com.irurueta.algebra.Matrix
Gets initial G-dependent cross biases introduced on the gyroscope by the specific forces sensed by the accelerometer.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.com.irurueta.algebra.Matrix
Gets initial gyroscope scale factors and cross coupling errors matrix.void
getInitialMg
(com.irurueta.algebra.Matrix result) Gets initial gyroscope scale factors and cross coupling errors matrix.double
Gets initial x-y cross coupling error of gyroscope.double
Gets initial x-z cross coupling error of gyroscope.double
Gets initial y-x cross coupling error of gyroscope.double
Gets initial y-z cross coupling error of gyroscope.double
Gets initial z-x cross coupling error of gyroscope.double
Gets initial z-y cross coupling error of gyroscope.double
Gets initial x scaling factor of gyroscope.double
Gets initial y scaling factor of gyroscope.double
Gets initial z scaling factor of gyroscope.Gets listener to handle events raised by this estimator.Indicates the type of measurement or sequence used by this calibrator.int
Gets minimum number of required sequences.Gets collection of sequences of timestamped body kinematics measurements taken at a given position where the device moves freely with different orientations.boolean
Indicates whether z-axis is assumed to be common for accelerometer and gyroscope.boolean
Indicates whether G-dependent cross biases are being estimated or not.boolean
Indicates whether this calibrator requires ordered measurements or sequences in a list or not.boolean
Indicates whether this calibrator requires quality scores for each measurement/sequence or not.boolean
isReady()
Indicates whether calibrator is ready to start.boolean
Indicates whether calibrator is currently running or not.private void
reset()
Resets any previous estimations.void
setAccelerometerBias
(double[] accelerometerBias) Sets known accelerometer bias to be used to fix measured specific force and find cross biases introduced by the accelerometer.void
setAccelerometerBias
(double accelerometerBiasX, double accelerometerBiasY, double accelerometerBiasZ) Sets known accelerometer bias to be used to fix measured specific force and find cross biases introduced by the accelerometer.void
setAccelerometerBias
(com.irurueta.algebra.Matrix accelerometerBias) Sets known accelerometer bias to be used to fix measured specific force and find cross biases introduced by the accelerometer.void
setAccelerometerBias
(com.irurueta.units.Acceleration accelerometerBiasX, com.irurueta.units.Acceleration accelerometerBiasY, com.irurueta.units.Acceleration accelerometerBiasZ) Sets known accelerometer bias to be used to fix measured specific force and find cross biases introduced by the accelerometer.void
setAccelerometerBiasX
(double accelerometerBiasX) Sets known x-coordinate of accelerometer bias to be used to fix measured specific force and find cross biases introduced by the accelerometer.void
setAccelerometerBiasX
(com.irurueta.units.Acceleration accelerometerBiasX) Sets known x-coordinate of accelerometer bias to be used to fix measured specific force and find cross biases introduced by the accelerometer.void
setAccelerometerBiasY
(double accelerometerBiasY) Sets known y-coordinate of accelerometer bias to be used to fix measured specific force and find cross biases introduced by the accelerometer.void
setAccelerometerBiasY
(com.irurueta.units.Acceleration accelerometerBiasY) Sets known y-coordinate of accelerometer bias to be used to fix measured specific force and find cross biases introduced by the accelerometer.void
setAccelerometerBiasZ
(double accelerometerBiasZ) Sets known z-coordinate of accelerometer bias to be used to fix measured specific force and find cross biases introduced by the accelerometer.void
setAccelerometerBiasZ
(com.irurueta.units.Acceleration accelerometerBiasZ) Sets known z-coordinate of accelerometer bias to be used to fix measured specific force and find cross biases introduced by the accelerometer.void
setAccelerometerCrossCouplingErrors
(double accelerometerMxy, double accelerometerMxz, double accelerometerMyx, double accelerometerMyz, double accelerometerMzx, double accelerometerMzy) Sets known accelerometer cross coupling errors to be used to fix measured specific force and find cross biases introduced by the accelerometer.void
setAccelerometerMa
(com.irurueta.algebra.Matrix accelerometerMa) Sets known accelerometer scale factors and cross coupling errors matrix.void
setAccelerometerMxy
(double accelerometerMxy) Sets known accelerometer x-y cross coupling error to be used to fix measured specific force and find cross biases introduced by the accelerometer.void
setAccelerometerMxz
(double accelerometerMxz) Sets known accelerometer x-z cross coupling error to be used to fix measured specific force and find cross biases introduced by the accelerometer.void
setAccelerometerMyx
(double accelerometerMyx) Sets known accelerometer y-x cross coupling error to be used to fix measured specific force and find cross biases introduced by the accelerometer.void
setAccelerometerMyz
(double accelerometerMyz) Sets known accelerometer y-z cross coupling error to be used to fix measured specific force and find cross biases introduced by the accelerometer.void
setAccelerometerMzx
(double accelerometerMzx) Sets known accelerometer z-x cross coupling error to be used to fix measured specific force and find cross biases introduced by the accelerometer.void
setAccelerometerMzy
(double accelerometerMzy) Sets known accelerometer z-y cross coupling error to be used to fix measured specific force and find cross biases introduced by the accelerometer.void
setAccelerometerScalingFactors
(double accelerometerSx, double accelerometerSy, double accelerometerSz) Sets known accelerometer scaling factors to be used to fix measured specific force and find cross biases introduced by the accelerometer.void
setAccelerometerScalingFactorsAndCrossCouplingErrors
(double accelerometerSx, double accelerometerSy, double accelerometerSz, double accelerometerMxy, double accelerometerMxz, double accelerometerMyx, double accelerometerMyz, double accelerometerMzx, double accelerometerMzy) Sets known accelerometer scaling factors and cross coupling errors to be used to fix measured specific force and find cross biases introduced by the accelerometer.void
setAccelerometerSx
(double accelerometerSx) Sets known accelerometer x scaling factor to be used to fix measured specific force and find cross biases introduced by the accelerometer.void
setAccelerometerSy
(double accelerometerSy) Sets known accelerometer y scaling factor to be used to fix measured specific force and find cross biases introduced by the accelerometer.void
setAccelerometerSz
(double accelerometerSz) Sets known accelerometer z scaling factor to be used to fix measured specific force and find cross biases introduced by the accelerometer.void
setBias
(double[] bias) Sets gyroscope known bias to be used to find a solution as an array.void
setBias
(com.irurueta.algebra.Matrix bias) Sets gyroscope known bias as a column matrix.void
setBias
(AngularSpeedTriad bias) Sets known gyroscope bias.void
setBiasCoordinates
(double biasX, double biasY, double biasZ) Sets known bias coordinates of gyroscope expressed in radians per second (rad/s).void
setBiasCoordinates
(com.irurueta.units.AngularSpeed biasX, com.irurueta.units.AngularSpeed biasY, com.irurueta.units.AngularSpeed biasZ) Sets known bias coordinates of gyroscope.void
setBiasX
(double biasX) Sets x-coordinate of gyroscope known bias.void
setBiasX
(com.irurueta.units.AngularSpeed biasX) Sets x-coordinate of gyroscope known bias.void
setBiasY
(double biasY) Sets y-coordinate of gyroscope known bias.void
setBiasY
(com.irurueta.units.AngularSpeed biasY) Sets y-coordinate of gyroscope known bias.void
setBiasZ
(double biasZ) Sets z-coordinate of gyroscope known bias.void
setBiasZ
(com.irurueta.units.AngularSpeed biasZ) Sets z-coordinate of gyroscope known bias.void
setCommonAxisUsed
(boolean commonAxisUsed) Specifies whether z-axis is assumed to be common for accelerometer and gyroscope.void
setGDependentCrossBiasesEstimated
(boolean estimateGDependentCrossBiases) Specifies whether G-dependent cross biases are being estimated or not.void
setInitialCrossCouplingErrors
(double initialMxy, double initialMxz, double initialMyx, double initialMyz, double initialMzx, double initialMzy) Sets initial cross coupling errors of gyroscope.void
setInitialGg
(com.irurueta.algebra.Matrix initialGg) Sets initial G-dependent cross biases introduced on the gyroscope by the specific forces sensed by the accelerometer.void
setInitialMg
(com.irurueta.algebra.Matrix initialMg) Sets initial gyroscope scale factors and cross coupling errors matrix.void
setInitialMxy
(double initialMxy) Sets initial x-y cross coupling error of gyroscope.void
setInitialMxz
(double initialMxz) Sets initial x-z cross coupling error of gyroscope.void
setInitialMyx
(double initialMyx) Sets initial y-x cross coupling error of gyroscope.void
setInitialMyz
(double initialMyz) Sets initial y-z cross coupling error of gyroscope.void
setInitialMzx
(double initialMzx) Sets initial z-x cross coupling error of gyroscope.void
setInitialMzy
(double initialMzy) Sets initial z-y cross coupling error of gyroscope.void
setInitialScalingFactors
(double initialSx, double initialSy, double initialSz) Sets initial scaling factors of gyroscope.void
setInitialScalingFactorsAndCrossCouplingErrors
(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 of gyroscope.void
setInitialSx
(double initialSx) Sets initial x scaling factor of gyroscope.void
setInitialSy
(double initialSy) Sets initial y scaling factor of gyroscope.void
setInitialSz
(double initialSz) Sets initial z scaling factor of gyroscope.private void
Sets input data into Levenberg-Marquardt fitter.void
Sets listener to handle events raised by this estimator.private void
setResult
(com.irurueta.algebra.Matrix m) Makes proper conversion of internal cross-coupling and bias matrices.private void
setResult
(com.irurueta.algebra.Matrix m, com.irurueta.algebra.Matrix g) Makes proper conversion of internal cross-coupling, bias and g-dependent cross bias matrices.void
Sets collection of sequences of timestamped body kinematics measurements taken at a given position where the device moves freely with different orientations.
-
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:
-
DEFAULT_ESTIMATE_G_DEPENDENT_CROSS_BIASES
public static final boolean DEFAULT_ESTIMATE_G_DEPENDENT_CROSS_BIASESIndicates that by default G-dependent cross biases introduced by the accelerometer on the gyroscope are estimated.- See Also:
-
COMMON_Z_AXIS_UNKNOWNS_AND_CROSS_BIASES
public static final int COMMON_Z_AXIS_UNKNOWNS_AND_CROSS_BIASESNumber of unknowns when common z-axis is assumed for both the accelerometer and gyroscope when G-dependent cross biases are being estimated.- See Also:
-
GENERAL_UNKNOWNS_AND_CROSS_BIASES
public static final int GENERAL_UNKNOWNS_AND_CROSS_BIASESNumber of unknowns for the general case when G-dependent cross biases are being estimated.- See Also:
-
COMMON_Z_AXIS_UNKNOWNS
public static final int COMMON_Z_AXIS_UNKNOWNSNumber of unknowns when common z-axis is assumed for both the accelerometer and gyroscope when G-dependent cross biases are not being estimated.- See Also:
-
GENERAL_UNKNOWNS
public static final int GENERAL_UNKNOWNSNumber of unknowns for the general case when G-dependent cross biases are not being estimated.- See Also:
-
MINIMUM_SEQUENCES_COMMON_Z_AXIS_AND_CROSS_BIASES
public static final int MINIMUM_SEQUENCES_COMMON_Z_AXIS_AND_CROSS_BIASESRequired minimum number of sequences when common z-axis is assumed and G-dependent cross biases are being estimated.- See Also:
-
MINIMUM_SEQUENCES_GENERAL_AND_CROSS_BIASES
public static final int MINIMUM_SEQUENCES_GENERAL_AND_CROSS_BIASESRequired minimum number of sequences for the general case and G-dependent cross biases are being estimated.- See Also:
-
MINIMUM_SEQUENCES_COMMON_Z_AXIS
public static final int MINIMUM_SEQUENCES_COMMON_Z_AXISRequired minimum number of sequences when common z-axis is assumed and G-dependent cross biases are being ignored.- See Also:
-
MINIMUM_SEQUENCES_GENERAL
public static final int MINIMUM_SEQUENCES_GENERALRequired minimum number of sequences for the general case and G-dependent cross biases are being ignored.- See Also:
-
fitter
private final com.irurueta.numerical.fitting.LevenbergMarquardtMultiDimensionFitter fitterLevenberg-Marquardt fitter to find a non-linear solution. -
accelerometerBiasX
private double accelerometerBiasXKnown x-coordinate of accelerometer bias to be used to fix measured specific force and find cross biases introduced by the accelerometer. This is expressed in meters per squared second (m/s^2). -
accelerometerBiasY
private double accelerometerBiasYKnown y-coordinate of accelerometer bias to be used to fix measured specific force and find cross biases introduced by the accelerometer. This is expressed in meters per squared second (m/s^2). -
accelerometerBiasZ
private double accelerometerBiasZKnown z-coordinate of accelerometer bias to be used to fix measured specific force and find cross biases introduced by the accelerometer. This is expressed in meters per squared second (m/s^2). -
accelerometerSx
private double accelerometerSxKnown accelerometer x scaling factor to be used to fix measured specific force and find cross biases introduced by the accelerometer. -
accelerometerSy
private double accelerometerSyKnown accelerometer y scaling factor to be used to fix measured specific force and find cross biases introduced by the accelerometer. -
accelerometerSz
private double accelerometerSzKnown accelerometer z scaling factor to be used to fix measured specific force and find cross biases introduced by the accelerometer. -
accelerometerMxy
private double accelerometerMxyKnown accelerometer x-y cross coupling error to be used to fix measured specific force and find cross biases introduced by the accelerometer. -
accelerometerMxz
private double accelerometerMxzKnow accelerometer x-z cross coupling error to be used to fix measured specific force and find cross biases introduced by the accelerometer. -
accelerometerMyx
private double accelerometerMyxKnown accelerometer y-x cross coupling error to be used to fix measured specific force and find cross biases introduced by the accelerometer. -
accelerometerMyz
private double accelerometerMyzKnown accelerometer y-z cross coupling error to be used to fix measured specific force and find cross biases introduced by the accelerometer. -
accelerometerMzx
private double accelerometerMzxKnown accelerometer z-x cross coupling error to be used to fix measured specific force and find cross biases introduced by the accelerometer. -
accelerometerMzy
private double accelerometerMzyKnown accelerometer z-y cross coupling error to be used to fix measured specific force and find cross biases introduced by the accelerometer. -
biasX
private double biasXX-coordinate of gyroscope known bias expressed in radians per second (rad/s). -
biasY
private double biasYY-coordinate of gyroscope known bias expressed in radians per second (rad/s). -
biasZ
private double biasZZ-coordinate of gyroscope known bias expressed in radians per second (rad/s). -
initialSx
private double initialSxInitial gyroscope x scaling factor. -
initialSy
private double initialSyInitial gyroscope y scaling factor. -
initialSz
private double initialSzInitial gyroscope z scaling factor. -
initialMxy
private double initialMxyInitial gyroscope x-y cross coupling error. -
initialMxz
private double initialMxzInitial gyroscope x-z cross coupling error. -
initialMyx
private double initialMyxInitial gyroscope y-x cross coupling error. -
initialMyz
private double initialMyzInitial gyroscope y-z cross coupling error. -
initialMzx
private double initialMzxInitial gyroscope z-x cross coupling error. -
initialMzy
private double initialMzyInitial gyroscope 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. -
sequences
Contains a collection of sequences of timestamped body kinematics measurements taken at a given position where the device moves freely with different orientations. -
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 Mg matrix. -
estimateGDependentCrossBiases
private boolean estimateGDependentCrossBiasesThis flag indicates whether G-dependent cross biases are being estimated or not. When enabled, this adds 9 variables from Gg matrix. -
listener
Listener to handle events raised by this calibrator. -
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. -
estimatedCovariance
private com.irurueta.algebra.Matrix estimatedCovarianceEstimated covariance matrix for estimated parameters. -
estimatedChiSq
private double estimatedChiSqEstimated chi square value. -
estimatedMse
private double estimatedMseEstimated mean square error respect to provided measurements. -
running
private boolean runningIndicates whether calibrator is running. -
accelerationFixer
Acceleration fixer. -
index
private int indexIndex of current point being evaluated. -
q
private final com.irurueta.geometry.Quaternion qHolds integrated rotation of a sequence. -
fixedSequences
Contains a copy of input sequences where fixed body kinematics will be updated. -
measuredSpecificForce
private com.irurueta.algebra.Matrix measuredSpecificForceContains measured specific force on a sample within a sequence expressed as a 3x1 matrix. -
trueSpecificForce
private com.irurueta.algebra.Matrix trueSpecificForceContains fixed specific force for a sample within a sequence using provided accelerometer parameters and expressed as a 3x1 matrix. -
measuredAngularRate
private com.irurueta.algebra.Matrix measuredAngularRateContains measured angular rate on a sample within a sequence expressed as a 3x1 matrix. -
trueAngularRate
private com.irurueta.algebra.Matrix trueAngularRateContains fixed specific force for a sample within a sequence using current parameters being estimated. -
m
private com.irurueta.algebra.Matrix mInternally holds cross-coupling errors during calibration. -
invM
private com.irurueta.algebra.Matrix invMInternally holds inverse of cross-coupling errors during calibration. -
b
private com.irurueta.algebra.Matrix bInternally holds biases during calibration. -
g
private com.irurueta.algebra.Matrix gInternally hold g-dependent cross biases during calibration. -
tmp
private com.irurueta.algebra.Matrix tmpInternally holds angular rate bias due to g-dependent cross biases -
startPoint
private final com.irurueta.geometry.InhomogeneousPoint3D startPointHolds normalized gravity versor at the start of a sequence. This is used to compute rotations of gravity versor during calibration. -
endPoint
private final com.irurueta.geometry.InhomogeneousPoint3D endPointHolds normalized gravity versor at the end of a sequence. This is used to compute rotations of gravity versor during calibration. -
expectedEndPoint
private final com.irurueta.geometry.InhomogeneousPoint3D expectedEndPointContains expected gravity versor obtained from measurements fixed using known accelerometer parameters. This is reused for memory efficiency purposes during calibration. -
point
private double[] pointArray containing normalized gravity versor before (former 3 values) and after (latter 3 values) a given sequence. This is used during calibration.
-
-
Constructor Details
-
KnownBiasEasyGyroscopeCalibrator
public KnownBiasEasyGyroscopeCalibrator()Constructor. -
KnownBiasEasyGyroscopeCalibrator
public KnownBiasEasyGyroscopeCalibrator(List<BodyKinematicsSequence<StandardDeviationTimedBodyKinematics>> sequences, com.irurueta.algebra.Matrix bias, com.irurueta.algebra.Matrix initialMg, com.irurueta.algebra.Matrix initialGg) Constructor.- Parameters:
sequences
- collection of sequences containing timestamped body kinematics measurements.bias
- gyroscope known bias. This must be 3x1 and is expressed in radians per second (rad/s).initialMg
- initial gyroscope scale factors and cross coupling errors matrix. Must be 3x3.initialGg
- initial gyroscope G-dependent cross biases introduced on the gyroscope by the specific forces sensed by the accelerometer. Must be 3x3.- Throws:
IllegalArgumentException
- if any of the provided values does not have proper size.
-
KnownBiasEasyGyroscopeCalibrator
public KnownBiasEasyGyroscopeCalibrator(List<BodyKinematicsSequence<StandardDeviationTimedBodyKinematics>> sequences, double[] bias, com.irurueta.algebra.Matrix initialMg, com.irurueta.algebra.Matrix initialGg) Constructor.- Parameters:
sequences
- collection of sequences containing timestamped body kinematics measurements.bias
- gyroscope known bias. This must have length 3 and is expressed in radians per second (rad/s).initialMg
- initial gyroscope scale factors and cross coupling errors matrix. Must be 3x3.initialGg
- initial gyroscope G-dependent cross biases introduced on the gyroscope by the specific forces sensed by the accelerometer. Must be 3x3.- Throws:
IllegalArgumentException
- if any of the provided values does not have proper size.
-
KnownBiasEasyGyroscopeCalibrator
public KnownBiasEasyGyroscopeCalibrator(List<BodyKinematicsSequence<StandardDeviationTimedBodyKinematics>> sequences, double[] bias, com.irurueta.algebra.Matrix initialMg, com.irurueta.algebra.Matrix initialGg, double[] accelerometerBias, com.irurueta.algebra.Matrix accelerometerMa) Constructor.- Parameters:
sequences
- collection of sequences containing timestamped body kinematics measurements.bias
- gyroscope known bias. This must have length 3 and is expressed in radians per second (rad/s).initialMg
- initial gyroscope scale factors and cross coupling errors matrix. Must be 3x3.initialGg
- initial gyroscope G-dependent cross biases introduced on the gyroscope by the specific forces sensed by the accelerometer. Must be 3x3.accelerometerBias
- known accelerometer bias. This must have length 3 and is expressed in meters per squared second (m/s^2).accelerometerMa
- known accelerometer scale factors and cross coupling matrix. Must be 3x3.- Throws:
IllegalArgumentException
- if any of the provided values does not have proper size.
-
KnownBiasEasyGyroscopeCalibrator
public KnownBiasEasyGyroscopeCalibrator(List<BodyKinematicsSequence<StandardDeviationTimedBodyKinematics>> sequences, com.irurueta.algebra.Matrix bias, com.irurueta.algebra.Matrix initialMg, com.irurueta.algebra.Matrix initialGg, com.irurueta.algebra.Matrix accelerometerBias, com.irurueta.algebra.Matrix accelerometerMa) Constructor.- Parameters:
sequences
- collection of sequences containing timestamped body kinematics measurements.bias
- gyroscope known bias. This must be 3x1 and is expressed in radians per second (rad/s).initialMg
- initial gyroscope scale factors and cross coupling errors matrix. Must be 3x3.initialGg
- initial gyroscope G-dependent cross biases introduced on the gyroscope by the specific forces sensed by the accelerometer. Must be 3x3.accelerometerBias
- known accelerometer bias. This must be 3x1 and is expressed in meters per squared second (m/s^2).accelerometerMa
- known accelerometer scale factors and cross coupling matrix. Must be 3x3.- Throws:
IllegalArgumentException
- if any of the provided values does not have proper size.
-
KnownBiasEasyGyroscopeCalibrator
public KnownBiasEasyGyroscopeCalibrator(List<BodyKinematicsSequence<StandardDeviationTimedBodyKinematics>> sequences, boolean commonAxisUsed, boolean estimateGDependentCrossBiases, com.irurueta.algebra.Matrix bias, com.irurueta.algebra.Matrix initialMg, com.irurueta.algebra.Matrix initialGg) Constructor.- Parameters:
sequences
- collection of sequences containing timestamped body kinematics measurements.commonAxisUsed
- indicates whether z-axis is assumed to be common for accelerometer and gyroscope.estimateGDependentCrossBiases
- true if G-dependent cross biases will be estimated, false otherwise.bias
- gyroscope known bias. This must be 3x1 and is expressed in radians per second (rad/s).initialMg
- initial gyroscope scale factors and cross coupling errors matrix. Must be 3x3.initialGg
- initial gyroscope G-dependent cross biases introduced on the gyroscope by the specific forces sensed by the accelerometer. Must be 3x3.- Throws:
IllegalArgumentException
- if any of the provided values does not have proper size.
-
KnownBiasEasyGyroscopeCalibrator
public KnownBiasEasyGyroscopeCalibrator(List<BodyKinematicsSequence<StandardDeviationTimedBodyKinematics>> sequences, boolean commonAxisUsed, boolean estimateGDependentCrossBiases, double[] bias, com.irurueta.algebra.Matrix initialMg, com.irurueta.algebra.Matrix initialGg) Constructor.- Parameters:
sequences
- collection of sequences containing timestamped body kinematics measurements.commonAxisUsed
- indicates whether z-axis is assumed to be common for accelerometer and gyroscope.estimateGDependentCrossBiases
- true if G-dependent cross biases will be estimated, false otherwise.bias
- gyroscope known bias. This must have length 3 and is expressed in radians per second (rad/s).initialMg
- initial gyroscope scale factors and cross coupling errors matrix. Must be 3x3.initialGg
- initial gyroscope G-dependent cross biases introduced on the gyroscope by the specific forces sensed by the accelerometer. Must be 3x3.- Throws:
IllegalArgumentException
- if any of the provided values does not have proper size.
-
KnownBiasEasyGyroscopeCalibrator
public KnownBiasEasyGyroscopeCalibrator(List<BodyKinematicsSequence<StandardDeviationTimedBodyKinematics>> sequences, boolean commonAxisUsed, boolean estimateGDependentCrossBiases, double[] bias, com.irurueta.algebra.Matrix initialMg, com.irurueta.algebra.Matrix initialGg, double[] accelerometerBias, com.irurueta.algebra.Matrix accelerometerMa) Constructor.- Parameters:
sequences
- collection of sequences containing timestamped body kinematics measurements.commonAxisUsed
- indicates whether z-axis is assumed to be common for accelerometer and gyroscope.estimateGDependentCrossBiases
- true if G-dependent cross biases will be estimated, false otherwise.bias
- gyroscope known bias. This must have length 3 and is expressed in radians per second (rad/s).initialMg
- initial gyroscope scale factors and cross coupling errors matrix. Must be 3x3.initialGg
- initial gyroscope G-dependent cross biases introduced on the gyroscope by the specific forces sensed by the accelerometer. Must be 3x3.accelerometerBias
- known accelerometer bias. This must have length 3 and is expressed in meters per squared second (m/s^2).accelerometerMa
- known accelerometer scale factors and cross coupling matrix. Must be 3x3.- Throws:
IllegalArgumentException
- if any of the provided values does not have proper size.
-
KnownBiasEasyGyroscopeCalibrator
public KnownBiasEasyGyroscopeCalibrator(List<BodyKinematicsSequence<StandardDeviationTimedBodyKinematics>> sequences, boolean commonAxisUsed, boolean estimateGDependentCrossBiases, com.irurueta.algebra.Matrix bias, com.irurueta.algebra.Matrix initialMg, com.irurueta.algebra.Matrix initialGg, com.irurueta.algebra.Matrix accelerometerBias, com.irurueta.algebra.Matrix accelerometerMa) Constructor.- Parameters:
sequences
- collection of sequences containing timestamped body kinematics measurements.commonAxisUsed
- indicates whether z-axis is assumed to be common for accelerometer and gyroscope.estimateGDependentCrossBiases
- true if G-dependent cross biases will be estimated, false otherwise.bias
- gyroscope known bias. This must be 3x1 and is expressed in radians per second (rad/s).initialMg
- initial gyroscope scale factors and cross coupling errors matrix. Must be 3x3.initialGg
- initial gyroscope G-dependent cross biases introduced on the gyroscope by the specific forces sensed by the accelerometer. Must be 3x3.accelerometerBias
- known accelerometer bias. This must have length 3 and is expressed in meters per squared second (m/s^2).accelerometerMa
- known accelerometer scale factors and cross coupling matrix. Must be 3x3.- Throws:
IllegalArgumentException
- if any of the provided values does not have proper size.
-
-
Method Details
-
getAccelerometerBiasX
public double getAccelerometerBiasX()Gets known x-coordinate of accelerometer bias to be used to fix measured specific force and find cross biases introduced by the accelerometer. This is expressed in meters per squared second (m/s^2).- Specified by:
getAccelerometerBiasX
in interfaceAccelerometerDependentGyroscopeCalibrator
- Returns:
- known x-coordinate of accelerometer bias.
-
setAccelerometerBiasX
public void setAccelerometerBiasX(double accelerometerBiasX) throws com.irurueta.navigation.LockedException Sets known x-coordinate of accelerometer bias to be used to fix measured specific force and find cross biases introduced by the accelerometer. This is expressed in meters per squared second (m/s^2).- Specified by:
setAccelerometerBiasX
in interfaceAccelerometerDependentGyroscopeCalibrator
- Parameters:
accelerometerBiasX
- known x-coordinate of accelerometer bias.- Throws:
com.irurueta.navigation.LockedException
- if calibrator is currently running.
-
getAccelerometerBiasY
public double getAccelerometerBiasY()Gets known y-coordinate of accelerometer bias to be used to fix measured specific force and find cross biases introduced by the accelerometer. This is expressed in meters per squared second (m/s^2).- Specified by:
getAccelerometerBiasY
in interfaceAccelerometerDependentGyroscopeCalibrator
- Returns:
- known y-coordinate of accelerometer bias.
-
setAccelerometerBiasY
public void setAccelerometerBiasY(double accelerometerBiasY) throws com.irurueta.navigation.LockedException Sets known y-coordinate of accelerometer bias to be used to fix measured specific force and find cross biases introduced by the accelerometer. This is expressed in meters per squared second (m/s^2).- Specified by:
setAccelerometerBiasY
in interfaceAccelerometerDependentGyroscopeCalibrator
- Parameters:
accelerometerBiasY
- known y-coordinate of accelerometer bias.- Throws:
com.irurueta.navigation.LockedException
- if calibrator is currently running.
-
getAccelerometerBiasZ
public double getAccelerometerBiasZ()Gets known z-coordinate of accelerometer bias to be used to fix measured specific force and find cross biases introduced by the accelerometer. This is expressed in meters per squared second (m/s^2).- Specified by:
getAccelerometerBiasZ
in interfaceAccelerometerDependentGyroscopeCalibrator
- Returns:
- known z-coordinate of accelerometer bias.
-
setAccelerometerBiasZ
public void setAccelerometerBiasZ(double accelerometerBiasZ) throws com.irurueta.navigation.LockedException Sets known z-coordinate of accelerometer bias to be used to fix measured specific force and find cross biases introduced by the accelerometer. This is expressed in meters per squared second (m/s^2).- Specified by:
setAccelerometerBiasZ
in interfaceAccelerometerDependentGyroscopeCalibrator
- Parameters:
accelerometerBiasZ
- known z-coordinate of accelerometer bias.- Throws:
com.irurueta.navigation.LockedException
- if calibrator is currently running.
-
getAccelerometerBiasXAsAcceleration
public com.irurueta.units.Acceleration getAccelerometerBiasXAsAcceleration()Gets known x-coordinate of accelerometer bias to be used to fix measured specific force and find cross biases introduced by the accelerometer.- Specified by:
getAccelerometerBiasXAsAcceleration
in interfaceAccelerometerDependentGyroscopeCalibrator
- Returns:
- known x-coordinate of accelerometer bias.
-
getAccelerometerBiasXAsAcceleration
public void getAccelerometerBiasXAsAcceleration(com.irurueta.units.Acceleration result) Gets known x-coordinate of accelerometer bias to be used to fix measured specific force and find cross biases introduced by the accelerometer.- Specified by:
getAccelerometerBiasXAsAcceleration
in interfaceAccelerometerDependentGyroscopeCalibrator
- Parameters:
result
- instance where result data will be stored.
-
setAccelerometerBiasX
public void setAccelerometerBiasX(com.irurueta.units.Acceleration accelerometerBiasX) throws com.irurueta.navigation.LockedException Sets known x-coordinate of accelerometer bias to be used to fix measured specific force and find cross biases introduced by the accelerometer.- Specified by:
setAccelerometerBiasX
in interfaceAccelerometerDependentGyroscopeCalibrator
- Parameters:
accelerometerBiasX
- x-coordinate of accelerometer bias.- Throws:
com.irurueta.navigation.LockedException
- if calibrator is currently running.
-
getAccelerometerBiasYAsAcceleration
public com.irurueta.units.Acceleration getAccelerometerBiasYAsAcceleration()Gets known y-coordinate of accelerometer bias to be used to fix measured specific force and find cross biases introduced by the accelerometer.- Specified by:
getAccelerometerBiasYAsAcceleration
in interfaceAccelerometerDependentGyroscopeCalibrator
- Returns:
- known y-coordinate of accelerometer bias.
-
getAccelerometerBiasYAsAcceleration
public void getAccelerometerBiasYAsAcceleration(com.irurueta.units.Acceleration result) Gets known y-coordinate of accelerometer bias to be used to fix measured specific force and find cross biases introduced by the accelerometer.- Specified by:
getAccelerometerBiasYAsAcceleration
in interfaceAccelerometerDependentGyroscopeCalibrator
- Parameters:
result
- instance where result data will be stored.
-
setAccelerometerBiasY
public void setAccelerometerBiasY(com.irurueta.units.Acceleration accelerometerBiasY) throws com.irurueta.navigation.LockedException Sets known y-coordinate of accelerometer bias to be used to fix measured specific force and find cross biases introduced by the accelerometer.- Specified by:
setAccelerometerBiasY
in interfaceAccelerometerDependentGyroscopeCalibrator
- Parameters:
accelerometerBiasY
- y-coordinate of accelerometer bias.- Throws:
com.irurueta.navigation.LockedException
- if calibrator is currently running.
-
getAccelerometerBiasZAsAcceleration
public com.irurueta.units.Acceleration getAccelerometerBiasZAsAcceleration()Gets known z-coordinate of accelerometer bias to be used to fix measured specific force and find cross biases introduced by the accelerometer.- Specified by:
getAccelerometerBiasZAsAcceleration
in interfaceAccelerometerDependentGyroscopeCalibrator
- Returns:
- known z-coordinate of accelerometer bias.
-
getAccelerometerBiasZAsAcceleration
public void getAccelerometerBiasZAsAcceleration(com.irurueta.units.Acceleration result) Gets known z-coordinate of accelerometer bias to be used to fix measured specific force and find cross biases introduced by the accelerometer.- Specified by:
getAccelerometerBiasZAsAcceleration
in interfaceAccelerometerDependentGyroscopeCalibrator
- Parameters:
result
- instance where result data will be stored.
-
setAccelerometerBiasZ
public void setAccelerometerBiasZ(com.irurueta.units.Acceleration accelerometerBiasZ) throws com.irurueta.navigation.LockedException Sets known z-coordinate of accelerometer bias to be used to fix measured specific force and find cross biases introduced by the accelerometer.- Specified by:
setAccelerometerBiasZ
in interfaceAccelerometerDependentGyroscopeCalibrator
- Parameters:
accelerometerBiasZ
- z-coordinate of accelerometer bias.- Throws:
com.irurueta.navigation.LockedException
- if calibrator is currently running.
-
setAccelerometerBias
public void setAccelerometerBias(double accelerometerBiasX, double accelerometerBiasY, double accelerometerBiasZ) throws com.irurueta.navigation.LockedException Sets known accelerometer bias to be used to fix measured specific force and find cross biases introduced by the accelerometer. This is expressed in meters per squared second (m/s^2).- Specified by:
setAccelerometerBias
in interfaceAccelerometerDependentGyroscopeCalibrator
- Parameters:
accelerometerBiasX
- x-coordinate of accelerometer bias.accelerometerBiasY
- y-coordinate of accelerometer bias.accelerometerBiasZ
- z-coordinate of accelerometer bias.- Throws:
com.irurueta.navigation.LockedException
- if calibrator is currently running.
-
setAccelerometerBias
public void setAccelerometerBias(com.irurueta.units.Acceleration accelerometerBiasX, com.irurueta.units.Acceleration accelerometerBiasY, com.irurueta.units.Acceleration accelerometerBiasZ) throws com.irurueta.navigation.LockedException Sets known accelerometer bias to be used to fix measured specific force and find cross biases introduced by the accelerometer.- Specified by:
setAccelerometerBias
in interfaceAccelerometerDependentGyroscopeCalibrator
- Parameters:
accelerometerBiasX
- x-coordinate of accelerometer bias.accelerometerBiasY
- y-coordinate of accelerometer bias.accelerometerBiasZ
- z-coordinate of accelerometer bias.- Throws:
com.irurueta.navigation.LockedException
- if calibrator is currently running.
-
getAccelerometerBias
public double[] getAccelerometerBias()Gets known accelerometer bias to be used to fix measured specific force and find cross biases introduced by the accelerometer. This is expressed in meters per squared second (m/s^2).- Specified by:
getAccelerometerBias
in interfaceAccelerometerDependentGyroscopeCalibrator
- Returns:
- known accelerometer bias.
-
getAccelerometerBias
public void getAccelerometerBias(double[] result) Gets known accelerometer bias to be used to fix measured specific force and find cross biases introduced by the accelerometer. This is expressed in meters per squared second (m/s^2).- Specified by:
getAccelerometerBias
in interfaceAccelerometerDependentGyroscopeCalibrator
- Parameters:
result
- instance where result data will be copied to.- Throws:
IllegalArgumentException
- if provided array does not have length 3.
-
setAccelerometerBias
public void setAccelerometerBias(double[] accelerometerBias) throws com.irurueta.navigation.LockedException Sets known accelerometer bias to be used to fix measured specific force and find cross biases introduced by the accelerometer. This is expressed in meters per squared second (m/s^2).- Specified by:
setAccelerometerBias
in interfaceAccelerometerDependentGyroscopeCalibrator
- Parameters:
accelerometerBias
- known accelerometer bias.- Throws:
com.irurueta.navigation.LockedException
- if calibrator is currently running.IllegalArgumentException
- if provided array does not have length 3.
-
getAccelerometerBiasAsMatrix
public com.irurueta.algebra.Matrix getAccelerometerBiasAsMatrix()Gets known accelerometer bias to be used to fix measured specific force and find cross biases introduced by the accelerometer. This is expressed in meters per squared second (m/s^2).- Specified by:
getAccelerometerBiasAsMatrix
in interfaceAccelerometerDependentGyroscopeCalibrator
- Returns:
- known accelerometer bias.
-
getAccelerometerBiasAsMatrix
public void getAccelerometerBiasAsMatrix(com.irurueta.algebra.Matrix result) Gets known accelerometer bias to be used to fix measured specific force and find cross biases introduced by the accelerometer. This is expressed in meters per squared second (m/s^2).- Specified by:
getAccelerometerBiasAsMatrix
in interfaceAccelerometerDependentGyroscopeCalibrator
- Parameters:
result
- instance where result data will be copied to.- Throws:
IllegalArgumentException
- if provided matrix is not 3x1.
-
setAccelerometerBias
public void setAccelerometerBias(com.irurueta.algebra.Matrix accelerometerBias) throws com.irurueta.navigation.LockedException Sets known accelerometer bias to be used to fix measured specific force and find cross biases introduced by the accelerometer. This is expressed in meters per squared second (m/s^2).- Specified by:
setAccelerometerBias
in interfaceAccelerometerDependentGyroscopeCalibrator
- Parameters:
accelerometerBias
- known accelerometer bias. Must be 3x1.- Throws:
com.irurueta.navigation.LockedException
- if calibrator is currently running.IllegalArgumentException
- if provided matrix is not 3x1.
-
getAccelerometerSx
public double getAccelerometerSx()Gets known accelerometer x scaling factor to be used to fix measured specific force and find cross biases introduced by the accelerometer.- Specified by:
getAccelerometerSx
in interfaceAccelerometerDependentGyroscopeCalibrator
- Returns:
- known accelerometer x scaling factor.
-
setAccelerometerSx
public void setAccelerometerSx(double accelerometerSx) throws com.irurueta.navigation.LockedException Sets known accelerometer x scaling factor to be used to fix measured specific force and find cross biases introduced by the accelerometer.- Specified by:
setAccelerometerSx
in interfaceAccelerometerDependentGyroscopeCalibrator
- Parameters:
accelerometerSx
- known accelerometer x scaling factor.- Throws:
com.irurueta.navigation.LockedException
- if calibrator is currently running.
-
getAccelerometerSy
public double getAccelerometerSy()Gets known accelerometer y scaling factor to be used to fix measured specific force and find cross biases introduced by the accelerometer.- Specified by:
getAccelerometerSy
in interfaceAccelerometerDependentGyroscopeCalibrator
- Returns:
- known accelerometer y scaling factor.
-
setAccelerometerSy
public void setAccelerometerSy(double accelerometerSy) throws com.irurueta.navigation.LockedException Sets known accelerometer y scaling factor to be used to fix measured specific force and find cross biases introduced by the accelerometer.- Specified by:
setAccelerometerSy
in interfaceAccelerometerDependentGyroscopeCalibrator
- Parameters:
accelerometerSy
- known accelerometer y scaling factor.- Throws:
com.irurueta.navigation.LockedException
- if calibrator is currently running.
-
getAccelerometerSz
public double getAccelerometerSz()Gets known accelerometer z scaling factor to be used to fix measured specific force and find cross biases introduced by the accelerometer.- Specified by:
getAccelerometerSz
in interfaceAccelerometerDependentGyroscopeCalibrator
- Returns:
- known accelerometer z scaling factor.
-
setAccelerometerSz
public void setAccelerometerSz(double accelerometerSz) throws com.irurueta.navigation.LockedException Sets known accelerometer z scaling factor to be used to fix measured specific force and find cross biases introduced by the accelerometer.- Specified by:
setAccelerometerSz
in interfaceAccelerometerDependentGyroscopeCalibrator
- Parameters:
accelerometerSz
- known accelerometer z scaling factor.- Throws:
com.irurueta.navigation.LockedException
- if calibrator is currently running.
-
getAccelerometerMxy
public double getAccelerometerMxy()Gets known accelerometer x-y cross coupling error to be used to fix measured specific force and find cross biases introduced by the accelerometer.- Specified by:
getAccelerometerMxy
in interfaceAccelerometerDependentGyroscopeCalibrator
- Returns:
- known accelerometer x-y cross coupling error.
-
setAccelerometerMxy
public void setAccelerometerMxy(double accelerometerMxy) throws com.irurueta.navigation.LockedException Sets known accelerometer x-y cross coupling error to be used to fix measured specific force and find cross biases introduced by the accelerometer.- Specified by:
setAccelerometerMxy
in interfaceAccelerometerDependentGyroscopeCalibrator
- Parameters:
accelerometerMxy
- known accelerometer x-y cross coupling error.- Throws:
com.irurueta.navigation.LockedException
- if calibrator is currently running.
-
getAccelerometerMxz
public double getAccelerometerMxz()Gets known accelerometer x-z cross coupling error to be used to fix measured specific force and find cross biases introduced by the accelerometer.- Specified by:
getAccelerometerMxz
in interfaceAccelerometerDependentGyroscopeCalibrator
- Returns:
- known accelerometer x-z cross coupling error.
-
setAccelerometerMxz
public void setAccelerometerMxz(double accelerometerMxz) throws com.irurueta.navigation.LockedException Sets known accelerometer x-z cross coupling error to be used to fix measured specific force and find cross biases introduced by the accelerometer.- Specified by:
setAccelerometerMxz
in interfaceAccelerometerDependentGyroscopeCalibrator
- Parameters:
accelerometerMxz
- known accelerometer x-z cross coupling error.- Throws:
com.irurueta.navigation.LockedException
- if calibrator is currently running.
-
getAccelerometerMyx
public double getAccelerometerMyx()Gets known accelerometer y-x cross coupling error to be used to fix measured specific force and find cross biases introduced by the accelerometer.- Specified by:
getAccelerometerMyx
in interfaceAccelerometerDependentGyroscopeCalibrator
- Returns:
- known accelerometer y-x cross coupling error.
-
setAccelerometerMyx
public void setAccelerometerMyx(double accelerometerMyx) throws com.irurueta.navigation.LockedException Sets known accelerometer y-x cross coupling error to be used to fix measured specific force and find cross biases introduced by the accelerometer.- Specified by:
setAccelerometerMyx
in interfaceAccelerometerDependentGyroscopeCalibrator
- Parameters:
accelerometerMyx
- known accelerometer y-x cross coupling error.- Throws:
com.irurueta.navigation.LockedException
- if calibrator is currently running.
-
getAccelerometerMyz
public double getAccelerometerMyz()Gets known accelerometer y-z cross coupling error to be used to fix measured specific force and find cross biases introduced by the accelerometer.- Specified by:
getAccelerometerMyz
in interfaceAccelerometerDependentGyroscopeCalibrator
- Returns:
- known accelerometer y-z cross coupling error.
-
setAccelerometerMyz
public void setAccelerometerMyz(double accelerometerMyz) throws com.irurueta.navigation.LockedException Sets known accelerometer y-z cross coupling error to be used to fix measured specific force and find cross biases introduced by the accelerometer.- Specified by:
setAccelerometerMyz
in interfaceAccelerometerDependentGyroscopeCalibrator
- Parameters:
accelerometerMyz
- known accelerometer y-z cross coupling error.- Throws:
com.irurueta.navigation.LockedException
- if calibrator is currently running.
-
getAccelerometerMzx
public double getAccelerometerMzx()Gets known accelerometer z-x cross coupling error to be used to fix measured specific force and find cross biases introduced by the accelerometer.- Specified by:
getAccelerometerMzx
in interfaceAccelerometerDependentGyroscopeCalibrator
- Returns:
- known accelerometer z-x cross coupling error.
-
setAccelerometerMzx
public void setAccelerometerMzx(double accelerometerMzx) throws com.irurueta.navigation.LockedException Sets known accelerometer z-x cross coupling error to be used to fix measured specific force and find cross biases introduced by the accelerometer.- Specified by:
setAccelerometerMzx
in interfaceAccelerometerDependentGyroscopeCalibrator
- Parameters:
accelerometerMzx
- known accelerometer z-x cross coupling error.- Throws:
com.irurueta.navigation.LockedException
- if calibrator is currently running.
-
getAccelerometerMzy
public double getAccelerometerMzy()Gets known accelerometer z-y cross coupling error to be used to fix measured specific force and find cross biases introduced by the accelerometer.- Specified by:
getAccelerometerMzy
in interfaceAccelerometerDependentGyroscopeCalibrator
- Returns:
- known accelerometer z-y cross coupling error.
-
setAccelerometerMzy
public void setAccelerometerMzy(double accelerometerMzy) throws com.irurueta.navigation.LockedException Sets known accelerometer z-y cross coupling error to be used to fix measured specific force and find cross biases introduced by the accelerometer.- Specified by:
setAccelerometerMzy
in interfaceAccelerometerDependentGyroscopeCalibrator
- Parameters:
accelerometerMzy
- known accelerometer z-y cross coupling error.- Throws:
com.irurueta.navigation.LockedException
- if calibrator is currently running.
-
setAccelerometerScalingFactors
public void setAccelerometerScalingFactors(double accelerometerSx, double accelerometerSy, double accelerometerSz) throws com.irurueta.navigation.LockedException Sets known accelerometer scaling factors to be used to fix measured specific force and find cross biases introduced by the accelerometer.- Specified by:
setAccelerometerScalingFactors
in interfaceAccelerometerDependentGyroscopeCalibrator
- Parameters:
accelerometerSx
- known accelerometer x scaling factor.accelerometerSy
- known accelerometer y scaling factor.accelerometerSz
- known accelerometer z scaling factor.- Throws:
com.irurueta.navigation.LockedException
- if calibrator is currently running.
-
setAccelerometerCrossCouplingErrors
public void setAccelerometerCrossCouplingErrors(double accelerometerMxy, double accelerometerMxz, double accelerometerMyx, double accelerometerMyz, double accelerometerMzx, double accelerometerMzy) throws com.irurueta.navigation.LockedException Sets known accelerometer cross coupling errors to be used to fix measured specific force and find cross biases introduced by the accelerometer.- Specified by:
setAccelerometerCrossCouplingErrors
in interfaceAccelerometerDependentGyroscopeCalibrator
- Parameters:
accelerometerMxy
- known accelerometer x-y cross coupling error.accelerometerMxz
- known accelerometer x-z cross coupling error.accelerometerMyx
- known accelerometer y-x cross coupling error.accelerometerMyz
- known accelerometer y-z cross coupling error.accelerometerMzx
- known accelerometer z-x cross coupling error.accelerometerMzy
- known accelerometer z-y cross coupling error.- Throws:
com.irurueta.navigation.LockedException
- if calibrator is currently running.
-
setAccelerometerScalingFactorsAndCrossCouplingErrors
public void setAccelerometerScalingFactorsAndCrossCouplingErrors(double accelerometerSx, double accelerometerSy, double accelerometerSz, double accelerometerMxy, double accelerometerMxz, double accelerometerMyx, double accelerometerMyz, double accelerometerMzx, double accelerometerMzy) throws com.irurueta.navigation.LockedException Sets known accelerometer scaling factors and cross coupling errors to be used to fix measured specific force and find cross biases introduced by the accelerometer.- Specified by:
setAccelerometerScalingFactorsAndCrossCouplingErrors
in interfaceAccelerometerDependentGyroscopeCalibrator
- Parameters:
accelerometerSx
- known accelerometer x scaling factor.accelerometerSy
- known accelerometer y scaling factor.accelerometerSz
- known accelerometer z scaling factor.accelerometerMxy
- known accelerometer x-y cross coupling error.accelerometerMxz
- known accelerometer x-z cross coupling error.accelerometerMyx
- known accelerometer y-x cross coupling error.accelerometerMyz
- known accelerometer y-z cross coupling error.accelerometerMzx
- known accelerometer z-x cross coupling error.accelerometerMzy
- known accelerometer z-y cross coupling error.- Throws:
com.irurueta.navigation.LockedException
- if calibrator is currently running.
-
getAccelerometerMa
public com.irurueta.algebra.Matrix getAccelerometerMa()Gets known accelerometer scale factors and cross coupling errors matrix.- Specified by:
getAccelerometerMa
in interfaceAccelerometerDependentGyroscopeCalibrator
- Returns:
- known accelerometer scale factors and cross coupling errors matrix.
-
getAccelerometerMa
public void getAccelerometerMa(com.irurueta.algebra.Matrix result) Gets known accelerometer scale factors and cross coupling errors matrix.- Specified by:
getAccelerometerMa
in interfaceAccelerometerDependentGyroscopeCalibrator
- Parameters:
result
- instance where data will be stored.- Throws:
IllegalArgumentException
- if provided matrix is not 3x3.
-
setAccelerometerMa
public void setAccelerometerMa(com.irurueta.algebra.Matrix accelerometerMa) throws com.irurueta.navigation.LockedException Sets known accelerometer scale factors and cross coupling errors matrix.- Specified by:
setAccelerometerMa
in interfaceAccelerometerDependentGyroscopeCalibrator
- Parameters:
accelerometerMa
- known accelerometer scale factors and cross coupling errors matrix. Must be 3x3.- Throws:
com.irurueta.navigation.LockedException
- if calibrator is currently running.IllegalArgumentException
- if provided matrix is not 3x3.
-
getBiasX
public double getBiasX()Gets x-coordinate of gyroscope known bias. This is expressed in radians per second (rad/s).- Specified by:
getBiasX
in interfaceKnownBiasGyroscopeCalibrator
- Returns:
- x-coordinate of gyroscope known bias.
-
setBiasX
public void setBiasX(double biasX) throws com.irurueta.navigation.LockedException Sets x-coordinate of gyroscope known bias. This is expressed in radians per second (rad/s).- Specified by:
setBiasX
in interfaceKnownBiasGyroscopeCalibrator
- Parameters:
biasX
- x-coordinate of gyroscope known bias.- Throws:
com.irurueta.navigation.LockedException
- if calibrator is currently running.
-
getBiasY
public double getBiasY()Gets y-coordinate of gyroscope known bias. This is expressed in radians per second (rad/s).- Specified by:
getBiasY
in interfaceKnownBiasGyroscopeCalibrator
- Returns:
- y-coordinate of gyroscope known bias.
-
setBiasY
public void setBiasY(double biasY) throws com.irurueta.navigation.LockedException Sets y-coordinate of gyroscope known bias. This is expressed in radians per second (rad/s).- Specified by:
setBiasY
in interfaceKnownBiasGyroscopeCalibrator
- Parameters:
biasY
- y-coordinate of gyroscope known bias.- Throws:
com.irurueta.navigation.LockedException
- if calibrator is currently running.
-
getBiasZ
public double getBiasZ()Gets z-coordinate of gyroscope known bias. This is expressed in radians per second (rad/s).- Specified by:
getBiasZ
in interfaceKnownBiasGyroscopeCalibrator
- Returns:
- z-coordinate of gyroscope known bias.
-
setBiasZ
public void setBiasZ(double biasZ) throws com.irurueta.navigation.LockedException Sets z-coordinate of gyroscope known bias. This is expressed in radians per second (rad/s).- Specified by:
setBiasZ
in interfaceKnownBiasGyroscopeCalibrator
- Parameters:
biasZ
- z-coordinate of gyroscope bias.- Throws:
com.irurueta.navigation.LockedException
- if calibrator is currently running.
-
getBiasAngularSpeedX
public com.irurueta.units.AngularSpeed getBiasAngularSpeedX()Gets x-coordinate of gyroscope known bias.- Specified by:
getBiasAngularSpeedX
in interfaceKnownBiasGyroscopeCalibrator
- Returns:
- x-coordinate of gyroscope known bias.
-
getBiasAngularSpeedX
public void getBiasAngularSpeedX(com.irurueta.units.AngularSpeed result) Gets x-coordinate of gyroscope known bias.- Specified by:
getBiasAngularSpeedX
in interfaceKnownBiasGyroscopeCalibrator
- Parameters:
result
- instance where result data will be stored.
-
setBiasX
public void setBiasX(com.irurueta.units.AngularSpeed biasX) throws com.irurueta.navigation.LockedException Sets x-coordinate of gyroscope known bias.- Specified by:
setBiasX
in interfaceKnownBiasGyroscopeCalibrator
- Parameters:
biasX
- x-coordinate of gyroscope known bias.- Throws:
com.irurueta.navigation.LockedException
- if calibrator is currently running.
-
getBiasAngularSpeedY
public com.irurueta.units.AngularSpeed getBiasAngularSpeedY()Gets y-coordinate of gyroscope known bias.- Specified by:
getBiasAngularSpeedY
in interfaceKnownBiasGyroscopeCalibrator
- Returns:
- y-coordinate of gyroscope known bias.
-
getBiasAngularSpeedY
public void getBiasAngularSpeedY(com.irurueta.units.AngularSpeed result) Gets y-coordinate of gyroscope known bias.- Specified by:
getBiasAngularSpeedY
in interfaceKnownBiasGyroscopeCalibrator
- Parameters:
result
- instance where result data will be stored.
-
setBiasY
public void setBiasY(com.irurueta.units.AngularSpeed biasY) throws com.irurueta.navigation.LockedException Sets y-coordinate of gyroscope known bias.- Specified by:
setBiasY
in interfaceKnownBiasGyroscopeCalibrator
- Parameters:
biasY
- y-coordinate of gyroscope known bias.- Throws:
com.irurueta.navigation.LockedException
- if calibrator is currently running.
-
getBiasAngularSpeedZ
public com.irurueta.units.AngularSpeed getBiasAngularSpeedZ()Gets z-coordinate of gyroscope known bias.- Specified by:
getBiasAngularSpeedZ
in interfaceKnownBiasGyroscopeCalibrator
- Returns:
- initial z-coordinate of gyroscope known bias.
-
getBiasAngularSpeedZ
public void getBiasAngularSpeedZ(com.irurueta.units.AngularSpeed result) Gets z-coordinate of gyroscope known bias.- Specified by:
getBiasAngularSpeedZ
in interfaceKnownBiasGyroscopeCalibrator
- Parameters:
result
- instance where result data will be stored.
-
setBiasZ
public void setBiasZ(com.irurueta.units.AngularSpeed biasZ) throws com.irurueta.navigation.LockedException Sets z-coordinate of gyroscope known bias.- Specified by:
setBiasZ
in interfaceKnownBiasGyroscopeCalibrator
- Parameters:
biasZ
- z-coordinate of gyroscope known bias.- Throws:
com.irurueta.navigation.LockedException
- if calibrator is currently running.
-
setBiasCoordinates
public void setBiasCoordinates(double biasX, double biasY, double biasZ) throws com.irurueta.navigation.LockedException Sets known bias coordinates of gyroscope expressed in radians per second (rad/s).- Specified by:
setBiasCoordinates
in interfaceKnownBiasGyroscopeCalibrator
- Parameters:
biasX
- x-coordinate of gyroscope known bias.biasY
- y-coordinate of gyroscope known bias.biasZ
- z-coordinate of gyroscope known bias.- Throws:
com.irurueta.navigation.LockedException
- if calibrator is currently running.
-
setBiasCoordinates
public void setBiasCoordinates(com.irurueta.units.AngularSpeed biasX, com.irurueta.units.AngularSpeed biasY, com.irurueta.units.AngularSpeed biasZ) throws com.irurueta.navigation.LockedException Sets known bias coordinates of gyroscope.- Specified by:
setBiasCoordinates
in interfaceKnownBiasGyroscopeCalibrator
- Parameters:
biasX
- x-coordinate of gyroscope known bias.biasY
- y-coordinate of gyroscope known bias.biasZ
- z-coordinate of gyroscope known bias.- Throws:
com.irurueta.navigation.LockedException
- if calibrator is currently running.
-
getBiasAsTriad
Gets known gyroscope bias.- Returns:
- known gyroscope bias.
-
getInitialSx
public double getInitialSx()Gets initial x scaling factor of gyroscope.- Specified by:
getInitialSx
in interfaceGyroscopeNonLinearCalibrator
- Returns:
- initial x scaling factor of gyroscope.
-
setInitialSx
public void setInitialSx(double initialSx) throws com.irurueta.navigation.LockedException Sets initial x scaling factor of gyroscope.- Specified by:
setInitialSx
in interfaceGyroscopeNonLinearCalibrator
- Parameters:
initialSx
- initial x scaling factor of gyroscope.- Throws:
com.irurueta.navigation.LockedException
- if calibrator is currently running.
-
getInitialSy
public double getInitialSy()Gets initial y scaling factor of gyroscope.- Specified by:
getInitialSy
in interfaceGyroscopeNonLinearCalibrator
- Returns:
- initial y scaling factor of gyroscope.
-
setInitialSy
public void setInitialSy(double initialSy) throws com.irurueta.navigation.LockedException Sets initial y scaling factor of gyroscope.- Specified by:
setInitialSy
in interfaceGyroscopeNonLinearCalibrator
- Parameters:
initialSy
- initial y scaling factor of gyroscope.- Throws:
com.irurueta.navigation.LockedException
- if calibrator is currently running.
-
getInitialSz
public double getInitialSz()Gets initial z scaling factor of gyroscope.- Specified by:
getInitialSz
in interfaceGyroscopeNonLinearCalibrator
- Returns:
- initial z scaling factor of gyroscope.
-
setInitialSz
public void setInitialSz(double initialSz) throws com.irurueta.navigation.LockedException Sets initial z scaling factor of gyroscope.- Specified by:
setInitialSz
in interfaceGyroscopeNonLinearCalibrator
- Parameters:
initialSz
- initial z scaling factor of gyroscope.- Throws:
com.irurueta.navigation.LockedException
- if calibrator is currently running.
-
getInitialMxy
public double getInitialMxy()Gets initial x-y cross coupling error of gyroscope.- Specified by:
getInitialMxy
in interfaceGyroscopeNonLinearCalibrator
- Returns:
- initial x-y cross coupling error of gyroscope.
-
setInitialMxy
public void setInitialMxy(double initialMxy) throws com.irurueta.navigation.LockedException Sets initial x-y cross coupling error of gyroscope.- Specified by:
setInitialMxy
in interfaceGyroscopeNonLinearCalibrator
- Parameters:
initialMxy
- initial x-y cross coupling error of gyroscope.- Throws:
com.irurueta.navigation.LockedException
- if calibrator is currently running.
-
getInitialMxz
public double getInitialMxz()Gets initial x-z cross coupling error of gyroscope.- Specified by:
getInitialMxz
in interfaceGyroscopeNonLinearCalibrator
- Returns:
- initial x-z cross coupling error of gyroscope.
-
setInitialMxz
public void setInitialMxz(double initialMxz) throws com.irurueta.navigation.LockedException Sets initial x-z cross coupling error of gyroscope.- Specified by:
setInitialMxz
in interfaceGyroscopeNonLinearCalibrator
- Parameters:
initialMxz
- initial x-z cross coupling error of gyroscope.- Throws:
com.irurueta.navigation.LockedException
- if calibrator is currently running.
-
getInitialMyx
public double getInitialMyx()Gets initial y-x cross coupling error of gyroscope.- Specified by:
getInitialMyx
in interfaceGyroscopeNonLinearCalibrator
- Returns:
- initial y-x cross coupling error of gyroscope.
-
setInitialMyx
public void setInitialMyx(double initialMyx) throws com.irurueta.navigation.LockedException Sets initial y-x cross coupling error of gyroscope.- Specified by:
setInitialMyx
in interfaceGyroscopeNonLinearCalibrator
- Parameters:
initialMyx
- initial y-x cross coupling error of gyroscope.- Throws:
com.irurueta.navigation.LockedException
- if calibrator is currently running.
-
getInitialMyz
public double getInitialMyz()Gets initial y-z cross coupling error of gyroscope.- Specified by:
getInitialMyz
in interfaceGyroscopeNonLinearCalibrator
- Returns:
- initial y-z cross coupling error of gyroscope.
-
setInitialMyz
public void setInitialMyz(double initialMyz) throws com.irurueta.navigation.LockedException Sets initial y-z cross coupling error of gyroscope.- Specified by:
setInitialMyz
in interfaceGyroscopeNonLinearCalibrator
- Parameters:
initialMyz
- initial y-z cross coupling error of gyroscope.- Throws:
com.irurueta.navigation.LockedException
- if calibrator is currently running.
-
getInitialMzx
public double getInitialMzx()Gets initial z-x cross coupling error of gyroscope.- Specified by:
getInitialMzx
in interfaceGyroscopeNonLinearCalibrator
- Returns:
- initial z-x cross coupling error of gyroscope.
-
setInitialMzx
public void setInitialMzx(double initialMzx) throws com.irurueta.navigation.LockedException Sets initial z-x cross coupling error of gyroscope.- Specified by:
setInitialMzx
in interfaceGyroscopeNonLinearCalibrator
- Parameters:
initialMzx
- initial z-x cross coupling error of gyroscope.- Throws:
com.irurueta.navigation.LockedException
- if calibrator is currently running.
-
getInitialMzy
public double getInitialMzy()Gets initial z-y cross coupling error of gyroscope.- Specified by:
getInitialMzy
in interfaceGyroscopeNonLinearCalibrator
- Returns:
- initial z-y cross coupling error of gyroscope.
-
setInitialMzy
public void setInitialMzy(double initialMzy) throws com.irurueta.navigation.LockedException Sets initial z-y cross coupling error of gyroscope.- Specified by:
setInitialMzy
in interfaceGyroscopeNonLinearCalibrator
- Parameters:
initialMzy
- initial z-y cross coupling error of gyroscope.- 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 of gyroscope.- Specified by:
setInitialScalingFactors
in interfaceGyroscopeNonLinearCalibrator
- Parameters:
initialSx
- initial x scaling factor of gyroscope.initialSy
- initial y scaling factor of gyroscope.initialSz
- initial z scaling factor of gyroscope.- 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 of gyroscope.- Specified by:
setInitialCrossCouplingErrors
in interfaceGyroscopeNonLinearCalibrator
- Parameters:
initialMxy
- initial x-y cross coupling error of gyroscope.initialMxz
- initial x-z cross coupling error of gyroscope.initialMyx
- initial y-x cross coupling error of gyroscope.initialMyz
- initial y-z cross coupling error of gyroscope.initialMzx
- initial z-x cross coupling error of gyroscope.initialMzy
- initial z-y cross coupling error of gyroscope.- 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 of gyroscope.- Specified by:
setInitialScalingFactorsAndCrossCouplingErrors
in interfaceGyroscopeNonLinearCalibrator
- Parameters:
initialSx
- initial x scaling factor of gyroscope.initialSy
- initial y scaling factor of gyroscope.initialSz
- initial z scaling factor of gyroscope.initialMxy
- initial x-y cross coupling error of gyroscope.initialMxz
- initial x-z cross coupling error of gyroscope.initialMyx
- initial y-x cross coupling error of gyroscope.initialMyz
- initial y-z cross coupling error of gyroscope.initialMzx
- initial z-x cross coupling error of gyroscope.initialMzy
- initial z-y cross coupling error of gyroscope.- Throws:
com.irurueta.navigation.LockedException
- if calibrator is currently running.
-
getBias
public double[] getBias()Gets gyroscope known bias as an array. Array values are expressed in radians per second (rad/s).- Specified by:
getBias
in interfaceKnownBiasGyroscopeCalibrator
- Returns:
- array containing coordinates of gyroscope known bias.
-
getBias
public void getBias(double[] result) Gets gyroscope known bias as an array. Array values are expressed in radians per second (rad/s).- Specified by:
getBias
in interfaceKnownBiasGyroscopeCalibrator
- Parameters:
result
- instance where result data will be copied to.- Throws:
IllegalArgumentException
- if provided array does not have length 3.
-
setBias
public void setBias(double[] bias) throws com.irurueta.navigation.LockedException Sets gyroscope known bias to be used to find a solution as an array. Array values are expressed in radians per second (rad/s).- Specified by:
setBias
in interfaceKnownBiasGyroscopeCalibrator
- Parameters:
bias
- known bias.- Throws:
com.irurueta.navigation.LockedException
- if calibrator is currently running.IllegalArgumentException
- if provided array does not have length 3.
-
getBiasAsMatrix
public com.irurueta.algebra.Matrix getBiasAsMatrix()Gets gyroscope known bias as a column matrix. Matrix values are expressed in radians per second (rad/s).- Specified by:
getBiasAsMatrix
in interfaceKnownBiasGyroscopeCalibrator
- Returns:
- initial gyroscope bias to be used to find a solution as a column matrix.
-
getBiasAsMatrix
public void getBiasAsMatrix(com.irurueta.algebra.Matrix result) Gets gyroscope known bias as a column matrix. Matrix values are expressed in radians per second (rad/s).- Specified by:
getBiasAsMatrix
in interfaceKnownBiasGyroscopeCalibrator
- Parameters:
result
- instance where result data will be copied to.- Throws:
IllegalArgumentException
- if provided matrix is not 3x1.
-
setBias
public void setBias(com.irurueta.algebra.Matrix bias) throws com.irurueta.navigation.LockedException Sets gyroscope known bias as a column matrix. Matrix values are expressed in radians per second (rad/s).- Specified by:
setBias
in interfaceKnownBiasGyroscopeCalibrator
- Parameters:
bias
- gyroscope known bias.- Throws:
com.irurueta.navigation.LockedException
- if calibrator is currently running.IllegalArgumentException
- if provided matrix is not 3x1.
-
getInitialMg
public com.irurueta.algebra.Matrix getInitialMg()Gets initial gyroscope scale factors and cross coupling errors matrix.- Specified by:
getInitialMg
in interfaceGyroscopeNonLinearCalibrator
- Returns:
- initial gyroscope scale factors and cross coupling errors matrix.
-
getInitialMg
public void getInitialMg(com.irurueta.algebra.Matrix result) Gets initial gyroscope scale factors and cross coupling errors matrix.- Specified by:
getInitialMg
in 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 gyroscope scale factors and cross coupling errors matrix.- Specified by:
setInitialMg
in 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:
getInitialGg
in 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:
getInitialGg
in 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:
setInitialGg
in interfaceGyroscopeNonLinearCalibrator
- Parameters:
initialGg
- g-dependent cross biases.- Throws:
com.irurueta.navigation.LockedException
- if calibrator is currently running.IllegalArgumentException
- if provided matrix is not 3x3.
-
getSequences
Gets collection of sequences of timestamped body kinematics measurements taken at a given position where the device moves freely with different orientations.- Specified by:
getSequences
in interfaceOrderedBodyKinematicsSequenceGyroscopeCalibrator
- Returns:
- collection of sequences of timestamped body kinematics measurements.
-
setSequences
public void setSequences(List<BodyKinematicsSequence<StandardDeviationTimedBodyKinematics>> sequences) throws com.irurueta.navigation.LockedException Sets collection of sequences of timestamped body kinematics measurements taken at a given position where the device moves freely with different orientations.- Specified by:
setSequences
in interfaceOrderedBodyKinematicsSequenceGyroscopeCalibrator
- Parameters:
sequences
- collection of sequences of timestamped body kinematics measurements.- Throws:
com.irurueta.navigation.LockedException
- if calibrator is currently running.
-
getMeasurementOrSequenceType
Indicates the type of measurement or sequence used by this calibrator.- Specified by:
getMeasurementOrSequenceType
in 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:
isOrderedMeasurementsOrSequencesRequired
in interfaceGyroscopeCalibrator
- Returns:
- true if measurements or sequences must be ordered, false otherwise.
-
isQualityScoresRequired
public boolean isQualityScoresRequired()Indicates whether this calibrator requires quality scores for each measurement/sequence or not.- Specified by:
isQualityScoresRequired
in interfaceGyroscopeCalibrator
- Returns:
- true if quality scores are required, 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:
isCommonAxisUsed
in 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:
setCommonAxisUsed
in 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.
-
isGDependentCrossBiasesEstimated
public boolean isGDependentCrossBiasesEstimated()Indicates whether G-dependent cross biases are being estimated or not. When enabled, this adds 9 variables from Gg matrix.- Returns:
- true if G-dependent cross biases will be estimated, false otherwise.
-
setGDependentCrossBiasesEstimated
public void setGDependentCrossBiasesEstimated(boolean estimateGDependentCrossBiases) throws com.irurueta.navigation.LockedException Specifies whether G-dependent cross biases are being estimated or not. When enabled, this adds 9 variables from Gg matrix.- Parameters:
estimateGDependentCrossBiases
- true if G-dependent cross biases will be estimated, 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 sequences.- Specified by:
getMinimumRequiredMeasurementsOrSequences
in interfaceGyroscopeCalibrator
- Returns:
- minimum number of required sequences.
-
isReady
public boolean isReady()Indicates whether calibrator is ready to start.- Specified by:
isReady
in interfaceGyroscopeCalibrator
- Returns:
- true if calibrator is ready, false otherwise.
-
isRunning
public boolean isRunning()Indicates whether calibrator is currently running or not.- Specified by:
isRunning
in interfaceGyroscopeCalibrator
- Returns:
- true if calibrator is running, false otherwise.
-
calibrate
public void calibrate() throws com.irurueta.navigation.LockedException, com.irurueta.navigation.NotReadyException, CalibrationExceptionEstimates gyroscope calibration parameters containing scale factors, cross-coupling errors and G-dependent coupling.- Specified by:
calibrate
in interfaceGyroscopeCalibrator
- Throws:
com.irurueta.navigation.LockedException
- if calibrator is currently running.com.irurueta.navigation.NotReadyException
- if calibrator is not ready.CalibrationException
- if estimation fails for numerical reasons.
-
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:
getEstimatedMg
in interfaceGyroscopeCalibrator
- Returns:
- estimated gyroscope scale factors and cross coupling errors, or null if not available.
-
getEstimatedSx
Gets estimated gyroscope x-axis scale factor.- Specified by:
getEstimatedSx
in interfaceGyroscopeCalibrator
- Returns:
- estimated gyroscope x-axis scale factor or null if not available.
-
getEstimatedSy
Gets estimated gyroscope y-axis scale factor.- Specified by:
getEstimatedSy
in interfaceGyroscopeCalibrator
- Returns:
- estimated gyroscope y-axis scale factor or null if not available.
-
getEstimatedSz
Gets estimated gyroscope z-axis scale factor.- Specified by:
getEstimatedSz
in interfaceGyroscopeCalibrator
- Returns:
- estimated gyroscope z-axis scale factor or null if not available.
-
getEstimatedMxy
Gets estimated gyroscope x-y cross-coupling error.- Specified by:
getEstimatedMxy
in interfaceGyroscopeCalibrator
- Returns:
- estimated gyroscope x-y cross-coupling error or null if not available.
-
getEstimatedMxz
Gets estimated gyroscope x-z cross-coupling error.- Specified by:
getEstimatedMxz
in interfaceGyroscopeCalibrator
- Returns:
- estimated gyroscope x-z cross-coupling error or null if not available.
-
getEstimatedMyx
Gets estimated gyroscope y-x cross-coupling error.- Specified by:
getEstimatedMyx
in interfaceGyroscopeCalibrator
- Returns:
- estimated gyroscope y-x cross-coupling error or null if not available.
-
getEstimatedMyz
Gets estimated gyroscope y-z cross-coupling error.- Specified by:
getEstimatedMyz
in interfaceGyroscopeCalibrator
- Returns:
- estimated gyroscope y-z cross-coupling error or null if not available.
-
getEstimatedMzx
Gets estimated gyroscope z-x cross-coupling error.- Specified by:
getEstimatedMzx
in interfaceGyroscopeCalibrator
- Returns:
- estimated gyroscope z-x cross-coupling error or null if not available.
-
getEstimatedMzy
Gets estimated gyroscope z-y cross-coupling error.- Specified by:
getEstimatedMzy
in interfaceGyroscopeCalibrator
- Returns:
- estimated gyroscope 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:
getEstimatedGg
in interfaceGyroscopeCalibrator
- Returns:
- estimated G-dependent cross biases.
-
getEstimatedCovariance
public com.irurueta.algebra.Matrix getEstimatedCovariance()Gets estimated covariance matrix for estimated parameters. Diagonal elements of the matrix contains variance for the following parameters (following indicated order): sx, sy, sz, mxy, mxz, myx, myz, mzx, mzy, gg11, gg21, gg31, gg12, gg22, gg32, gg13, gg23, gg33.- Specified by:
getEstimatedCovariance
in interfaceGyroscopeNonLinearCalibrator
- Returns:
- estimated covariance matrix for estimated parameters.
-
getEstimatedChiSq
public double getEstimatedChiSq()Gets estimated chi square value.- Specified by:
getEstimatedChiSq
in interfaceGyroscopeNonLinearCalibrator
- Returns:
- estimated chi square value.
-
getEstimatedMse
public double getEstimatedMse()Gets estimated mean square error respect to provided measurements.- Specified by:
getEstimatedMse
in interfaceGyroscopeNonLinearCalibrator
- Returns:
- estimated mean square error respect to provided measurements.
-
calibrateCommonAxisAndGDependentCrossBiases
private void calibrateCommonAxisAndGDependentCrossBiases() throws com.irurueta.algebra.AlgebraException, com.irurueta.numerical.fitting.FittingException, com.irurueta.numerical.NotReadyExceptionInternal method to perform calibration when common z-axis is assumed for both the accelerometer and gyroscope and when G-dependent cross biases are being estimated.- Throws:
com.irurueta.algebra.AlgebraException
- if accelerometer parameters prevent fixing measured accelerometer values due to numerical instabilities.com.irurueta.numerical.fitting.FittingException
- if no convergence to solution is found.com.irurueta.numerical.NotReadyException
- if fitter is not ready.
-
calibrateGeneralAndGDependentCrossBiases
private void calibrateGeneralAndGDependentCrossBiases() throws com.irurueta.algebra.AlgebraException, com.irurueta.numerical.fitting.FittingException, com.irurueta.numerical.NotReadyExceptionInternal method to perform general calibration when G-dependent cross biases are being estimated.- Throws:
com.irurueta.algebra.AlgebraException
- if accelerometer parameters prevent fixing measured accelerometer values due to numerical instabilities.com.irurueta.numerical.fitting.FittingException
- if no convergence to solution is found.com.irurueta.numerical.NotReadyException
- if fitter is not ready.
-
calibrateCommonAxis
private void calibrateCommonAxis() throws com.irurueta.algebra.AlgebraException, com.irurueta.numerical.fitting.FittingException, com.irurueta.numerical.NotReadyExceptionInternal method to perform calibration when common z-axis is assumed for both the accelerometer and gyroscope and G-dependent cross biases are ignored.- Throws:
com.irurueta.algebra.AlgebraException
- if accelerometer parameters prevent fixing measured accelerometer values due to numerical instabilities.com.irurueta.numerical.fitting.FittingException
- if no convergence to solution is found.com.irurueta.numerical.NotReadyException
- if fitter is not ready.
-
calibrateGeneral
private void calibrateGeneral() throws com.irurueta.algebra.AlgebraException, com.irurueta.numerical.fitting.FittingException, com.irurueta.numerical.NotReadyExceptionInternal method to perform general calibration when G-dependant cross biases are ignored.- Throws:
com.irurueta.algebra.AlgebraException
- if accelerometer parameters prevent fixing measured accelerometer values due to numerical instabilities.com.irurueta.numerical.fitting.FittingException
- if no convergence to solution is found.com.irurueta.numerical.NotReadyException
- if fitter is not ready.
-
setInputData
private void setInputData() throws com.irurueta.algebra.AlgebraExceptionSets input data into Levenberg-Marquardt fitter.- Throws:
com.irurueta.algebra.AlgebraException
- if there are numerical instabilities.
-
convertAcceleration
private static double convertAcceleration(com.irurueta.units.Acceleration acceleration) Converts acceleration instance to meters per squared second.- Parameters:
acceleration
- acceleration instance to be converted.- Returns:
- converted value.
-
convertAngularSpeed
private static double convertAngularSpeed(double value, com.irurueta.units.AngularSpeedUnit unit) Converts angular speed instance to radians per second (rad/s).- 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 (rad/s).- Parameters:
angularSpeed
- angular speed instance to be converted.- Returns:
- converted value.
-
setResult
private void setResult(com.irurueta.algebra.Matrix m, com.irurueta.algebra.Matrix g) throws com.irurueta.algebra.AlgebraException Makes proper conversion of internal cross-coupling, bias and g-dependent cross bias matrices.- Parameters:
m
- internal scaling and cross-coupling matrix.g
- internal g-dependent cross bias matrix.- Throws:
com.irurueta.algebra.AlgebraException
- if a numerical instability occurs.
-
setResult
private void setResult(com.irurueta.algebra.Matrix m) throws com.irurueta.algebra.AlgebraException Makes proper conversion of internal cross-coupling and bias matrices.- Parameters:
m
- internal scaling and cross-coupling matrix.- Throws:
com.irurueta.algebra.AlgebraException
- if a numerical instability occurs.
-
evaluateGeneralWithGDependentCrossBiases
private double evaluateGeneralWithGDependentCrossBiases(int i, double[] params) throws com.irurueta.numerical.EvaluationException Computes gravity versor error at the end of a sequence using provided parameters. This method is internally executed during gradient estimation and Levenberg-Marquardt fitting needed for calibration computation.- Parameters:
i
- row position.params
- array containing parameters for the general purpose case when G-dependent cross biases are taken into account. Must have length 18.- Returns:
- error between estimated and measured gravity versor.
- Throws:
com.irurueta.numerical.EvaluationException
- if there are numerical instabilities.
-
evaluateCommonAxisWithGDependentCrossBiases
private double evaluateCommonAxisWithGDependentCrossBiases(int i, double[] params) throws com.irurueta.numerical.EvaluationException Computes gravity versor error at the end of a sequence using provided parameters. This method is internally executed during gradient estimation and Levenberg-Marquardt fitting needed for calibration computation.- Parameters:
i
- row position.params
- array containing parameters for the general purpose case when G-dependent cross biases are taken into account. Must have length 15.- Returns:
- error between estimated and measured gravity versor.
- Throws:
com.irurueta.numerical.EvaluationException
- if there are numerical instabilities.
-
evaluateGeneral
private double evaluateGeneral(int i, double[] params) throws com.irurueta.numerical.EvaluationException Computes gravity versor error at the end of a sequence using provided parameters. This method is internally executed during gradient estimation and Levenberg-Marquardt fitting needed for calibration computation.- Parameters:
i
- row position.params
- array containing current parameters for the general purpose case when G-dependent cross biases are ignored. Must have length 9.- Returns:
- error between estimated and measured gravity versor.
- Throws:
com.irurueta.numerical.EvaluationException
- if there are numerical instabilities.
-
evaluateCommonAxis
private double evaluateCommonAxis(int i, double[] params) throws com.irurueta.numerical.EvaluationException Computes gravity versor error at the end of a sequence using provided parameters. This method is internally executed during gradient estimation and Levenberg-Marquardt fitting needed for calibration computation.- Parameters:
i
- row position.params
- array containing current parameters for the common z-axis case when G-dependent cross biases are ignored. Must have length 9.- Returns:
- error between estimated and measured gravity versor.
- Throws:
com.irurueta.numerical.EvaluationException
- if there are numerical instabilities.
-
evaluate
private double evaluate(int i, double m11, double m21, double m31, double m12, double m22, double m32, double m13, double m23, double m33, double g11, double g21, double g31, double g12, double g22, double g32, double g13, double g23, double g33) throws com.irurueta.numerical.EvaluationException Computes gravity versor error at the end of a sequence using provided parameters. This method is internally executed during gradient estimation and Levenberg-Marquardt fitting needed for calibration computation.- Parameters:
i
- row position.m11
- element 1,1 of cross-coupling error matrix.m21
- element 2,1 of cross-coupling error matrix.m31
- element 3,1 of cross-coupling error matrix.m12
- element 1,2 of cross-coupling error matrix.m22
- element 2,2 of cross-coupling error matrix.m32
- element 3,2 of cross-coupling error matrix.m13
- element 1,3 of cross-coupling error matrix.m23
- element 2,3 of cross-coupling error matrix.m33
- element 3,3 of cross-coupling error matrix.g11
- element 1,1 of g-dependent cross bias matrix.g21
- element 2,1 of g-dependent cross bias matrix.g31
- element 3,1 of g-dependent cross bias matrix.g12
- element 1,2 of g-dependent cross bias matrix.g22
- element 2,2 of g-dependent cross bias matrix.g32
- element 3,2 of g-dependent cross bias matrix.g13
- element 1,3 of g-dependent cross bias matrix.g23
- element 2,3 of g-dependent cross bias matrix.g33
- element 3,3 of g-dependent cross bias matrix.- Returns:
- error between estimated and measured gravity versor.
- Throws:
com.irurueta.numerical.EvaluationException
- if there are numerical instabilities.
-
reset
private void reset()Resets any previous estimations.
-