Class KnownFrameAccelerometerLinearLeastSquaresCalibrator
java.lang.Object
com.irurueta.navigation.inertial.calibration.accelerometer.KnownFrameAccelerometerLinearLeastSquaresCalibrator
- All Implemented Interfaces:
AccelerometerCalibrator,KnownFrameAccelerometerCalibrator<FrameBodyKinematics,,KnownFrameAccelerometerLinearLeastSquaresCalibratorListener> UnknownBiasAccelerometerCalibrator,UnorderedFrameBodyKinematicsAccelerometerCalibrator,AccelerometerCalibrationSource
public class KnownFrameAccelerometerLinearLeastSquaresCalibrator
extends Object
implements KnownFrameAccelerometerCalibrator<FrameBodyKinematics,KnownFrameAccelerometerLinearLeastSquaresCalibratorListener>, AccelerometerCalibrationSource, UnorderedFrameBodyKinematicsAccelerometerCalibrator
Estimates accelerometer biases, cross couplings and scaling factors.
This calibrator uses a linear approach to find a minimum least squared error solution.
To use this calibrator at least 4 measurements at different known frames must be provided. In other words, accelerometer samples must be obtained at 4 different positions, orientations and velocities (although typically velocities are always zero).
Measured specific force is assumed to follow the model shown below:
fmeas = ba + (I + Ma) * ftrue + w
Where:
- fmeas is the measured specific force. This is a 3x1 vector.
- ba is accelerometer bias. Ideally, on a perfect accelerometer, this should be a
3x1 zero vector.
- I is the 3x3 identity matrix.
- Ma is the 3x3 matrix containing cross-couplings and scaling factors. Ideally, on
a perfect accelerometer, 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.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final intNumber of unknowns when common z-axis is assumed for both the accelerometer and gyroscope.private booleanThis flag indicates whether z-axis is assumed to be common for accelerometer and gyroscope.static final booleanIndicates whether by default a common z-axis is assumed for both the accelerometer and gyroscope.private static final intNumber of equations generated for each measurement.private double[]Estimated accelerometer biases for each IMU axis expressed in meter per squared second (m/s^2).private com.irurueta.algebra.MatrixEstimated accelerometer scale factors and cross coupling errors.private static final intNumber of unknowns for the general case.Listener to handle events raised by this calibrator.private Collection<FrameBodyKinematics> Contains a collection of body kinematics measurements taken at different frames (positions, orientations and velocities).static final intRequired minimum number of measurements.private booleanIndicates whether calibrator is running. -
Constructor Summary
ConstructorsConstructorDescriptionConstructor.KnownFrameAccelerometerLinearLeastSquaresCalibrator(boolean commonAxisUsed) Constructor.KnownFrameAccelerometerLinearLeastSquaresCalibrator(boolean commonAxisUsed, KnownFrameAccelerometerLinearLeastSquaresCalibratorListener listener) Constructor.KnownFrameAccelerometerLinearLeastSquaresCalibrator(KnownFrameAccelerometerLinearLeastSquaresCalibratorListener listener) Constructor.KnownFrameAccelerometerLinearLeastSquaresCalibrator(Collection<? extends FrameBodyKinematics> measurements) Constructor.KnownFrameAccelerometerLinearLeastSquaresCalibrator(Collection<? extends FrameBodyKinematics> measurements, boolean commonAxisUsed) Constructor.KnownFrameAccelerometerLinearLeastSquaresCalibrator(Collection<? extends FrameBodyKinematics> measurements, boolean commonAxisUsed, KnownFrameAccelerometerLinearLeastSquaresCalibratorListener listener) Constructor.KnownFrameAccelerometerLinearLeastSquaresCalibrator(Collection<? extends FrameBodyKinematics> measurements, KnownFrameAccelerometerLinearLeastSquaresCalibratorListener listener) Constructor. -
Method Summary
Modifier and TypeMethodDescriptionvoidEstimates accelerometer calibration parameters containing bias, scale factors and cross-coupling errors.private voidInternal method to perform calibration when common z-axis is assumed for both the accelerometer and gyroscope.private voidInternal method to perform general calibration.private voidfillBiases(double bx, double by, double bz) Fills estimated biases array with estimated values.private voidfillMa(double sx, double sy, double sz, double mxy, double mxz, double myx, double myz, double mzx, double mzy) Fills scale factor and cross coupling error matrix with estimated values.Gets estimated accelerometer bias.booleanGets estimated accelerometer bias.double[]Gets array containing x,y,z components of estimated accelerometer biases expressed in meters per squared second (m/s^2).booleangetEstimatedBiases(double[] result) Gets array containing x,y,z components of estimated accelerometer biases expressed in meters per squared second (m/s^2).com.irurueta.algebra.MatrixGets column matrix containing x,y,z components of estimated accelerometer biases expressed in meters per squared second (m/s^2).booleangetEstimatedBiasesAsMatrix(com.irurueta.algebra.Matrix result) Gets column matrix containing x,y,z components of estimated accelerometer biases expressed in meters per squared second (m/s^2).Gets x coordinate of estimated accelerometer bias expressed in meters per squared second (m/s^2).com.irurueta.units.AccelerationGets x coordinate of estimated accelerometer bias.booleangetEstimatedBiasFxAsAcceleration(com.irurueta.units.Acceleration result) Gets x coordinate of estimated accelerometer bias.Gets y coordinate of estimated accelerometer bias expressed in meters per squared second (m/s^2).com.irurueta.units.AccelerationGets y coordinate of estimated accelerometer bias.booleangetEstimatedBiasFyAsAcceleration(com.irurueta.units.Acceleration result) Gets y coordinate of estimated accelerometer bias.Gets z coordinate of estimated accelerometer bias expressed in meters per squared second (m/s^2).com.irurueta.units.AccelerationGets z coordinate of estimated accelerometer bias.booleangetEstimatedBiasFzAsAcceleration(com.irurueta.units.Acceleration result) Gets z coordinate of estimated accelerometer bias.com.irurueta.algebra.MatrixGets estimated accelerometer scale factors and cross coupling errors.Gets estimated x-y cross-coupling error.Gets estimated x-z cross-coupling error.Gets estimated y-x cross-coupling error.Gets estimated y-z cross-coupling error.Gets estimated z-x cross-coupling error.Gets estimated z-y cross-coupling error.Gets estimated x-axis scale factor.Gets estimated y-axis scale factor.Gets estimated z-axis scale factor.Gets listener to handle events raised by this calibrator.Gets a collection of body kinematics measurements taken at different frames (positions, orientations and velocities).Indicates the type of measurement used by this calibrator.intGets minimum number of required measurements.booleanIndicates whether z-axis is assumed to be common for accelerometer and gyroscope.booleanIndicates whether this calibrator requires ordered measurements in a list or not.booleanIndicates whether this calibrator requires quality scores for each measurement or not.booleanisReady()Indicates whether calibrator is ready to start the calibration.booleanIndicates whether calibrator is currently running or not.voidsetCommonAxisUsed(boolean commonAxisUsed) Specifies whether z-axis is assumed to be common for accelerometer and gyroscope.voidSets listener to handle events raised by this calibrator.voidsetMeasurements(Collection<? extends FrameBodyKinematics> measurements) Sets a collection of body kinematics measurements taken at different frames (positions, orientations and velocities).
-
Field Details
-
DEFAULT_USE_COMMON_Z_AXIS
public static final boolean DEFAULT_USE_COMMON_Z_AXISIndicates whether by default a common z-axis is assumed for both the accelerometer and gyroscope.- See Also:
-
MINIMUM_MEASUREMENTS
public static final int MINIMUM_MEASUREMENTSRequired minimum number of measurements.- See Also:
-
EQUATIONS_PER_MEASUREMENT
private static final int EQUATIONS_PER_MEASUREMENTNumber of equations generated for each measurement.- See Also:
-
COMMON_Z_AXIS_UNKNOWNS
private static final int COMMON_Z_AXIS_UNKNOWNSNumber of unknowns when common z-axis is assumed for both the accelerometer and gyroscope.- See Also:
-
GENERAL_UNKNOWNS
private static final int GENERAL_UNKNOWNSNumber of unknowns for the general case.- See Also:
-
measurements
Contains a collection of body kinematics measurements taken at different frames (positions, orientations and velocities). If a single device IMU needs to be calibrated, typically all measurements are taken at the same position, with zero velocity and multiple orientations. However, if we just want to calibrate a given IMU model (e.g. obtain an average and less precise calibration for the IMU of a given phone model), we could take measurements collected throughout the planet at multiple positions while the phone remains static (e.g. while charging), hence each measurement position will change, velocity will remain zero and orientation will be typically constant at horizontal orientation while the phone remains on a flat surface. -
commonAxisUsed
private boolean commonAxisUsedThis flag indicates whether z-axis is assumed to be common for accelerometer and gyroscope. When enabled, this eliminates 3 variables from Ma matrix. -
listener
Listener to handle events raised by this calibrator. -
estimatedBiases
private double[] estimatedBiasesEstimated accelerometer biases for each IMU axis expressed in meter per squared second (m/s^2). -
estimatedMa
private com.irurueta.algebra.Matrix estimatedMaEstimated accelerometer scale factors and cross coupling errors. This is the product of matrix Ta containing cross coupling errors and Ka containing scaling factors. So tat:Ma = [sx mxy mxz] = Ta*Ka [myx sy myz] [mzx mzy sz ]Where:Ka = [sx 0 0 ] [0 sy 0 ] [0 0 sz]andTa = [1 -alphaXy alphaXz ] [alphaYx 1 -alphaYz] [-alphaZx alphaZy 1 ]Hence:Ma = [sx mxy mxz] = Ta*Ka = [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 accelerometer z-axis is assumed to be the same as the body z-axis. When this is assumed, myx = mzx = mzy = 0 and the Ma matrix becomes upper diagonal:Ma = [sx mxy mxz] [0 sy myz] [0 0 sz ]Values of this matrix are unit-less. -
running
private boolean runningIndicates whether calibrator is running.
-
-
Constructor Details
-
KnownFrameAccelerometerLinearLeastSquaresCalibrator
public KnownFrameAccelerometerLinearLeastSquaresCalibrator()Constructor. -
KnownFrameAccelerometerLinearLeastSquaresCalibrator
public KnownFrameAccelerometerLinearLeastSquaresCalibrator(Collection<? extends FrameBodyKinematics> measurements) Constructor.- Parameters:
measurements- collection of body kinematics measurements taken at different frames (positions, orientations and velocities).
-
KnownFrameAccelerometerLinearLeastSquaresCalibrator
public KnownFrameAccelerometerLinearLeastSquaresCalibrator(boolean commonAxisUsed) Constructor.- Parameters:
commonAxisUsed- indicates whether z-axis is assumed to be common for accelerometer and gyroscope.
-
KnownFrameAccelerometerLinearLeastSquaresCalibrator
public KnownFrameAccelerometerLinearLeastSquaresCalibrator(Collection<? extends FrameBodyKinematics> measurements, boolean commonAxisUsed) Constructor.- Parameters:
measurements- collection of body kinematics measurements taken at different frames (positions, orientations and velocities).commonAxisUsed- indicates whether z-axis is assumed to be common for accelerometer and gyroscope.
-
-
Method Details
-
getMeasurements
Gets a collection of body kinematics measurements taken at different frames (positions, orientations and velocities). If a single device IMU needs to be calibrated, typically all measurements are taken at the same position, with zero velocity and multiple orientations. However, if we just want to calibrate a given IMU model (e.g. obtain an average and less precise calibration for the IMU of a given phone model), we could take measurements collected throughout the planet at multiple positions while the phone remains static (e.g. while charging), hence each measurement position will change, velocity will remain zero and orientation will be typically constant at horizontal orientation while the phone remains on a flat surface.- Specified by:
getMeasurementsin interfaceKnownFrameAccelerometerCalibrator<FrameBodyKinematics,KnownFrameAccelerometerLinearLeastSquaresCalibratorListener> - Specified by:
getMeasurementsin interfaceUnorderedFrameBodyKinematicsAccelerometerCalibrator- Returns:
- a collection of body kinematics measurements taken at different frames (positions, orientations and velocities).
-
setMeasurements
public void setMeasurements(Collection<? extends FrameBodyKinematics> measurements) throws com.irurueta.navigation.LockedException Sets a collection of body kinematics measurements taken at different frames (positions, orientations and velocities). If a single device IMU needs to be calibrated, typically all measurements are taken at the same position, with zero velocity and multiple orientations. However, if we just want to calibrate the a given IMU model (e.g. obtain an average and less precise calibration for the IMU of a given phone model), we could take measurements collected throughout the planet at multiple positions while the phone remains static (e.g. while charging), hence each measurement position will change, velocity will remain zero and orientation will be typically constant at horizontal orientation while the phone remains on a flat surface.- Specified by:
setMeasurementsin interfaceKnownFrameAccelerometerCalibrator<FrameBodyKinematics,KnownFrameAccelerometerLinearLeastSquaresCalibratorListener> - Specified by:
setMeasurementsin interfaceUnorderedFrameBodyKinematicsAccelerometerCalibrator- Parameters:
measurements- collection of body kinematics measurements taken at different frames (positions, orientations and velocities).- Throws:
com.irurueta.navigation.LockedException- if calibrator is currently running.
-
getMeasurementType
Indicates the type of measurement used by this calibrator.- Specified by:
getMeasurementTypein interfaceAccelerometerCalibrator- Returns:
- type of measurement used by this calibrator.
-
isOrderedMeasurementsRequired
public boolean isOrderedMeasurementsRequired()Indicates whether this calibrator requires ordered measurements in a list or not.- Specified by:
isOrderedMeasurementsRequiredin interfaceAccelerometerCalibrator- Returns:
- true if measurements must be ordered, false otherwise.
-
isQualityScoresRequired
public boolean isQualityScoresRequired()Indicates whether this calibrator requires quality scores for each measurement or not.- Specified by:
isQualityScoresRequiredin interfaceAccelerometerCalibrator- 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:
isCommonAxisUsedin interfaceAccelerometerCalibrator- Returns:
- true if z-axis is assumed to be common for accelerometer and gyroscope, false otherwise.
-
setCommonAxisUsed
public void setCommonAxisUsed(boolean commonAxisUsed) throws com.irurueta.navigation.LockedException Specifies whether z-axis is assumed to be common for accelerometer and gyroscope. When enabled, this eliminates 3 variables from Ma matrix.- Specified by:
setCommonAxisUsedin interfaceAccelerometerCalibrator- Parameters:
commonAxisUsed- true if z-axis is assumed to be common for accelerometer and gyroscope, false otherwise.- Throws:
com.irurueta.navigation.LockedException- if calibrator is currently running.
-
getListener
Gets listener to handle events raised by this calibrator.- Specified by:
getListenerin interfaceKnownFrameAccelerometerCalibrator<FrameBodyKinematics,KnownFrameAccelerometerLinearLeastSquaresCalibratorListener> - Returns:
- listener to handle events raised by this calibrator.
-
getMinimumRequiredMeasurements
public int getMinimumRequiredMeasurements()Gets minimum number of required measurements.- Specified by:
getMinimumRequiredMeasurementsin interfaceAccelerometerCalibrator- Returns:
- minimum number of required measurements.
-
isReady
public boolean isReady()Indicates whether calibrator is ready to start the calibration.- Specified by:
isReadyin interfaceAccelerometerCalibrator- Returns:
- true if calibrator is ready, false otherwise.
-
isRunning
public boolean isRunning()Indicates whether calibrator is currently running or not.- Specified by:
isRunningin interfaceAccelerometerCalibrator- Returns:
- true if calibrator is running, false otherwise.
-
calibrate
public void calibrate() throws com.irurueta.navigation.LockedException, com.irurueta.navigation.NotReadyException, CalibrationExceptionEstimates accelerometer calibration parameters containing bias, scale factors and cross-coupling errors.- Specified by:
calibratein interfaceAccelerometerCalibrator- Throws:
com.irurueta.navigation.LockedException- if calibrator is currently running.com.irurueta.navigation.NotReadyException- if calibrator is not ready.CalibrationException- if calibration fails for numerical reasons.
-
getEstimatedBiases
public double[] getEstimatedBiases()Gets array containing x,y,z components of estimated accelerometer biases expressed in meters per squared second (m/s^2).- Specified by:
getEstimatedBiasesin interfaceAccelerometerCalibrationSource- Specified by:
getEstimatedBiasesin interfaceUnknownBiasAccelerometerCalibrator- Returns:
- array containing x,y,z components of estimated accelerometer biases.
-
getEstimatedBiases
public boolean getEstimatedBiases(double[] result) Gets array containing x,y,z components of estimated accelerometer biases expressed in meters per squared second (m/s^2).- Specified by:
getEstimatedBiasesin interfaceUnknownBiasAccelerometerCalibrator- Parameters:
result- instance where estimated accelerometer biases will be stored.- Returns:
- true if result instance was updated, false otherwise (when estimation is not yet available).
-
getEstimatedBiasesAsMatrix
public com.irurueta.algebra.Matrix getEstimatedBiasesAsMatrix()Gets column matrix containing x,y,z components of estimated accelerometer biases expressed in meters per squared second (m/s^2).- Specified by:
getEstimatedBiasesAsMatrixin interfaceUnknownBiasAccelerometerCalibrator- Returns:
- column matrix containing x,y,z components of estimated accelerometer biases.
-
getEstimatedBiasesAsMatrix
public boolean getEstimatedBiasesAsMatrix(com.irurueta.algebra.Matrix result) throws com.irurueta.algebra.WrongSizeException Gets column matrix containing x,y,z components of estimated accelerometer biases expressed in meters per squared second (m/s^2).- Specified by:
getEstimatedBiasesAsMatrixin interfaceUnknownBiasAccelerometerCalibrator- Parameters:
result- instance where result data will be stored.- Returns:
- true if result was updated, false otherwise.
- Throws:
com.irurueta.algebra.WrongSizeException- if provided result instance has invalid size.
-
getEstimatedBiasFx
Gets x coordinate of estimated accelerometer bias expressed in meters per squared second (m/s^2).- Specified by:
getEstimatedBiasFxin interfaceUnknownBiasAccelerometerCalibrator- Returns:
- x coordinate of estimated accelerometer bias or null if not available.
-
getEstimatedBiasFy
Gets y coordinate of estimated accelerometer bias expressed in meters per squared second (m/s^2).- Specified by:
getEstimatedBiasFyin interfaceUnknownBiasAccelerometerCalibrator- Returns:
- y coordinate of estimated accelerometer bias or null if not available.
-
getEstimatedBiasFz
Gets z coordinate of estimated accelerometer bias expressed in meters per squared second (m/s^2).- Specified by:
getEstimatedBiasFzin interfaceUnknownBiasAccelerometerCalibrator- Returns:
- z coordinate of estimated accelerometer bias or null if not available.
-
getEstimatedBiasFxAsAcceleration
public com.irurueta.units.Acceleration getEstimatedBiasFxAsAcceleration()Gets x coordinate of estimated accelerometer bias.- Specified by:
getEstimatedBiasFxAsAccelerationin interfaceUnknownBiasAccelerometerCalibrator- Returns:
- x coordinate of estimated accelerometer bias or null if not available.
-
getEstimatedBiasFxAsAcceleration
public boolean getEstimatedBiasFxAsAcceleration(com.irurueta.units.Acceleration result) Gets x coordinate of estimated accelerometer bias.- Specified by:
getEstimatedBiasFxAsAccelerationin interfaceUnknownBiasAccelerometerCalibrator- Parameters:
result- instance where result will be stored.- Returns:
- true if result was updated, false if estimation is not available.
-
getEstimatedBiasFyAsAcceleration
public com.irurueta.units.Acceleration getEstimatedBiasFyAsAcceleration()Gets y coordinate of estimated accelerometer bias.- Specified by:
getEstimatedBiasFyAsAccelerationin interfaceUnknownBiasAccelerometerCalibrator- Returns:
- y coordinate of estimated accelerometer bias or null if not available.
-
getEstimatedBiasFyAsAcceleration
public boolean getEstimatedBiasFyAsAcceleration(com.irurueta.units.Acceleration result) Gets y coordinate of estimated accelerometer bias.- Specified by:
getEstimatedBiasFyAsAccelerationin interfaceUnknownBiasAccelerometerCalibrator- Parameters:
result- instance where result will be stored.- Returns:
- true if result was updated, false if estimation is not available.
-
getEstimatedBiasFzAsAcceleration
public com.irurueta.units.Acceleration getEstimatedBiasFzAsAcceleration()Gets z coordinate of estimated accelerometer bias.- Specified by:
getEstimatedBiasFzAsAccelerationin interfaceUnknownBiasAccelerometerCalibrator- Returns:
- z coordinate of estimated accelerometer bias or null if not available.
-
getEstimatedBiasFzAsAcceleration
public boolean getEstimatedBiasFzAsAcceleration(com.irurueta.units.Acceleration result) Gets z coordinate of estimated accelerometer bias.- Specified by:
getEstimatedBiasFzAsAccelerationin interfaceUnknownBiasAccelerometerCalibrator- Parameters:
result- instance where result will be stored.- Returns:
- true if result was updated, false if estimation is not available.
-
getEstimatedBiasAsTriad
Gets estimated accelerometer bias.- Specified by:
getEstimatedBiasAsTriadin interfaceUnknownBiasAccelerometerCalibrator- Returns:
- estimated accelerometer bias or null if not available.
-
getEstimatedMa
public com.irurueta.algebra.Matrix getEstimatedMa()Gets estimated accelerometer scale factors and cross coupling errors. This is the product of matrix Ta containing cross coupling errors and Ka containing scaling factors. So tat:Ma = [sx mxy mxz] = Ta*Ka [myx sy myz] [mzx mzy sz ]Where:Ka = [sx 0 0 ] [0 sy 0 ] [0 0 sz]andTa = [1 -alphaXy alphaXz ] [alphaYx 1 -alphaYz] [-alphaZx alphaZy 1 ]Hence:Ma = [sx mxy mxz] = Ta*Ka = [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 accelerometer z-axis is assumed to be the same as the body z-axis. When this is assumed, myx = mzx = mzy = 0 and the Ma matrix becomes upper diagonal:Ma = [sx mxy mxz] [0 sy myz] [0 0 sz ]Values of this matrix are unit-less.- Specified by:
getEstimatedMain interfaceAccelerometerCalibrationSource- Specified by:
getEstimatedMain interfaceAccelerometerCalibrator- Returns:
- estimated accelerometer scale factors and cross coupling errors, or null if not available.
-
getEstimatedSx
Gets estimated x-axis scale factor.- Specified by:
getEstimatedSxin interfaceAccelerometerCalibrator- Returns:
- estimated x-axis scale factor or null if not available.
-
getEstimatedSy
Gets estimated y-axis scale factor.- Specified by:
getEstimatedSyin interfaceAccelerometerCalibrator- Returns:
- estimated y-axis scale factor or null if not available.
-
getEstimatedSz
Gets estimated z-axis scale factor.- Specified by:
getEstimatedSzin interfaceAccelerometerCalibrator- Returns:
- estimated z-axis scale factor or null if not available.
-
getEstimatedMxy
Gets estimated x-y cross-coupling error.- Specified by:
getEstimatedMxyin interfaceAccelerometerCalibrator- Returns:
- estimated x-y cross-coupling error or null if not available.
-
getEstimatedMxz
Gets estimated x-z cross-coupling error.- Specified by:
getEstimatedMxzin interfaceAccelerometerCalibrator- Returns:
- estimated x-z cross-coupling error or null if not available.
-
getEstimatedMyx
Gets estimated y-x cross-coupling error.- Specified by:
getEstimatedMyxin interfaceAccelerometerCalibrator- Returns:
- estimated y-x cross-coupling error or null if not available.
-
getEstimatedMyz
Gets estimated y-z cross-coupling error.- Specified by:
getEstimatedMyzin interfaceAccelerometerCalibrator- Returns:
- estimated y-z cross-coupling error or null if not available.
-
getEstimatedMzx
Gets estimated z-x cross-coupling error.- Specified by:
getEstimatedMzxin interfaceAccelerometerCalibrator- Returns:
- estimated z-x cross-coupling error or null if not available.
-
getEstimatedMzy
Gets estimated z-y cross-coupling error.- Specified by:
getEstimatedMzyin interfaceAccelerometerCalibrator- Returns:
- estimated z-y cross-coupling error or null if not available.
-
calibrateCommonAxis
private void calibrateCommonAxis() throws com.irurueta.algebra.AlgebraExceptionInternal method to perform calibration when common z-axis is assumed for both the accelerometer and gyroscope.- Throws:
com.irurueta.algebra.AlgebraException- if there are numerical errors.
-
calibrateGeneral
private void calibrateGeneral() throws com.irurueta.algebra.AlgebraExceptionInternal method to perform general calibration.- Throws:
com.irurueta.algebra.AlgebraException- if there are numerical errors.
-
fillBiases
private void fillBiases(double bx, double by, double bz) Fills estimated biases array with estimated values.- Parameters:
bx- x coordinate of bias.by- y coordinate of bias.bz- z coordinate of bias.
-
fillMa
private void fillMa(double sx, double sy, double sz, double mxy, double mxz, double myx, double myz, double mzx, double mzy) throws com.irurueta.algebra.WrongSizeException Fills scale factor and cross coupling error matrix with estimated values.- Parameters:
sx- x scale factorsy- y scale factorsz- z scale factormxy- x-y cross couplingmxz- x-z cross couplingmyx- y-x cross couplingmyz- y-z cross couplingmzx- z-x cross couplingmzy- z-y cross coupling- Throws:
com.irurueta.algebra.WrongSizeException- never happens.
-