Class FrameBodyMagneticFluxDensity

java.lang.Object
com.irurueta.navigation.inertial.calibration.FrameBodyMagneticFluxDensity
All Implemented Interfaces:
Serializable, Cloneable
Direct Known Subclasses:
StandardDeviationFrameBodyMagneticFluxDensity

public class FrameBodyMagneticFluxDensity extends Object implements Serializable, Cloneable
Contains a body magnetic flux density along with the corresponding frame (position, orientation and velocity) where the measurement was made.
See Also:
  • Field Details

    • serialVersionUID

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

      private BodyMagneticFluxDensity magneticFluxDensity
      Current body magnetic flux density. Contains magnetometer measurements.
    • frame

      private com.irurueta.navigation.frames.ECEFFrame frame
      Contains current body position, velocity (which will typically be zero) and orientation resolved around ECEF axes.
    • year

      private double year
      Contains year expressed in decimal format.
  • Constructor Details

    • FrameBodyMagneticFluxDensity

      public FrameBodyMagneticFluxDensity()
      Constructor.
    • FrameBodyMagneticFluxDensity

      public FrameBodyMagneticFluxDensity(BodyMagneticFluxDensity magneticFluxDensity)
      Constructor.
      Parameters:
      magneticFluxDensity - current body magnetic flux density.
    • FrameBodyMagneticFluxDensity

      public FrameBodyMagneticFluxDensity(com.irurueta.navigation.frames.ECEFFrame frame)
      Constructor.
      Parameters:
      frame - current ECEF frame associated to measurement.
    • FrameBodyMagneticFluxDensity

      public FrameBodyMagneticFluxDensity(com.irurueta.navigation.frames.NEDFrame frame)
      Constructor.
      Parameters:
      frame - current NED frame associated to measurement. Internally it will be converted to its corresponding ECEF frame.
    • FrameBodyMagneticFluxDensity

      public FrameBodyMagneticFluxDensity(BodyMagneticFluxDensity magneticFluxDensity, com.irurueta.navigation.frames.ECEFFrame frame)
      Constructor.
      Parameters:
      magneticFluxDensity - current body magnetic flux density.
      frame - current ECEF frame associated to measurement.
    • FrameBodyMagneticFluxDensity

      public FrameBodyMagneticFluxDensity(BodyMagneticFluxDensity magneticFluxDensity, com.irurueta.navigation.frames.NEDFrame frame)
      Constructor.
      Parameters:
      magneticFluxDensity - current body magnetic flux density.
      frame - current NED frame associated to measurement. Internally it will be converted to its corresponding ECEF frame.
    • FrameBodyMagneticFluxDensity

      public FrameBodyMagneticFluxDensity(double year)
      Constructor.
      Parameters:
      year - time expressed as decimal year.
    • FrameBodyMagneticFluxDensity

      public FrameBodyMagneticFluxDensity(BodyMagneticFluxDensity magneticFluxDensity, double year)
      Constructor.
      Parameters:
      magneticFluxDensity - current body magnetic flux density.
      year - time expressed as decimal year.
    • FrameBodyMagneticFluxDensity

      public FrameBodyMagneticFluxDensity(com.irurueta.navigation.frames.ECEFFrame frame, double year)
      Constructor.
      Parameters:
      frame - current ECEF frame associated to measurement.
      year - time expressed as decimal year.
    • FrameBodyMagneticFluxDensity

      public FrameBodyMagneticFluxDensity(com.irurueta.navigation.frames.NEDFrame frame, double year)
      Constructor.
      Parameters:
      frame - current NED frame associated to measurement. Internally it will be converted to its corresponding ECEF frame.
      year - time expressed as decimal year.
    • FrameBodyMagneticFluxDensity

      public FrameBodyMagneticFluxDensity(BodyMagneticFluxDensity magneticFluxDensity, com.irurueta.navigation.frames.ECEFFrame frame, double year)
      Constructor.
      Parameters:
      magneticFluxDensity - current body magnetic flux density.
      frame - current ECEF frame associated to measurement.
      year - time expressed as decimal year.
    • FrameBodyMagneticFluxDensity

      public FrameBodyMagneticFluxDensity(BodyMagneticFluxDensity magneticFluxDensity, com.irurueta.navigation.frames.NEDFrame frame, double year)
      Constructor.
      Parameters:
      magneticFluxDensity - current body magnetic flux density.
      frame - current NED frame associated to measurement. Internally it will be converted to its corresponding ECEF frame.
      year - time expressed as decimal year.
    • FrameBodyMagneticFluxDensity

      public FrameBodyMagneticFluxDensity(Date time)
      Constructor.
      Parameters:
      time - a timestamp.
    • FrameBodyMagneticFluxDensity

      public FrameBodyMagneticFluxDensity(BodyMagneticFluxDensity magneticFluxDensity, Date time)
      Constructor.
      Parameters:
      magneticFluxDensity - current body magnetic flux density.
      time - a timestamp.
    • FrameBodyMagneticFluxDensity

      public FrameBodyMagneticFluxDensity(com.irurueta.navigation.frames.ECEFFrame frame, Date time)
      Constructor.
      Parameters:
      frame - current ECEF frame associated to measurement.
      time - a timestamp.
    • FrameBodyMagneticFluxDensity

      public FrameBodyMagneticFluxDensity(com.irurueta.navigation.frames.NEDFrame frame, Date time)
      Constructor.
      Parameters:
      frame - current NED frame associated to measurement. Internally it will be converted to its corresponding ECEF frame.
      time - a timestamp.
    • FrameBodyMagneticFluxDensity

      public FrameBodyMagneticFluxDensity(BodyMagneticFluxDensity magneticFluxDensity, com.irurueta.navigation.frames.ECEFFrame frame, Date time)
      Constructor.
      Parameters:
      magneticFluxDensity - current body magnetic flux density.
      frame - current ECEF frame associated to measurement.
      time - a timestamp.
    • FrameBodyMagneticFluxDensity

      public FrameBodyMagneticFluxDensity(BodyMagneticFluxDensity magneticFluxDensity, com.irurueta.navigation.frames.NEDFrame frame, Date time)
      Constructor.
      Parameters:
      magneticFluxDensity - current body magnetic flux density.
      frame - current NED frame associated to measurement. Internally it will be converted to its corresponding ECEF frame.
      time - a timestamp.
    • FrameBodyMagneticFluxDensity

      public FrameBodyMagneticFluxDensity(GregorianCalendar calendar)
      Constructor.
      Parameters:
      calendar - calendar containing a timestamp.
    • FrameBodyMagneticFluxDensity

      public FrameBodyMagneticFluxDensity(BodyMagneticFluxDensity magneticFluxDensity, GregorianCalendar calendar)
      Constructor.
      Parameters:
      magneticFluxDensity - current body magnetic flux density.
      calendar - calendar containing a timestamp.
    • FrameBodyMagneticFluxDensity

      public FrameBodyMagneticFluxDensity(com.irurueta.navigation.frames.ECEFFrame frame, GregorianCalendar calendar)
      Constructor.
      Parameters:
      frame - current ECEF frame associated to measurement.
      calendar - calendar containing a timestamp.
    • FrameBodyMagneticFluxDensity

      public FrameBodyMagneticFluxDensity(com.irurueta.navigation.frames.NEDFrame frame, GregorianCalendar calendar)
      Constructor.
      Parameters:
      frame - current NED frame associated to measurement. Internally it will be converted to its corresponding ECEF frame.
      calendar - calendar containing a timestamp.
    • FrameBodyMagneticFluxDensity

      public FrameBodyMagneticFluxDensity(BodyMagneticFluxDensity magneticFluxDensity, com.irurueta.navigation.frames.ECEFFrame frame, GregorianCalendar calendar)
      Constructor.
      Parameters:
      magneticFluxDensity - current body magnetic flux density.
      frame - current ECEF frame associated to measurement.
      calendar - calendar containing a timestamp.
    • FrameBodyMagneticFluxDensity

      public FrameBodyMagneticFluxDensity(BodyMagneticFluxDensity magneticFluxDensity, com.irurueta.navigation.frames.NEDFrame frame, GregorianCalendar calendar)
      Constructor.
      Parameters:
      magneticFluxDensity - current body magnetic flux density.
      frame - current NED frame associated to measurement. Internally it will be converted to its corresponding ECEF frame.
      calendar - calendar containing a timestamp.
    • FrameBodyMagneticFluxDensity

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

    • getMagneticFluxDensity

      public BodyMagneticFluxDensity getMagneticFluxDensity()
      Gets current body magnetic flux density. Contains magnetometer measurements.
      Returns:
      current body magnetic flux density.
    • setMagneticFluxDensity

      public void setMagneticFluxDensity(BodyMagneticFluxDensity magneticFluxDensity)
      Sets current body magnetic flux density. Contains magnetometer measurements.
      Parameters:
      magneticFluxDensity - current body magnetic flux density.
    • getFrame

      public com.irurueta.navigation.frames.ECEFFrame getFrame()
      Gets current body position (which will typically remain constant), velocity(which will typically be zero) and orientation (which usually changes with each measurement to perform calibration of a single device) resolved around ECEF axes associated to body magnetic flux density measurement.
      Returns:
      current ECEF frame associated to body magnetic flux density measurement or null if not available.
    • setFrame

      public void setFrame(com.irurueta.navigation.frames.ECEFFrame frame)
      Sets current body position (which will typically remain constant), velocity (which will typically be zero) and orientation (which usually changes with each measurement to perform calibration of a single device) resolved around ECEF axes associated to body magnetic flux density measurement.
      Parameters:
      frame - current ECEF frame.
    • getNedFrame

      public com.irurueta.navigation.frames.NEDFrame getNedFrame()
      Gets current body position (which will typically remain constant), velocity (which will typically be zero) and orientation (which usually changes with each measurement to perform calibration of a single device) resolved around NED axes associated to body magnetic flux density measurement.
      Returns:
      current NED frame associated to body magnetic flux density measurement or null if not available.
    • getNedFrame

      public boolean getNedFrame(com.irurueta.navigation.frames.NEDFrame result)
      Gets current body position (which will typically remain constant), velocity (which will typically be zero) and orientation (which usually changes with each measurement to perform calibration of a single device) resolved around NED axes associated to body magnetic flux density measurement.
      Parameters:
      result - instance where result data will be stored if available.
      Returns:
      true if result instance was updated, false otherwise.
    • setNedFrame

      public void setNedFrame(com.irurueta.navigation.frames.NEDFrame nedFrame)
      Sets current body position (which will typically remain constant), velocity (which will typically be zero) and orientation (which usually changes with each measurement to perform calibration of a single device) resolved around NED axes associated to body magnetic flux density measurement.

      This method will internally store the corresponding ECEF frame to provided NED frame value.

      Parameters:
      nedFrame - current NED frame associated to body magnetic flux density measurement to be set.
    • getYear

      public double getYear()
      Gets year expressed in decimal format.
      Returns:
      year expressed in decimal format.
    • setYear

      public void setYear(double year)
      Sets year expressed in decimal format.
      Parameters:
      year - year expressed in decimal format.
    • setTime

      public void setTime(Date date)
      Sets decimal year from provided date instance.
      Parameters:
      date - a date instance containing a timestamp.
    • setTime

      public void setTime(GregorianCalendar calendar)
      Sets decimal year from provided calendar instance.
      Parameters:
      calendar - a calendar instance containing a timestamp.
    • convertTime

      public static double convertTime(Date date)
      Converts a time instant contained ina date object to a decimal year.
      Parameters:
      date - a time instance to be converted.
      Returns:
      converted value expressed in decimal years.
    • convertTime

      public static double convertTime(GregorianCalendar calendar)
      Converts a time instant contained in a gregorian calendar to a decimal year.
      Parameters:
      calendar - calendar containing a specific instant to be converted.
      Returns:
      converted value expressed in decimal years.
    • copyFrom

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

      public void copyTo(FrameBodyMagneticFluxDensity output)
      Copies this instance data into provided instance.
      Parameters:
      output - destination instance where data will be copied to.
    • 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(FrameBodyMagneticFluxDensity 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(FrameBodyMagneticFluxDensity 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 magnetic flux density and frame values.
      Returns:
      true if both instances are considered to be equal (up to provided threshold), false otherwise.
    • equals

      public boolean equals(Object obj)
      Checks if provided object is a FrameBodyMagneticFluxDensity 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.
    • 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 some reason.