Class BodyMagneticFluxDensityGenerator

java.lang.Object
com.irurueta.navigation.inertial.calibration.BodyMagneticFluxDensityGenerator

public class BodyMagneticFluxDensityGenerator extends Object
Generates body magnetic flux density instances from true body magnetic flux density values taking into account provided magnetometer errors for a calibrated magnetometer.
  • Constructor Details

    • BodyMagneticFluxDensityGenerator

      private BodyMagneticFluxDensityGenerator()
      Prevents instantiation of utility class.
  • Method Details

    • generate

      public static Collection<BodyMagneticFluxDensity> generate(Collection<BodyMagneticFluxDensity> trueMagneticFluxDensities, double[] magnetometerHardIron, com.irurueta.algebra.Matrix magnetometerSoftIron)
      Generates uncalibrated body magnetic flux densities instances for provided ground-truth body magnetic flux densities.
      Parameters:
      trueMagneticFluxDensities - collection of ground-truth body magnetic flux densities.
      magnetometerHardIron - magnetometer hard-iron biases. Must have length 3.
      magnetometerSoftIron - magnetometer soft-iron and cross-couplings. Must be 3x3.
      Returns:
      collection of generated uncalibrated magnetic flux densities for each provided ground-truth one.
      Throws:
      IllegalArgumentException - if either hard-iron or soft-iron doesn't have proper size.
    • generate

      public static void generate(Collection<BodyMagneticFluxDensity> trueMagneticFluxDensities, double[] magnetometerHardIron, com.irurueta.algebra.Matrix magnetometerSoftIron, Collection<BodyMagneticFluxDensity> result)
      Generates uncalibrated body magnetic flux densities instances for provided ground-truth body magnetic flux densities.
      Parameters:
      trueMagneticFluxDensities - collection of ground-truth body magnetic flux densities.
      magnetometerHardIron - magnetometer hard-iron biases. Must have length 3.
      magnetometerSoftIron - magnetometer soft-iron and cross-couplings. Must be 3x3.
      result - collection where generated uncalibrated magnetic flux densities for each provided ground-truth one will be stored.
      Throws:
      IllegalArgumentException - if either hard-iron or soft-iron doesn't have proper size.
    • generate

      public static BodyMagneticFluxDensity generate(BodyMagneticFluxDensity trueMagneticFluxDensity, double[] magnetometerHardIron, com.irurueta.algebra.Matrix magnetometerSoftIron)
      Generates an uncalibrated body magnetic flux density instance for provided ground-truth body magnetic flux density.
      Parameters:
      trueMagneticFluxDensity - a ground-truth body magnetic flux density.
      magnetometerHardIron - magnetometer hard-iron biases. Must have length 3.
      magnetometerSoftIron - magnetometer soft-iron and cross-couplings. Must be 3x3.
      Returns:
      an uncalibrated magnetic flux density.
      Throws:
      IllegalArgumentException - if either hard-iron or soft-iron doesn't have proper size.
    • generate

      public static void generate(BodyMagneticFluxDensity trueMagneticFluxDensity, double[] magnetometerHardIron, com.irurueta.algebra.Matrix magnetometerSoftIron, BodyMagneticFluxDensity result)
      Generates an uncalibrated body magnetic flux density instance for provided ground-truth body magnetic flux density.
      Parameters:
      trueMagneticFluxDensity - a ground-truth body magnetic flux density.
      magnetometerHardIron - magnetometer hard-iron biases. Must have length 3.
      magnetometerSoftIron - magnetometer soft-iron and cross-couplings. Must be 3x3.
      result - instance where uncalibrated magnetic flux density will be stored.
      Throws:
      IllegalArgumentException - if either hard-iron or soft-iron doesn't have proper size.
    • internalGenerate

      private static void internalGenerate(BodyMagneticFluxDensity trueMagneticFluxDensity, double[] magnetometerHardIron, com.irurueta.algebra.Matrix magnetometerSoftIron, BodyMagneticFluxDensity result, com.irurueta.algebra.Matrix mBtrue, com.irurueta.algebra.Matrix identity, com.irurueta.algebra.Matrix tmp33, com.irurueta.algebra.Matrix tmp31) throws com.irurueta.algebra.WrongSizeException
      Generates an uncalibrated body magnetic flux density instance for provided ground-truth body magnetic flux density.
      Parameters:
      trueMagneticFluxDensity - a ground-truth body magnetic flux density.
      magnetometerHardIron - magnetometer hard-iron biases. Must have length 3.
      magnetometerSoftIron - magnetometer soft-iron and cross-couplings. Must be 3x3.
      result - instance where uncalibrated magnetic flux density will be stored.
      mBtrue - a 3x1 matrix to be reused to store ground-truth body magnetic flux density.
      identity - a 3x3 identity matrix to be reused.
      tmp33 - a 3x3 temporary matrix to be reused.
      tmp31 - a 3x1 temporary matrix to be reused.
      Throws:
      com.irurueta.algebra.WrongSizeException - if any of provided matrices has invalid size.