Package frc.lib

Record Class IMUState


public record IMUState(double timestampSec, double rollRad, double pitchRad, double yawRad, double rollVelRadPerSec, double pitchVelRadPerSec, double yawVelRadPerSec) extends Record
Represents a 6-DOF high-frequency snapshot for vision correction.
  • Constructor Summary

    Constructors
    Constructor
    Description
    IMUState(double timestampSec, double rollRad, double pitchRad, double yawRad, double rollVelRadPerSec, double pitchVelRadPerSec, double yawVelRadPerSec)
    Creates an instance of a IMUState record class.
  • Method Summary

    Modifier and Type
    Method
    Description
    final boolean
    Indicates whether some other object is "equal to" this one.
    final int
    Returns a hash code value for this object.
    double
    Returns the value of the pitchRad record component.
    double
    Returns the value of the pitchVelRadPerSec record component.
    double
    Returns the value of the rollRad record component.
    double
    Returns the value of the rollVelRadPerSec record component.
    double
    Returns the value of the timestampSec record component.
    final String
    Returns a string representation of this record class.
    double
    Returns the value of the yawRad record component.
    double
    Returns the value of the yawVelRadPerSec record component.

    Methods inherited from class java.lang.Object

    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
  • Constructor Details

    • IMUState

      public IMUState(double timestampSec, double rollRad, double pitchRad, double yawRad, double rollVelRadPerSec, double pitchVelRadPerSec, double yawVelRadPerSec)
      Creates an instance of a IMUState record class.
      Parameters:
      timestampSec - the value for the timestampSec record component
      rollRad - the value for the rollRad record component
      pitchRad - the value for the pitchRad record component
      yawRad - the value for the yawRad record component
      rollVelRadPerSec - the value for the rollVelRadPerSec record component
      pitchVelRadPerSec - the value for the pitchVelRadPerSec record component
      yawVelRadPerSec - the value for the yawVelRadPerSec record component
  • Method Details

    • toString

      public final String toString()
      Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • hashCode

      public final int hashCode()
      Returns a hash code value for this object. The value is derived from the hash code of each of the record components.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. All components in this record class are compared with '=='.
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • timestampSec

      public double timestampSec()
      Returns the value of the timestampSec record component.
      Returns:
      the value of the timestampSec record component
    • rollRad

      public double rollRad()
      Returns the value of the rollRad record component.
      Returns:
      the value of the rollRad record component
    • pitchRad

      public double pitchRad()
      Returns the value of the pitchRad record component.
      Returns:
      the value of the pitchRad record component
    • yawRad

      public double yawRad()
      Returns the value of the yawRad record component.
      Returns:
      the value of the yawRad record component
    • rollVelRadPerSec

      public double rollVelRadPerSec()
      Returns the value of the rollVelRadPerSec record component.
      Returns:
      the value of the rollVelRadPerSec record component
    • pitchVelRadPerSec

      public double pitchVelRadPerSec()
      Returns the value of the pitchVelRadPerSec record component.
      Returns:
      the value of the pitchVelRadPerSec record component
    • yawVelRadPerSec

      public double yawVelRadPerSec()
      Returns the value of the yawVelRadPerSec record component.
      Returns:
      the value of the yawVelRadPerSec record component