Class MagneticFluxDensityFixer
java.lang.Object
com.irurueta.navigation.inertial.calibration.MagneticFluxDensityFixer
Fixes magnetic flux density values taking into account provided bias and
cross coupling errors.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate com.irurueta.algebra.Matrix
Bias matrix to be reused.private com.irurueta.algebra.Matrix
Cross coupling errors matrix to be reused.private com.irurueta.algebra.Matrix
Temporary matrix to be reused.private com.irurueta.algebra.Matrix
Identity matrix to be reused.private final double[]
Measured specific force array to be reused.private final double[]
Array containing result values to be reused.private com.irurueta.algebra.Matrix
Temporary matrix to be reused.private com.irurueta.algebra.Matrix
Temporary matrix to be reused.private com.irurueta.algebra.Matrix
Temporary matrix to be reused. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static double
convertMagneticFluxDensity
(double value, com.irurueta.units.MagneticFluxDensityUnit unit) Converts magnetic flux density value and unit to Teslas (T).static double
convertMagneticFluxDensity
(com.irurueta.units.MagneticFluxDensity b) Converts magnetic flux density to Teslas (T).void
fix
(double[] measuredB, double[] result) Fixes provided measured body magnetic flux density values by undoing the errors introduced by the magnetometer model to restore the true body magnetic flux density.void
fix
(double[] measuredB, com.irurueta.algebra.Matrix bias, com.irurueta.algebra.Matrix crossCouplingErrors, double[] result) Fixes provided measured body magnetic flux density values by undoing the errors introduced by the magnetometer model to restore the true body magnetic flux density.void
fix
(double measuredBx, double measuredBy, double measuredBz, double[] result) Fixes provided measured body magnetic flux density values by undoing the errors introduced by the magnetometer model to restore the true body magnetic flux density.void
fix
(double measuredBx, double measuredBy, double measuredBz, double biasX, double biasY, double biasZ, double sx, double sy, double sz, double mxy, double mxz, double myx, double myz, double mzx, double mzy, double[] result) Fixes provided measured body magnetic flux density values by undoing the errors introduced by the magnetometer model to restore the true body magnetic flux density.void
fix
(double measuredBx, double measuredBy, double measuredBz, double biasX, double biasY, double biasZ, double sx, double sy, double sz, double mxy, double mxz, double myx, double myz, double mzx, double mzy, com.irurueta.algebra.Matrix result) Fixes provided measured body magnetic flux density values by undoing the errors introduced by the magnetometer model to restore the true body magnetic flux density.void
fix
(double measuredBx, double measuredBy, double measuredBz, double biasX, double biasY, double biasZ, com.irurueta.algebra.Matrix crossCouplingErrors, double[] result) Fixes provided measured body magnetic flux density values by undoing the errors introduced by the magnetometer model to restore the true body magnetic flux density.void
fix
(double measuredBx, double measuredBy, double measuredBz, double biasX, double biasY, double biasZ, com.irurueta.algebra.Matrix crossCouplingErrors, com.irurueta.algebra.Matrix result) Fixes provided measured body magnetic flux density values by undoing the errors introduced by the magnetometer model to restore the true body magnetic flux density.void
fix
(double measuredBx, double measuredBy, double measuredBz, com.irurueta.algebra.Matrix result) Fixes provided measured body magnetic flux density values by undoing the errors introduced by the magnetometer model to restore the true body magnetic flux density.void
fix
(com.irurueta.algebra.Matrix measuredB, double[] result) Fixes provided measured body magnetic flux density values by undoing the errors introduced by the magnetometer model to restore the true body magnetic flux density.void
fix
(com.irurueta.algebra.Matrix measuredB, com.irurueta.algebra.Matrix result) Fixes provided measured body magnetic flux density values by undoing the errors introduced by the magnetometer model to restore the true body magnetic flux density.void
fix
(com.irurueta.algebra.Matrix measuredB, com.irurueta.algebra.Matrix bias, com.irurueta.algebra.Matrix crossCouplingErrors, double[] result) Fixes provided measured body magnetic flux density values by undoing the errors introduced by the magnetometer model to restore the true body magnetic flux density.void
fix
(com.irurueta.algebra.Matrix measuredB, com.irurueta.algebra.Matrix bias, com.irurueta.algebra.Matrix crossCouplingErrors, com.irurueta.algebra.Matrix result) Fixes provided measured body magnetic flux density values by undoing the errors introduced by the magnetometer model to restore the true body magnetic flux density.void
fix
(BodyMagneticFluxDensity measuredB, double[] result) Fixes provided measured body magnetic flux density values by undoing the errors introduced by the magnetometer model to restore the true body magnetic flux density.void
fix
(BodyMagneticFluxDensity measuredB, com.irurueta.algebra.Matrix result) Fixes provided measured body magnetic flux density values by undoing the errors introduced by the magnetometer model to restore the true body magnetic flux density.void
fix
(BodyMagneticFluxDensity measuredB, BodyMagneticFluxDensity result) Fixes provided measured body magnetic flux density values by undoing the errors introduced by the magnetometer model to restore the true body magnetic flux density.void
fix
(MagneticFluxDensityTriad measuredB, double[] result) Fixes provided measured body magnetic flux density values by undoing the errors introduced by the magnetometer model to restore the true body magnetic flux density.void
fix
(MagneticFluxDensityTriad measuredB, com.irurueta.algebra.Matrix result) Fixes provided measured body magnetic flux density values by undoing the errors introduced by the magnetometer model to restore the true body magnetic flux density.void
fix
(MagneticFluxDensityTriad measuredB, MagneticFluxDensityTriad result) Fixes provided measured body magnetic flux density values by undoing the errors introduced by the magnetometer model to restore the true body magnetic flux density.void
fix
(com.irurueta.units.MagneticFluxDensity measuredBx, com.irurueta.units.MagneticFluxDensity measuredBy, com.irurueta.units.MagneticFluxDensity measuredBz, BodyMagneticFluxDensity result) Fixes provided measured body magnetic flux density values by undoing the errors introduced by the magnetometer model to restore the true body magnetic flux density.void
fix
(com.irurueta.units.MagneticFluxDensity measuredBx, com.irurueta.units.MagneticFluxDensity measuredBy, com.irurueta.units.MagneticFluxDensity measuredBz, MagneticFluxDensityTriad result) Fixes provided measured body magnetic flux density values by undoing the errors introduced by the magnetometer model to restore the true body magnetic flux density.double[]
fixAndReturnNew
(double[] measuredB) Fixes provided measured body magnetic flux density values by undoing the errors introduced by the magnetometer model to restore the true body magnetic flux density.double[]
fixAndReturnNew
(double[] measuredB, com.irurueta.algebra.Matrix bias, com.irurueta.algebra.Matrix crossCouplingErrors) Fixes provided measured body magnetic flux density values by undoing the errors introduced by the magnetometer model to restore the true body magnetic flux density.double[]
fixAndReturnNew
(double measuredBx, double measuredBy, double measuredBz) Fixes provided measured body magnetic flux density values by undoing the errors introduced by the magnetometer model to restore the true body magnetic flux density.double[]
fixAndReturnNew
(double measuredBx, double measuredBy, double measuredBz, double biasX, double biasY, double biasZ, double sx, double sy, double sz, double mxy, double mxz, double myx, double myz, double mzx, double mzy) Fixes provided measured body magnetic flux density values by undoing the errors introduced by the magnetometer model to restore the true body magnetic flux density.double[]
fixAndReturnNew
(double measuredBx, double measuredBy, double measuredBz, double biasX, double biasY, double biasZ, com.irurueta.algebra.Matrix crossCouplingErrors) Fixes provided measured body magnetic flux density values by undoing the errors introduced by the magnetometer model to restore the true body magnetic flux density.double[]
fixAndReturnNew
(com.irurueta.algebra.Matrix measuredB) Fixes provided measured body magnetic flux density values by undoing the errors introduced by the magnetometer model to restore the true body magnetic flux density.double[]
fixAndReturnNew
(com.irurueta.algebra.Matrix measuredB, com.irurueta.algebra.Matrix bias, com.irurueta.algebra.Matrix crossCouplingErrors) Fixes provided measured body magnetic flux density values by undoing the errors introduced by the magnetometer model to restore the true body magnetic flux density.fixAndReturnNew
(MagneticFluxDensityTriad measuredB) Fixes provided measured body magnetic flux density values by undoing the errors introduced by the magnetometer model to restore the true body magnetic flux density.fixAndReturnNew
(com.irurueta.units.MagneticFluxDensity measuredBx, com.irurueta.units.MagneticFluxDensity measuredBy, com.irurueta.units.MagneticFluxDensity measuredBz) Fixes provided measured body magnetic flux density values by undoing the errors introduced by the magnetometer model to restore the true body magnetic flux density.com.irurueta.algebra.Matrix
fixAndReturnNewMatrix
(double measuredBx, double measuredBy, double measuredBz) Fixes provided measured body magnetic flux density values by undoing the errors introduced by the magnetometer model to restore the true body magnetic flux density.com.irurueta.algebra.Matrix
fixAndReturnNewMatrix
(double measuredBx, double measuredBy, double measuredBz, double biasX, double biasY, double biasZ, double sx, double sy, double sz, double mxy, double mxz, double myx, double myz, double mzx, double mzy) Fixes provided measured body magnetic flux density values by undoing the errors introduced by the magnetometer model to restore the true body magnetic flux density.com.irurueta.algebra.Matrix
fixAndReturnNewMatrix
(double measuredBx, double measuredBy, double measuredBz, double biasX, double biasY, double biasZ, com.irurueta.algebra.Matrix crossCouplingErrors) Fixes provided measured body magnetic flux density values by undoing the errors introduced by the magnetometer model to restore the true body magnetic flux density.com.irurueta.algebra.Matrix
fixAndReturnNewMatrix
(com.irurueta.algebra.Matrix measuredB) Fixes provided measured body magnetic flux density values by undoing the errors introduced by the magnetometer model to restore the true body magnetic flux density.com.irurueta.algebra.Matrix
fixAndReturnNewMatrix
(com.irurueta.algebra.Matrix measuredB, com.irurueta.algebra.Matrix bias, com.irurueta.algebra.Matrix crossCouplingErrors) Fixes provided measured body magnetic flux density values by undoing the errors introduced by the magnetometer model to restore the true body magnetic flux density.com.irurueta.algebra.Matrix
getBias()
Gets bias values expressed in Teslas (T).void
getBias
(com.irurueta.algebra.Matrix result) Gets bias values expressed in Teslas (T).double[]
Gets bias values expressed in Teslas (T).void
getBiasArray
(double[] result) Gets bias values expressed in Teslas (T).Gets bias.void
Gets bias.Gets bias.void
Gets bias.double
getBiasX()
Gets x-coordinate of bias expressed in Teslas (T).com.irurueta.units.MagneticFluxDensity
Gets x-coordinate of bias.void
getBiasXAsMagneticFluxDensity
(com.irurueta.units.MagneticFluxDensity result) Gets x-coordinate of bias.double
getBiasY()
Gets y-coordinate of bias expressed in Teslas (T).com.irurueta.units.MagneticFluxDensity
Gets y-coordinate of bias.void
getBiasYAsMagneticFluxDensity
(com.irurueta.units.MagneticFluxDensity result) Gets y-coordinate of bias.double
getBiasZ()
Gets z-coordinate of bias expressed in Teslas (T).com.irurueta.units.MagneticFluxDensity
Gets z-coordinate of bias.void
getBiasZAsMagneticFluxDensity
(com.irurueta.units.MagneticFluxDensity result) Gets z-coordinate of bias.com.irurueta.algebra.Matrix
Gets cross coupling errors matrix.void
getCrossCouplingErrors
(com.irurueta.algebra.Matrix result) Gets cross coupling errors matrix.double
getMxy()
Gets x-y cross coupling error.double
getMxz()
Gets x-z cross coupling error.double
getMyx()
Gets y-x cross coupling error.double
getMyz()
Gets y-z cross coupling error.double
getMzx()
Gets z-x cross coupling error.double
getMzy()
Gets z-y cross coupling error.double
getSx()
Gets x scaling factor.double
getSy()
Gets y scaling factor.double
getSz()
Gets z scaling factor.void
setBias
(double[] bias) Sets bias values expressed in Teslas (T).void
setBias
(double biasX, double biasY, double biasZ) Sets coordinates of bias expressed in Teslas (T).void
setBias
(com.irurueta.algebra.Matrix bias) Sets bias values expressed in Teslas (T).void
Sets bias.void
Sets bias.void
setBias
(com.irurueta.units.MagneticFluxDensity biasX, com.irurueta.units.MagneticFluxDensity biasY, com.irurueta.units.MagneticFluxDensity biasZ) Sets coordinates of bias.void
setBiasX
(double biasX) Sets x-coordinate of bias expressed in Teslas (T).void
setBiasX
(com.irurueta.units.MagneticFluxDensity biasX) Sets x-coordinate of bias.void
setBiasY
(double biasY) Sets y-coordinate of bias expressed in Teslas (T).void
setBiasY
(com.irurueta.units.MagneticFluxDensity biasY) Sets y-coordinate of bias.void
setBiasZ
(double biasZ) Sets z-coordinate of bias expressed in Teslas (T).void
setBiasZ
(com.irurueta.units.MagneticFluxDensity biasZ) Sets z-coordinate of bias.void
setCrossCouplingErrors
(double mxy, double mxz, double myx, double myz, double mzx, double mzy) Sets cross coupling errors.void
setCrossCouplingErrors
(com.irurueta.algebra.Matrix crossCouplingErrors) Sets cross coupling errors matrix.void
setMxy
(double mxy) Sets x-y cross coupling error.void
setMxz
(double mxz) Sets x-z cross coupling error.void
setMyx
(double myx) Sets y-x cross coupling error.void
setMyz
(double myz) Sets y-z cross coupling error.void
setMzx
(double mzx) Sets z-x cross coupling error.void
setMzy
(double mzy) Sets z-y cross coupling error.void
setScalingFactors
(double sx, double sy, double sz) Sets scaling factors.void
setScalingFactorsAndCrossCouplingErrors
(double sx, double sy, double sz, double mxy, double mxz, double myx, double myz, double mzx, double mzy) Sets scaling factors and cross coupling errors.void
setSx
(double sx) Sets x scaling factorvoid
setSy
(double sy) Sets y scaling factor.void
setSz
(double sz) Sets z scaling factor.
-
Field Details
-
identity
private com.irurueta.algebra.Matrix identityIdentity matrix to be reused. -
tmp1
private com.irurueta.algebra.Matrix tmp1Temporary matrix to be reused. -
tmp2
private com.irurueta.algebra.Matrix tmp2Temporary matrix to be reused. -
diff
private com.irurueta.algebra.Matrix diffTemporary matrix to be reused. -
tmp3
private com.irurueta.algebra.Matrix tmp3Temporary matrix to be reused. -
measuredB
private final double[] measuredBMeasured specific force array to be reused. -
res
private final double[] resArray containing result values to be reused. -
bias
private com.irurueta.algebra.Matrix biasBias matrix to be reused. -
crossCouplingErrors
private com.irurueta.algebra.Matrix crossCouplingErrorsCross coupling errors matrix to be reused.
-
-
Constructor Details
-
MagneticFluxDensityFixer
public MagneticFluxDensityFixer()Constructor.
-
-
Method Details
-
getBias
public com.irurueta.algebra.Matrix getBias()Gets bias values expressed in Teslas (T).- Returns:
- bias values expressed in Teslas.
-
getBias
public void getBias(com.irurueta.algebra.Matrix result) Gets bias values expressed in Teslas (T).- Parameters:
result
- instance where result will be stored.
-
setBias
public void setBias(com.irurueta.algebra.Matrix bias) Sets bias values expressed in Teslas (T).- Parameters:
bias
- bias values expressed in Teslas. Must be 3x1.
-
getBiasArray
public double[] getBiasArray()Gets bias values expressed in Teslas (T).- Returns:
- bias values expressed in Teslas.
-
getBiasArray
public void getBiasArray(double[] result) Gets bias values expressed in Teslas (T).- Parameters:
result
- instance where result data will be stored.- Throws:
IllegalArgumentException
- if provided array does not have length 3.
-
setBias
public void setBias(double[] bias) Sets bias values expressed in Teslas (T).- Parameters:
bias
- bias values expressed in Teslas (T). Must have length 3.- Throws:
IllegalArgumentException
- if provided array does not have length 3.
-
getBiasAsBodyMagneticFluxDensity
Gets bias.- Returns:
- bias.
-
getBiasAsTriad
Gets bias.- Returns:
- bias.
-
getBiasX
public double getBiasX()Gets x-coordinate of bias expressed in Teslas (T).- Returns:
- x-coordinate of bias expressed in Teslas (T).
-
setBiasX
public void setBiasX(double biasX) Sets x-coordinate of bias expressed in Teslas (T).- Parameters:
biasX
- x-coordinate of bias expressed in Teslas (T).
-
getBiasY
public double getBiasY()Gets y-coordinate of bias expressed in Teslas (T).- Returns:
- y-coordinate of bias expressed in Teslas (T).
-
setBiasY
public void setBiasY(double biasY) Sets y-coordinate of bias expressed in Teslas (T).- Parameters:
biasY
- y-coordinate of bias expressed in Teslas (T).
-
getBiasZ
public double getBiasZ()Gets z-coordinate of bias expressed in Teslas (T).- Returns:
- z-coordinate of bias expressed in Teslas (T).
-
setBiasZ
public void setBiasZ(double biasZ) Sets z-coordinate of bias expressed in Teslas (T).- Parameters:
biasZ
- z-coordinate of bias expressed in Teslas (T).
-
setBias
public void setBias(double biasX, double biasY, double biasZ) Sets coordinates of bias expressed in Teslas (T).- Parameters:
biasX
- x-coordinate of bias.biasY
- y-coordinate of bias.biasZ
- z-coordinate of bias.
-
getBiasXAsMagneticFluxDensity
public com.irurueta.units.MagneticFluxDensity getBiasXAsMagneticFluxDensity()Gets x-coordinate of bias.- Returns:
- x-coordinate of bias.
-
getBiasXAsMagneticFluxDensity
public void getBiasXAsMagneticFluxDensity(com.irurueta.units.MagneticFluxDensity result) Gets x-coordinate of bias.- Parameters:
result
- instance where result will be stored.
-
setBiasX
public void setBiasX(com.irurueta.units.MagneticFluxDensity biasX) Sets x-coordinate of bias.- Parameters:
biasX
- x-coordinate of bias.
-
getBiasYAsMagneticFluxDensity
public com.irurueta.units.MagneticFluxDensity getBiasYAsMagneticFluxDensity()Gets y-coordinate of bias.- Returns:
- y-coordinate of bias.
-
getBiasYAsMagneticFluxDensity
public void getBiasYAsMagneticFluxDensity(com.irurueta.units.MagneticFluxDensity result) Gets y-coordinate of bias.- Parameters:
result
- instance where result will be stored.
-
setBiasY
public void setBiasY(com.irurueta.units.MagneticFluxDensity biasY) Sets y-coordinate of bias.- Parameters:
biasY
- y-coordinate of bias.
-
getBiasZAsMagneticFluxDensity
public com.irurueta.units.MagneticFluxDensity getBiasZAsMagneticFluxDensity()Gets z-coordinate of bias.- Returns:
- z-coordinate of bias.
-
getBiasZAsMagneticFluxDensity
public void getBiasZAsMagneticFluxDensity(com.irurueta.units.MagneticFluxDensity result) Gets z-coordinate of bias.- Parameters:
result
- instance where result will be stored.
-
setBiasZ
public void setBiasZ(com.irurueta.units.MagneticFluxDensity biasZ) Sets z-coordinate of bias.- Parameters:
biasZ
- z-coordinate of bias.
-
setBias
public void setBias(com.irurueta.units.MagneticFluxDensity biasX, com.irurueta.units.MagneticFluxDensity biasY, com.irurueta.units.MagneticFluxDensity biasZ) Sets coordinates of bias.- Parameters:
biasX
- x-coordinate of bias.biasY
- y-coordinate of bias.biasZ
- z-coordinate of bias.
-
getCrossCouplingErrors
public com.irurueta.algebra.Matrix getCrossCouplingErrors()Gets cross coupling errors matrix.- Returns:
- cross coupling errors matrix.
-
getCrossCouplingErrors
public void getCrossCouplingErrors(com.irurueta.algebra.Matrix result) Gets cross coupling errors matrix.- Parameters:
result
- instance where result will be stored.
-
setCrossCouplingErrors
public void setCrossCouplingErrors(com.irurueta.algebra.Matrix crossCouplingErrors) throws com.irurueta.algebra.AlgebraException Sets cross coupling errors matrix.- Parameters:
crossCouplingErrors
- cross coupling errors matrix. Must be 3x3.- Throws:
com.irurueta.algebra.AlgebraException
- if provided matrix cannot be inverted.IllegalArgumentException
- if provided matrix is not 3x3.
-
getSx
public double getSx()Gets x scaling factor.- Returns:
- x scaling factor.
-
setSx
public void setSx(double sx) throws com.irurueta.algebra.AlgebraException Sets x scaling factor- Parameters:
sx
- x scaling factor.- Throws:
com.irurueta.algebra.AlgebraException
- if provided value makes cross coupling matrix non-invertible.
-
getSy
public double getSy()Gets y scaling factor.- Returns:
- y scaling factor.
-
setSy
public void setSy(double sy) throws com.irurueta.algebra.AlgebraException Sets y scaling factor.- Parameters:
sy
- y scaling factor.- Throws:
com.irurueta.algebra.AlgebraException
- if provided value makes cross coupling matrix non-invertible.
-
getSz
public double getSz()Gets z scaling factor.- Returns:
- z scaling factor.
-
setSz
public void setSz(double sz) throws com.irurueta.algebra.AlgebraException Sets z scaling factor.- Parameters:
sz
- z scaling factor.- Throws:
com.irurueta.algebra.AlgebraException
- if provided value makes cross coupling matrix non-invertible.
-
getMxy
public double getMxy()Gets x-y cross coupling error.- Returns:
- x-y cross coupling error.
-
setMxy
public void setMxy(double mxy) throws com.irurueta.algebra.AlgebraException Sets x-y cross coupling error.- Parameters:
mxy
- x-y cross coupling error.- Throws:
com.irurueta.algebra.AlgebraException
- if provided value makes cross coupling matrix non-invertible.
-
getMxz
public double getMxz()Gets x-z cross coupling error.- Returns:
- x-z cross coupling error.
-
setMxz
public void setMxz(double mxz) throws com.irurueta.algebra.AlgebraException Sets x-z cross coupling error.- Parameters:
mxz
- x-z cross coupling error.- Throws:
com.irurueta.algebra.AlgebraException
- if provided value makes cross coupling matrix non-invertible.
-
getMyx
public double getMyx()Gets y-x cross coupling error.- Returns:
- y-x cross coupling error.
-
setMyx
public void setMyx(double myx) throws com.irurueta.algebra.AlgebraException Sets y-x cross coupling error.- Parameters:
myx
- y-x cross coupling error.- Throws:
com.irurueta.algebra.AlgebraException
- if provided value makes cross coupling matrix non-invertible.
-
getMyz
public double getMyz()Gets y-z cross coupling error.- Returns:
- y-z cross coupling error.
-
setMyz
public void setMyz(double myz) throws com.irurueta.algebra.AlgebraException Sets y-z cross coupling error.- Parameters:
myz
- y-z cross coupling error.- Throws:
com.irurueta.algebra.AlgebraException
- if provided value makes cross coupling matrix non-invertible.
-
getMzx
public double getMzx()Gets z-x cross coupling error.- Returns:
- z-x cross coupling error.
-
setMzx
public void setMzx(double mzx) throws com.irurueta.algebra.AlgebraException Sets z-x cross coupling error.- Parameters:
mzx
- z-x cross coupling error.- Throws:
com.irurueta.algebra.AlgebraException
- if provided value makes cross coupling matrix non-invertible.
-
getMzy
public double getMzy()Gets z-y cross coupling error.- Returns:
- z-y cross coupling error.
-
setMzy
public void setMzy(double mzy) throws com.irurueta.algebra.AlgebraException Sets z-y cross coupling error.- Parameters:
mzy
- z-y cross coupling error.- Throws:
com.irurueta.algebra.AlgebraException
- if provided value makes cross coupling matrix non-invertible.
-
setScalingFactors
public void setScalingFactors(double sx, double sy, double sz) throws com.irurueta.algebra.AlgebraException Sets scaling factors.- Parameters:
sx
- x scaling factor.sy
- y scaling factor.sz
- z scaling factor.- Throws:
com.irurueta.algebra.AlgebraException
- if provided values make cross coupling matrix non-invertible.
-
setCrossCouplingErrors
public void setCrossCouplingErrors(double mxy, double mxz, double myx, double myz, double mzx, double mzy) throws com.irurueta.algebra.AlgebraException Sets cross coupling errors.- Parameters:
mxy
- x-y cross coupling error.mxz
- x-z cross coupling error.myx
- y-x cross coupling error.myz
- y-z cross coupling error.mzx
- z-x cross coupling error.mzy
- z-y cross coupling error.- Throws:
com.irurueta.algebra.AlgebraException
- if provided values make cross coupling matrix non-invertible.
-
setScalingFactorsAndCrossCouplingErrors
public void setScalingFactorsAndCrossCouplingErrors(double sx, double sy, double sz, double mxy, double mxz, double myx, double myz, double mzx, double mzy) throws com.irurueta.algebra.AlgebraException Sets scaling factors and cross coupling errors.- Parameters:
sx
- x scaling factor.sy
- y scaling factor.sz
- z scaling factor.mxy
- x-y cross coupling error.mxz
- x-z cross coupling error.myx
- y-x cross coupling error.myz
- y-z cross coupling error.mzx
- z-x cross coupling error.mzy
- z-y cross coupling error.- Throws:
com.irurueta.algebra.AlgebraException
- if provided values make cross coupling matrix non-invertible.
-
fix
public void fix(double[] measuredB, double[] result) throws com.irurueta.algebra.AlgebraException Fixes provided measured body magnetic flux density values by undoing the errors introduced by the magnetometer model to restore the true body magnetic flux density. This method uses last provided bias and cross coupling errors.- Parameters:
measuredB
- measured magnetic flux density expressed in Teslas (T). Must have length 3.result
- instance where restored true magnetic flux density will be stored. Must have length 3.- Throws:
com.irurueta.algebra.AlgebraException
- if there are numerical instabilities.IllegalArgumentException
- if any of the provided parameters does not have proper size.
-
fix
public void fix(com.irurueta.algebra.Matrix measuredB, double[] result) throws com.irurueta.algebra.AlgebraException Fixes provided measured body magnetic flux density values by undoing the errors introduced by the magnetometer model to restore the true body magnetic flux density. This method uses last provided bias and cross coupling errors.- Parameters:
measuredB
- measured magnetic flux density expressed in Teslas (T). Must be 3x1.result
- instance where restored true magnetic flux density will be stored. Must have length 3.- Throws:
com.irurueta.algebra.AlgebraException
- if there are numerical instabilities.IllegalArgumentException
- if any of the provided parameters does not have proper size.
-
fix
public void fix(com.irurueta.algebra.Matrix measuredB, com.irurueta.algebra.Matrix result) throws com.irurueta.algebra.AlgebraException Fixes provided measured body magnetic flux density values by undoing the errors introduced by the magnetometer model to restore the true body magnetic flux density. This method uses last provided bias and cross coupling errors.- Parameters:
measuredB
- measured magnetic flux density expressed in Teslas (T). Must be 3x1.result
- instance where restored true magnetic flux density will be stored. Must be 3x1.- Throws:
com.irurueta.algebra.AlgebraException
- if there are numerical instabilities.IllegalArgumentException
- if any of the provided parameters does not have proper size.
-
fix
public void fix(double measuredBx, double measuredBy, double measuredBz, double[] result) throws com.irurueta.algebra.AlgebraException Fixes provided measured body magnetic flux density values by undoing the errors introduced by the magnetometer model to restore the true body magnetic flux density. This method uses last provided bias and cross coupling errors.- Parameters:
measuredBx
- x-coordinate of measured magnetic flux density expressed in Teslas (T).measuredBy
- y-coordinate of measured magnetic flux density expressed in Teslas (T).measuredBz
- z-coordinate of measured magnetic flux density expressed in Teslas (T).result
- instance where restored true magnetic flux density will be stored. Must have length 3.- Throws:
com.irurueta.algebra.AlgebraException
- if there are numerical instabilities.IllegalArgumentException
- if provided result array does not have length 3.
-
fix
public void fix(double measuredBx, double measuredBy, double measuredBz, com.irurueta.algebra.Matrix result) throws com.irurueta.algebra.AlgebraException Fixes provided measured body magnetic flux density values by undoing the errors introduced by the magnetometer model to restore the true body magnetic flux density. This method uses last provided bias and cross coupling errors.- Parameters:
measuredBx
- x-coordinate of measured magnetic flux density expressed in Teslas (T).measuredBy
- y-coordinate of measured magnetic flux density expressed in Teslas (T).measuredBz
- z-coordinate of measured magnetic flux density expressed in Teslas (T).result
- instance where restored true magnetic flux density will be stored. Must be 3x1.- Throws:
com.irurueta.algebra.AlgebraException
- if there are numerical instabilities.IllegalArgumentException
- if provided result matrix is not 3x1.
-
fix
public void fix(double[] measuredB, com.irurueta.algebra.Matrix bias, com.irurueta.algebra.Matrix crossCouplingErrors, double[] result) throws com.irurueta.algebra.AlgebraException Fixes provided measured body magnetic flux density values by undoing the errors introduced by the magnetometer model to restore the true body magnetic flux density. This method uses last provided bias and cross coupling errors.- Parameters:
measuredB
- measured magnetic flux density expressed in Teslas (T). Must have length 3.bias
- bias values expressed in Teslas (T). Must be 3x1.crossCouplingErrors
- cross coupling errors matrix. Must be 3x3.result
- instance where restored true specific force will be stored. Must have length 3.- Throws:
com.irurueta.algebra.AlgebraException
- if there are numerical instabilities.IllegalArgumentException
- if any of the provided parameters does not have proper size.
-
fix
public void fix(com.irurueta.algebra.Matrix measuredB, com.irurueta.algebra.Matrix bias, com.irurueta.algebra.Matrix crossCouplingErrors, double[] result) throws com.irurueta.algebra.AlgebraException Fixes provided measured body magnetic flux density values by undoing the errors introduced by the magnetometer model to restore the true body magnetic flux density. This method uses last provided bias and cross coupling errors.- Parameters:
measuredB
- measured magnetic flux density expressed in Teslas (T). Must be 3x1.bias
- bias values expressed in Teslas (T). Must be 3x1.crossCouplingErrors
- cross coupling errors matrix. Must be 3x3.result
- instance where restored true specific force will be stored. Must have length 3.- Throws:
com.irurueta.algebra.AlgebraException
- if there are numerical instabilities.IllegalArgumentException
- if any of the provided parameters does not have proper size.
-
fix
public void fix(com.irurueta.algebra.Matrix measuredB, com.irurueta.algebra.Matrix bias, com.irurueta.algebra.Matrix crossCouplingErrors, com.irurueta.algebra.Matrix result) throws com.irurueta.algebra.AlgebraException Fixes provided measured body magnetic flux density values by undoing the errors introduced by the magnetometer model to restore the true body magnetic flux density. This method uses last provided bias and cross coupling errors.- Parameters:
measuredB
- measured magnetic flux density expressed in Teslas (T). Must be 3x1.bias
- bias values expressed in Teslas (T). Must be 3x1.crossCouplingErrors
- cross coupling errors matrix. Must be 3x3.result
- instance where restored true specific force will be stored. Must be 3x1.- Throws:
com.irurueta.algebra.AlgebraException
- if there are numerical instabilities.IllegalArgumentException
- if any of the provided parameters does not have proper size.
-
fix
public void fix(double measuredBx, double measuredBy, double measuredBz, double biasX, double biasY, double biasZ, com.irurueta.algebra.Matrix crossCouplingErrors, double[] result) throws com.irurueta.algebra.AlgebraException Fixes provided measured body magnetic flux density values by undoing the errors introduced by the magnetometer model to restore the true body magnetic flux density. This method uses last provided bias and cross coupling errors.- Parameters:
measuredBx
- x-coordinate of measured magnetic flux density expressed in Teslas (T).measuredBy
- y-coordinate of measured magnetic flux density expressed in Teslas (T).measuredBz
- z-coordinate of measured magnetic flux density expressed in Teslas (T).biasX
- x-coordinate of bias expressed in Teslas (T).biasY
- y-coordinate of bias expressed in Teslas (T).biasZ
- z-coordinate of bias expressed in Teslas (T).crossCouplingErrors
- cross-coupling errors matrix. Must be 3x3.result
- instance where restored true magnetic flux density will be stored. Must have length 3.- Throws:
com.irurueta.algebra.AlgebraException
- if there are numerical instabilities.IllegalArgumentException
- if any of the provided parameters does not have proper size.
-
fix
public void fix(double measuredBx, double measuredBy, double measuredBz, double biasX, double biasY, double biasZ, com.irurueta.algebra.Matrix crossCouplingErrors, com.irurueta.algebra.Matrix result) throws com.irurueta.algebra.AlgebraException Fixes provided measured body magnetic flux density values by undoing the errors introduced by the magnetometer model to restore the true body magnetic flux density. This method uses last provided bias and cross coupling errors.- Parameters:
measuredBx
- x-coordinate of measured magnetic flux density expressed in Teslas (T).measuredBy
- y-coordinate of measured magnetic flux density expressed in Teslas (T).measuredBz
- z-coordinate of measured magnetic flux density expressed in Teslas (T).biasX
- x-coordinate of bias expressed in Teslas (T).biasY
- y-coordinate of bias expressed in Teslas (T).biasZ
- z-coordinate of bias expressed in Teslas (T).crossCouplingErrors
- cross-coupling errors matrix. Must be 3x3.result
- instance where restored true magnetic flux density will be stored. Must be 3x1.- Throws:
com.irurueta.algebra.AlgebraException
- if there are numerical instabilities.IllegalArgumentException
- if any of the provided parameters does not have proper size.
-
fix
public void fix(double measuredBx, double measuredBy, double measuredBz, double biasX, double biasY, double biasZ, double sx, double sy, double sz, double mxy, double mxz, double myx, double myz, double mzx, double mzy, double[] result) throws com.irurueta.algebra.AlgebraException Fixes provided measured body magnetic flux density values by undoing the errors introduced by the magnetometer model to restore the true body magnetic flux density. This method uses last provided bias and cross coupling errors.- Parameters:
measuredBx
- x-coordinate of measured magnetic flux density expressed in Teslas (T).measuredBy
- y-coordinate of measured magnetic flux density expressed in Teslas (T).measuredBz
- z-coordinate of measured magnetic flux density expressed in Teslas (T).biasX
- x-coordinate of bias expressed in Teslas (T).biasY
- y-coordinate of bias expressed in Teslas (T).biasZ
- z-coordinate of bias expressed in Teslas (T).sx
- x scaling factor.sy
- y scaling factor.sz
- z scaling factor.mxy
- x-y cross coupling error.mxz
- x-z cross coupling error.myx
- y-x cross coupling error.myz
- y-z cross coupling error.mzx
- z-x cross coupling error.mzy
- z-y cross coupling error.result
- instance where restored true magnetic flux density will be stored. Must have length 3.- Throws:
com.irurueta.algebra.AlgebraException
- if there are numerical instabilities.IllegalArgumentException
- if result does not have length 3.
-
fix
public void fix(double measuredBx, double measuredBy, double measuredBz, double biasX, double biasY, double biasZ, double sx, double sy, double sz, double mxy, double mxz, double myx, double myz, double mzx, double mzy, com.irurueta.algebra.Matrix result) throws com.irurueta.algebra.AlgebraException Fixes provided measured body magnetic flux density values by undoing the errors introduced by the magnetometer model to restore the true body magnetic flux density. This method uses last provided bias and cross coupling errors.- Parameters:
measuredBx
- x-coordinate of measured magnetic flux density expressed in Teslas (T).measuredBy
- y-coordinate of measured magnetic flux density expressed in Teslas (T).measuredBz
- z-coordinate of measured magnetic flux density expressed in Teslas (T).biasX
- x-coordinate of bias expressed in Teslas (T).biasY
- y-coordinate of bias expressed in Teslas (T).biasZ
- z-coordinate of bias expressed in Teslas (T).sx
- x scaling factor.sy
- y scaling factor.sz
- z scaling factor.mxy
- x-y cross coupling error.mxz
- x-z cross coupling error.myx
- y-x cross coupling error.myz
- y-z cross coupling error.mzx
- z-x cross coupling error.mzy
- z-y cross coupling error.result
- instance where restored true magnetic flux density will be stored. Must be 3x1.- Throws:
com.irurueta.algebra.AlgebraException
- if there are numerical instabilities.IllegalArgumentException
- if result is not 3x1.
-
fixAndReturnNew
public MagneticFluxDensityTriad fixAndReturnNew(com.irurueta.units.MagneticFluxDensity measuredBx, com.irurueta.units.MagneticFluxDensity measuredBy, com.irurueta.units.MagneticFluxDensity measuredBz) throws com.irurueta.algebra.AlgebraException Fixes provided measured body magnetic flux density values by undoing the errors introduced by the magnetometer model to restore the true body magnetic flux density. This method uses last provided bias and cross coupling errors.- Parameters:
measuredBx
- x-coordinate of measured magnetic flux density.measuredBy
- y-coordinate of measured magnetic flux density.measuredBz
- z-coordinate of measured magnetic flux density.- Returns:
- restored true magnetic flux density.
- Throws:
com.irurueta.algebra.AlgebraException
- if there are numerical instabilities.
-
fixAndReturnNew
public double[] fixAndReturnNew(double[] measuredB) throws com.irurueta.algebra.AlgebraException Fixes provided measured body magnetic flux density values by undoing the errors introduced by the magnetometer model to restore the true body magnetic flux density. This method uses last provided bias and cross coupling errors.- Parameters:
measuredB
- measured magnetic flux density expressed in Teslas (T). Must have length 3.- Returns:
- restored true magnetic flux density.
- Throws:
com.irurueta.algebra.AlgebraException
- if there are numerical instabilities.IllegalArgumentException
- if provided array does not have length 3.
-
fixAndReturnNew
public double[] fixAndReturnNew(com.irurueta.algebra.Matrix measuredB) throws com.irurueta.algebra.AlgebraException Fixes provided measured body magnetic flux density values by undoing the errors introduced by the magnetometer model to restore the true body magnetic flux density. This method uses last provided bias and cross coupling errors.- Parameters:
measuredB
- measured magnetic flux density expressed in Teslas (T). Must be 3x1.- Returns:
- restored true magnetic flux density.
- Throws:
com.irurueta.algebra.AlgebraException
- if there are numerical instabilities.IllegalArgumentException
- if provided matrix is not 3x1.
-
fixAndReturnNewMatrix
public com.irurueta.algebra.Matrix fixAndReturnNewMatrix(com.irurueta.algebra.Matrix measuredB) throws com.irurueta.algebra.AlgebraException Fixes provided measured body magnetic flux density values by undoing the errors introduced by the magnetometer model to restore the true body magnetic flux density. This method uses last provided bias and cross coupling errors.- Parameters:
measuredB
- measured magnetic flux density expressed in Teslas (T). Must be 3x1.- Returns:
- restored true magnetic flux density.
- Throws:
com.irurueta.algebra.AlgebraException
- if there are numerical instabilities.IllegalArgumentException
- if provided matrix is not 3x1.
-
fixAndReturnNew
public double[] fixAndReturnNew(double measuredBx, double measuredBy, double measuredBz) throws com.irurueta.algebra.AlgebraException Fixes provided measured body magnetic flux density values by undoing the errors introduced by the magnetometer model to restore the true body magnetic flux density. This method uses last provided bias and cross coupling errors.- Parameters:
measuredBx
- x-coordinate of measured magnetic flux density expressed in Teslas (T).measuredBy
- y-coordinate of measured magnetic flux density expressed in Teslas (T).measuredBz
- z-coordinate of measured magnetic flux density expressed in Teslas (T).- Returns:
- restored true magnetic flux density.
- Throws:
com.irurueta.algebra.AlgebraException
- if there are numerical instabilities.
-
fixAndReturnNewMatrix
public com.irurueta.algebra.Matrix fixAndReturnNewMatrix(double measuredBx, double measuredBy, double measuredBz) throws com.irurueta.algebra.AlgebraException Fixes provided measured body magnetic flux density values by undoing the errors introduced by the magnetometer model to restore the true body magnetic flux density. This method uses last provided bias and cross coupling errors.- Parameters:
measuredBx
- x-coordinate of measured magnetic flux density expressed in Teslas (T).measuredBy
- y-coordinate of measured magnetic flux density expressed in Teslas (T).measuredBz
- z-coordinate of measured magnetic flux density expressed in Teslas (T).- Returns:
- restored true magnetic flux density.
- Throws:
com.irurueta.algebra.AlgebraException
- if there are numerical instabilities.
-
fixAndReturnNew
public double[] fixAndReturnNew(double[] measuredB, com.irurueta.algebra.Matrix bias, com.irurueta.algebra.Matrix crossCouplingErrors) throws com.irurueta.algebra.AlgebraException Fixes provided measured body magnetic flux density values by undoing the errors introduced by the magnetometer model to restore the true body magnetic flux density. This method uses last provided bias and cross coupling errors.- Parameters:
measuredB
- measured magnetic flux density expressed in Teslas (T). Must have length 3.bias
- bias values expressed in Teslas (T). Must be 3x1.crossCouplingErrors
- cross coupling errors matrix. Must be 3x3.- Returns:
- restored true magnetic flux density expressed in Teslas (T).
- Throws:
com.irurueta.algebra.AlgebraException
- if there are numerical instabilities.IllegalArgumentException
- if any of the provided parameters does not have proper size.
-
fixAndReturnNew
public double[] fixAndReturnNew(com.irurueta.algebra.Matrix measuredB, com.irurueta.algebra.Matrix bias, com.irurueta.algebra.Matrix crossCouplingErrors) throws com.irurueta.algebra.AlgebraException Fixes provided measured body magnetic flux density values by undoing the errors introduced by the magnetometer model to restore the true body magnetic flux density. This method uses last provided bias and cross coupling errors.- Parameters:
measuredB
- measured magnetic flux density expressed in Teslas (T). Must be 3x1.bias
- bias values expressed in Teslas (T). Must be 3x1.crossCouplingErrors
- cross coupling errors matrix. Must be 3x3.- Returns:
- restored true magnetic flux density expressed in Teslas (T).
- Throws:
com.irurueta.algebra.AlgebraException
- if there are numerical instabilities.IllegalArgumentException
- if any of the provided parameters does not have proper size.
-
fixAndReturnNewMatrix
public com.irurueta.algebra.Matrix fixAndReturnNewMatrix(com.irurueta.algebra.Matrix measuredB, com.irurueta.algebra.Matrix bias, com.irurueta.algebra.Matrix crossCouplingErrors) throws com.irurueta.algebra.AlgebraException Fixes provided measured body magnetic flux density values by undoing the errors introduced by the magnetometer model to restore the true body magnetic flux density. This method uses last provided bias and cross coupling errors.- Parameters:
measuredB
- measured magnetic flux density expressed in Teslas (T). Must be 3x1.bias
- bias values expressed in Teslas (T). Must be 3x1.crossCouplingErrors
- cross coupling errors matrix. Must be 3x3.- Returns:
- restored true magnetic flux density expressed in Teslas (T).
- Throws:
com.irurueta.algebra.AlgebraException
- if there are numerical instabilities.IllegalArgumentException
- if any of the provided parameters does not have proper size.
-
fixAndReturnNew
public double[] fixAndReturnNew(double measuredBx, double measuredBy, double measuredBz, double biasX, double biasY, double biasZ, com.irurueta.algebra.Matrix crossCouplingErrors) throws com.irurueta.algebra.AlgebraException Fixes provided measured body magnetic flux density values by undoing the errors introduced by the magnetometer model to restore the true body magnetic flux density. This method uses last provided bias and cross coupling errors.- Parameters:
measuredBx
- x-coordinate of measured magnetic flux density expressed in Teslas (T).measuredBy
- y-coordinate of measured magnetic flux density expressed in Teslas (T).measuredBz
- z-coordinate of measured magnetic flux density expressed in Teslas (T).biasX
- x-coordinate of bias expressed in Teslas (T).biasY
- y-coordinate of bias expressed in Teslas (T).biasZ
- z-coordinate of bias expressed in Teslas (T).crossCouplingErrors
- cross coupling errors matrix. Must be 3x3.- Returns:
- restored true magnetic flux density expressed in Teslas (T).
- Throws:
com.irurueta.algebra.AlgebraException
- if there are numerical instabilities.IllegalArgumentException
- if any of the provided parameters does not have proper size.
-
fixAndReturnNewMatrix
public com.irurueta.algebra.Matrix fixAndReturnNewMatrix(double measuredBx, double measuredBy, double measuredBz, double biasX, double biasY, double biasZ, com.irurueta.algebra.Matrix crossCouplingErrors) throws com.irurueta.algebra.AlgebraException Fixes provided measured body magnetic flux density values by undoing the errors introduced by the magnetometer model to restore the true body magnetic flux density. This method uses last provided bias and cross coupling errors.- Parameters:
measuredBx
- x-coordinate of measured magnetic flux density expressed in Teslas (T).measuredBy
- y-coordinate of measured magnetic flux density expressed in Teslas (T).measuredBz
- z-coordinate of measured magnetic flux density expressed in Teslas (T).biasX
- x-coordinate of bias expressed in Teslas (T).biasY
- y-coordinate of bias expressed in Teslas (T).biasZ
- z-coordinate of bias expressed in Teslas (T).crossCouplingErrors
- cross coupling errors matrix. Must be 3x3.- Returns:
- restored true magnetic flux density expressed in Teslas (T).
- Throws:
com.irurueta.algebra.AlgebraException
- if there are numerical instabilities.IllegalArgumentException
- if any of the provided parameters does not have proper size.
-
fixAndReturnNew
public double[] fixAndReturnNew(double measuredBx, double measuredBy, double measuredBz, double biasX, double biasY, double biasZ, double sx, double sy, double sz, double mxy, double mxz, double myx, double myz, double mzx, double mzy) throws com.irurueta.algebra.AlgebraException Fixes provided measured body magnetic flux density values by undoing the errors introduced by the magnetometer model to restore the true body magnetic flux density. This method uses last provided bias and cross coupling errors.- Parameters:
measuredBx
- x-coordinate of measured magnetic flux density expressed in Teslas (T).measuredBy
- y-coordinate of measured magnetic flux density expressed in Teslas (T).measuredBz
- z-coordinate of measured magnetic flux density expressed in Teslas (T).biasX
- x-coordinate of bias expressed in Teslas (T).biasY
- y-coordinate of bias expressed in Teslas (T).biasZ
- z-coordinate of bias expressed in Teslas (T).sx
- x scaling factor.sy
- y scaling factor.sz
- z scaling factor.mxy
- x-y cross coupling error.mxz
- x-z cross coupling error.myx
- y-x cross coupling error.myz
- y-z cross coupling error.mzx
- z-x cross coupling error.mzy
- z-y cross coupling error.- Returns:
- restored true magnetic flux density expressed in Teslas (T).
- Throws:
com.irurueta.algebra.AlgebraException
- if there are numerical instabilities.
-
fixAndReturnNewMatrix
public com.irurueta.algebra.Matrix fixAndReturnNewMatrix(double measuredBx, double measuredBy, double measuredBz, double biasX, double biasY, double biasZ, double sx, double sy, double sz, double mxy, double mxz, double myx, double myz, double mzx, double mzy) throws com.irurueta.algebra.AlgebraException Fixes provided measured body magnetic flux density values by undoing the errors introduced by the magnetometer model to restore the true body magnetic flux density. This method uses last provided bias and cross coupling errors.- Parameters:
measuredBx
- x-coordinate of measured magnetic flux density expressed in Teslas (T).measuredBy
- y-coordinate of measured magnetic flux density expressed in Teslas (T).measuredBz
- z-coordinate of measured magnetic flux density expressed in Teslas (T).biasX
- x-coordinate of bias expressed in Teslas (T).biasY
- y-coordinate of bias expressed in Teslas (T).biasZ
- z-coordinate of bias expressed in Teslas (T).sx
- x scaling factor.sy
- y scaling factor.sz
- z scaling factor.mxy
- x-y cross coupling error.mxz
- x-z cross coupling error.myx
- y-x cross coupling error.myz
- y-z cross coupling error.mzx
- z-x cross coupling error.mzy
- z-y cross coupling error.- Returns:
- restored true magnetic flux density expressed in Teslas (T).
- Throws:
com.irurueta.algebra.AlgebraException
- if there are numerical instabilities.
-
convertMagneticFluxDensity
private static double convertMagneticFluxDensity(double value, com.irurueta.units.MagneticFluxDensityUnit unit) Converts magnetic flux density value and unit to Teslas (T).- Parameters:
value
- value to be converted.unit
- unit of value to be converted.- Returns:
- converted value.
-
convertMagneticFluxDensity
public static double convertMagneticFluxDensity(com.irurueta.units.MagneticFluxDensity b) Converts magnetic flux density to Teslas (T).- Parameters:
b
- magnetic flux density to be converted.- Returns:
- converted value.
-