Class NEDMagneticFluxDensity

java.lang.Object
com.irurueta.navigation.inertial.wmm.NEDMagneticFluxDensity
All Implemented Interfaces:
Serializable, Cloneable

public class NEDMagneticFluxDensity extends Object implements Serializable, Cloneable
Contains magnetic flux density resolved around NED frame.
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private double
    Down component of magnetic flux density expressed in Teslas (T).
    private double
    East component of magnetic flux density expressed in Teslas (T).
    private double
    North component of magnetic flux density expressed in Teslas (T).
    static final int
    Number of components.
    private static final long
    Serialization version.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Constructor.
    NEDMagneticFluxDensity(double bn, double be, double bd)
    Constructor.
    Constructor.
    Constructor.
    NEDMagneticFluxDensity(com.irurueta.units.MagneticFluxDensity bn, com.irurueta.units.MagneticFluxDensity be, com.irurueta.units.MagneticFluxDensity bd)
    Constructor.
  • Method Summary

    Modifier and Type
    Method
    Description
    double[]
    Gets magnetic flux density as an array.
    void
    asArray(double[] result)
    Gets magnetic flux density as an array.
    com.irurueta.algebra.Matrix
    Gets magnetic flux density as a column matrix.
    void
    asMatrix(com.irurueta.algebra.Matrix result)
    Gets magnetic flux density as a column matrix.
    protected Object
    Makes a copy of this instance.
    private double
    convertMagneticFluxDensity(double value, com.irurueta.units.MagneticFluxDensityUnit unit)
    Converts magnetic flux density to Teslas.
    private double
    convertMagneticFluxDensity(com.irurueta.units.MagneticFluxDensity b)
    Converts magnetic flux density to Teslas.
    void
    Copies data of provided instance into this instance.
    void
    Copies this instance data into provided instance.
    boolean
    Checks if provided instance has exactly the same contents as this instance.
    boolean
    equals(NEDMagneticFluxDensity other, double threshold)
    Checks if provided instance has contents similar to this instance up to provided threshold value.
    boolean
    Check if provided object is a NEDMagneticFluxDensity instance having exactly the same contents as this instance.
    double
    Gets down component of magnetic flux density expressed in Teslas (T).
    com.irurueta.units.MagneticFluxDensity
    Gets down component of magnetic flux density.
    void
    getBdAsMagneticFluxDensity(com.irurueta.units.MagneticFluxDensity result)
    Gets down component of magnetic flux density.
    double
    Gets east component of magnetic flux density expressed in Teslas (T).
    com.irurueta.units.MagneticFluxDensity
    Gets east component of magnetic flux density.
    void
    getBeAsMagneticFluxDensity(com.irurueta.units.MagneticFluxDensity result)
    Gets east component of magnetic flux density.
    double
    Gets north component of magnetic flux density expressed in Teslas (T).
    com.irurueta.units.MagneticFluxDensity
    Gets north component of magnetic flux density.
    void
    getBnAsMagneticFluxDensity(com.irurueta.units.MagneticFluxDensity result)
    Gets north component of magnetic flux density.
    Gets NED coordinates of magnetic flux density as a triad.
    void
    Gets NED coordinates of magnetic flux density as a triad.
    double
    Gets magnetic flux density magnitude (e.g. norm) expressed in Teslas (T).
    com.irurueta.units.MagneticFluxDensity
    Gets magnetic flux density magnitude (e.g. norm).
    void
    getNormAsMagneticFluxDensity(com.irurueta.units.MagneticFluxDensity result)
    Gets magnetic flux density magnitude (e.g. norm).
    int
    Computes and returns hash code for this instance.
    void
    setBd(double bd)
    Sets down component of magnetic flux density expressed in Teslas (T).
    void
    setBd(com.irurueta.units.MagneticFluxDensity bd)
    Sets down component of magnetic flux density.
    void
    setBe(double be)
    Sets east component of magnetic flux density expressed in Teslas (T).
    void
    setBe(com.irurueta.units.MagneticFluxDensity be)
    Sets east component of magnetic flux density.
    void
    setBn(double bn)
    Sets north component of magnetic flux density expressed in Teslas (T).
    void
    setBn(com.irurueta.units.MagneticFluxDensity bn)
    Sets north component of magnetic flux density.
    void
    setCoordinates(double bn, double be, double bd)
    Sets NED coordinates of magnetic flux density expressed in Teslas (T).
    void
    Sets NED coordinates of magnetic flux density.
    void
    setCoordinates(com.irurueta.units.MagneticFluxDensity bn, com.irurueta.units.MagneticFluxDensity be, com.irurueta.units.MagneticFluxDensity bd)
    Sets NED coordinates of magnetic flux density.

    Methods inherited from class java.lang.Object

    finalize, getClass, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • COMPONENTS

      public static final int COMPONENTS
      Number of components.
      See Also:
    • serialVersionUID

      private static final long serialVersionUID
      Serialization version. This is used to ensure compatibility of deserialization of permanently stored serialized instances.
      See Also:
    • bn

      private double bn
      North component of magnetic flux density expressed in Teslas (T).
    • be

      private double be
      East component of magnetic flux density expressed in Teslas (T).
    • bd

      private double bd
      Down component of magnetic flux density expressed in Teslas (T).
  • Constructor Details

    • NEDMagneticFluxDensity

      public NEDMagneticFluxDensity()
      Constructor.
    • NEDMagneticFluxDensity

      public NEDMagneticFluxDensity(double bn, double be, double bd)
      Constructor.
      Parameters:
      bn - north component of magnetic flux density expressed in Teslas (T).
      be - east component of magnetic flux density expressed in Teslas (T).
      bd - down component of magnetic flux density expressed in Teslas (T).
    • NEDMagneticFluxDensity

      public NEDMagneticFluxDensity(com.irurueta.units.MagneticFluxDensity bn, com.irurueta.units.MagneticFluxDensity be, com.irurueta.units.MagneticFluxDensity bd)
      Constructor.
      Parameters:
      bn - north component of magnetic flux density.
      be - east component of magnetic flux density.
      bd - down component of magnetic flux density.
    • NEDMagneticFluxDensity

      public NEDMagneticFluxDensity(MagneticFluxDensityTriad triad)
      Constructor.
      Parameters:
      triad - triad containing magnetic flux density values, where x,y,z coordinates correspond to north, east, down coordinates.
    • NEDMagneticFluxDensity

      public NEDMagneticFluxDensity(NEDMagneticFluxDensity input)
      Constructor.
      Parameters:
      input - instance to copy data from.
  • Method Details

    • getBn

      public double getBn()
      Gets north component of magnetic flux density expressed in Teslas (T).
      Returns:
      north component of magnetic flux density.
    • setBn

      public void setBn(double bn)
      Sets north component of magnetic flux density expressed in Teslas (T).
      Parameters:
      bn - north component of magnetic flux density.
    • getBnAsMagneticFluxDensity

      public com.irurueta.units.MagneticFluxDensity getBnAsMagneticFluxDensity()
      Gets north component of magnetic flux density.
      Returns:
      north component of magnetic flux density.
    • getBnAsMagneticFluxDensity

      public void getBnAsMagneticFluxDensity(com.irurueta.units.MagneticFluxDensity result)
      Gets north component of magnetic flux density.
      Parameters:
      result - instance where result will be stored.
    • setBn

      public void setBn(com.irurueta.units.MagneticFluxDensity bn)
      Sets north component of magnetic flux density.
      Parameters:
      bn - north component of magnetic flux density.
    • getBe

      public double getBe()
      Gets east component of magnetic flux density expressed in Teslas (T).
      Returns:
      east component of magnetic flux density.
    • setBe

      public void setBe(double be)
      Sets east component of magnetic flux density expressed in Teslas (T).
      Parameters:
      be - est component of magnetic flux density.
    • getBeAsMagneticFluxDensity

      public com.irurueta.units.MagneticFluxDensity getBeAsMagneticFluxDensity()
      Gets east component of magnetic flux density.
      Returns:
      east component of magnetic flux density.
    • getBeAsMagneticFluxDensity

      public void getBeAsMagneticFluxDensity(com.irurueta.units.MagneticFluxDensity result)
      Gets east component of magnetic flux density.
      Parameters:
      result - instance where result will be stored.
    • setBe

      public void setBe(com.irurueta.units.MagneticFluxDensity be)
      Sets east component of magnetic flux density.
      Parameters:
      be - east component of magnetic flux density.
    • getBd

      public double getBd()
      Gets down component of magnetic flux density expressed in Teslas (T).
      Returns:
      down component of magnetic flux density.
    • setBd

      public void setBd(double bd)
      Sets down component of magnetic flux density expressed in Teslas (T).
      Parameters:
      bd - down component of magnetic flux density.
    • getBdAsMagneticFluxDensity

      public com.irurueta.units.MagneticFluxDensity getBdAsMagneticFluxDensity()
      Gets down component of magnetic flux density.
      Returns:
      down component of magnetic flux density.
    • getBdAsMagneticFluxDensity

      public void getBdAsMagneticFluxDensity(com.irurueta.units.MagneticFluxDensity result)
      Gets down component of magnetic flux density.
      Parameters:
      result - instance where result will be stored.
    • setBd

      public void setBd(com.irurueta.units.MagneticFluxDensity bd)
      Sets down component of magnetic flux density.
      Parameters:
      bd - down component of magnetic flux density.
    • setCoordinates

      public void setCoordinates(double bn, double be, double bd)
      Sets NED coordinates of magnetic flux density expressed in Teslas (T).
      Parameters:
      bn - north component of magnetic flux density.
      be - east component of magnetic flux density.
      bd - down component of magnetic flux density.
    • setCoordinates

      public void setCoordinates(com.irurueta.units.MagneticFluxDensity bn, com.irurueta.units.MagneticFluxDensity be, com.irurueta.units.MagneticFluxDensity bd)
      Sets NED coordinates of magnetic flux density.
      Parameters:
      bn - north component of magnetic flux density.
      be - east component of magnetic flux density.
      bd - down component of magnetic flux density.
    • getCoordinatesAsTriad

      public MagneticFluxDensityTriad getCoordinatesAsTriad()
      Gets NED coordinates of magnetic flux density as a triad. x,y,z coordinates correspond to north, east, down coordinates.
      Returns:
      NED coordinates of magnetic flux density as a triad.
    • getCoordinatesAsTriad

      public void getCoordinatesAsTriad(MagneticFluxDensityTriad result)
      Gets NED coordinates of magnetic flux density as a triad. x,y,z coordinates correspond to north, east, down coordinates.
      Parameters:
      result - instance where result will be stored.
    • setCoordinates

      public void setCoordinates(MagneticFluxDensityTriad triad)
      Sets NED coordinates of magnetic flux density.
      Parameters:
      triad - triad containing magnetic flux density values, where x,y,z coordinates correspond to north, east, down coordinates.
    • getNorm

      public double getNorm()
      Gets magnetic flux density magnitude (e.g. norm) expressed in Teslas (T).
      Returns:
      magnetic flux density magnitude.
    • getNormAsMagneticFluxDensity

      public com.irurueta.units.MagneticFluxDensity getNormAsMagneticFluxDensity()
      Gets magnetic flux density magnitude (e.g. norm).
      Returns:
      magnetic flux density magnitude.
    • getNormAsMagneticFluxDensity

      public void getNormAsMagneticFluxDensity(com.irurueta.units.MagneticFluxDensity result)
      Gets magnetic flux density magnitude (e.g. norm).
      Parameters:
      result - instance where result will be stored.
    • copyTo

      public void copyTo(NEDMagneticFluxDensity output)
      Copies this instance data into provided instance.
      Parameters:
      output - destination instance where data will be copied to.
    • copyFrom

      public void copyFrom(NEDMagneticFluxDensity input)
      Copies data of provided instance into this instance.
      Parameters:
      input - instance to copy data from.
    • asArray

      public void asArray(double[] result)
      Gets magnetic flux density as an array.
      Parameters:
      result - array instance where magnetic flux density coordinates will be stored in n,e,d order.
      Throws:
      IllegalArgumentException - if provided array does not have length 3.
    • asArray

      public double[] asArray()
      Gets magnetic flux density as an array.
      Returns:
      array containing magnetic flux density coordinates in n,e,d order.
    • asMatrix

      public void asMatrix(com.irurueta.algebra.Matrix result)
      Gets magnetic flux density as a column matrix. If provided matrix does not have size 3x1, it will be resized.
      Parameters:
      result - matrix instance where magnetic flux density coordinates will be stored in n,e,d order.
    • asMatrix

      public com.irurueta.algebra.Matrix asMatrix()
      Gets magnetic flux density as a column matrix.
      Returns:
      a matrix containing magnetic flux density coordinates stored in n,e,d order.
    • hashCode

      public int hashCode()
      Computes and returns hash code for this instance. Hash codes are almost unique values that are useful for fast classification and storage of objects in collections.
      Overrides:
      hashCode in class Object
      Returns:
      Hash code.
    • equals

      public boolean equals(Object obj)
      Check if provided object is a NEDMagneticFluxDensity instance having exactly the same contents as this instance.
      Overrides:
      equals in class Object
      Parameters:
      obj - object to be compared.
      Returns:
      true if both objects are considered to be equal, false otherwise.
    • equals

      public boolean equals(NEDMagneticFluxDensity other)
      Checks if provided instance has exactly the same contents as this instance.
      Parameters:
      other - instance to be compared.
      Returns:
      true if both instances are considered to be equal, false otherwise.
    • equals

      public boolean equals(NEDMagneticFluxDensity other, double threshold)
      Checks if provided instance has contents similar to this instance up to provided threshold value.
      Parameters:
      other - instance to be compared.
      threshold - maximum allowed difference between gravity coordinates.
      Returns:
      true if both instances are considered to be equal (up to provided threshold), false otherwise.
    • clone

      protected Object clone() throws CloneNotSupportedException
      Makes a copy of this instance.
      Overrides:
      clone in class Object
      Returns:
      a copy of this instance.
      Throws:
      CloneNotSupportedException - if clone fails for same reason.
    • convertMagneticFluxDensity

      private double convertMagneticFluxDensity(com.irurueta.units.MagneticFluxDensity b)
      Converts magnetic flux density to Teslas.
      Parameters:
      b - magnetic flux density to be converted.
      Returns:
      converted value.
    • convertMagneticFluxDensity

      private double convertMagneticFluxDensity(double value, com.irurueta.units.MagneticFluxDensityUnit unit)
      Converts magnetic flux density to Teslas.
      Parameters:
      value - value to be converted.
      unit - unit of value to be converted
      Returns:
      converted value.