Class TimedBodyKinematics

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

public class TimedBodyKinematics extends Object implements Serializable, Cloneable
Contains a body kinematics measurement (accelerometer + gyroscope) along with the corresponding timestamp when measure was made. Notice that timestamp does not need to be absolute. Usually timestamps are used in sequences of measurements of body kinematics, where the first measurement can have any timestamp value (e.g. zero), and hence the subsequent measurements will have timestamps relative to the first one.
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:
    • kinematics

      private BodyKinematics kinematics
      Current body kinematics measurement. Contains accelerometer and gyroscope measurements.
    • timestampSeconds

      private double timestampSeconds
      Timestamp value expressed in seconds.
  • Constructor Details

    • TimedBodyKinematics

      public TimedBodyKinematics()
      Constructor.
    • TimedBodyKinematics

      public TimedBodyKinematics(BodyKinematics kinematics)
      Constructor.
      Parameters:
      kinematics - current body kinematics measurement.
    • TimedBodyKinematics

      public TimedBodyKinematics(double timestampSeconds)
      Constructor.
      Parameters:
      timestampSeconds - timestamp value expressed in seconds.
    • TimedBodyKinematics

      public TimedBodyKinematics(com.irurueta.units.Time timestamp)
      Constructor.
      Parameters:
      timestamp - timestamp value.
    • TimedBodyKinematics

      public TimedBodyKinematics(BodyKinematics kinematics, double timestampSeconds)
      Constructor.
      Parameters:
      kinematics - current body kinematics measurement.
      timestampSeconds - timestamp value expressed in seconds.
    • TimedBodyKinematics

      public TimedBodyKinematics(BodyKinematics kinematics, com.irurueta.units.Time timestamp)
      Constructor.
      Parameters:
      kinematics - current body kinematics measurement.
      timestamp - timestamp value.
    • TimedBodyKinematics

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

    • getKinematics

      public BodyKinematics getKinematics()
      Gets current body kinematics measurement. Contains accelerometer and gyroscope measurements.
      Returns:
      current body kinematics measurement.
    • setKinematics

      public void setKinematics(BodyKinematics kinematics)
      Sets current body kinematics measurement. Contains accelerometer and gyroscope measurements.
      Parameters:
      kinematics - current body kinematics measurement to be set.
    • getTimestampSeconds

      public double getTimestampSeconds()
      Gets timestamp value expressed in seconds.
      Returns:
      timestamp value expressed in seconds.
    • setTimestampSeconds

      public void setTimestampSeconds(double timestampSeconds)
      Sets timestamp value expressed in seconds.
      Parameters:
      timestampSeconds - timestamp value expressed in seconds.
    • getTimestamp

      public com.irurueta.units.Time getTimestamp()
      Gets timestamp value.
      Returns:
      a new timestamp instance.
    • getTimestamp

      public void getTimestamp(com.irurueta.units.Time result)
      Gets timestamp value.
      Parameters:
      result - instance where result data will be stored.
    • setTimestamp

      public void setTimestamp(com.irurueta.units.Time timestamp)
      Sets timestamp.
      Parameters:
      timestamp - timestamp to be set.
    • copyFrom

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

      public void copyTo(TimedBodyKinematics 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(TimedBodyKinematics 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(TimedBodyKinematics 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 kinematics and timestamp 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 TimedBodyKinematics 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.
    • convertTime

      private static double convertTime(com.irurueta.units.Time time)
      Converts provided time instance to seconds.
      Parameters:
      time - timestamp to be converted.
      Returns:
      converted value expressed in seconds.