Record Class Navx.AlgorithmState

java.lang.Object
java.lang.Record
com.studica.frc.Navx.AlgorithmState
Record Components:
gyroBiasX - estimated gyroscope bias, X, in rad/s
gyroBiasY - estimated gyroscope bias, Y, in rad/s
gyroBiasZ - estimated gyroscope bias, Z, in rad/s
atRest - true if the sensor is detected at rest
magUndisturbed - true if no magnetic disturbance is detected
magRefNorm - reference magnetic field magnitude, in microtesla
magCandidateNorm - candidate magnetic field magnitude, in microtesla
magRefDip - reference magnetic dip angle, in radians
magCandidateDip - candidate magnetic dip angle, in radians
Enclosing class:
Navx

public static record Navx.AlgorithmState(double gyroBiasX, double gyroBiasY, double gyroBiasZ, boolean atRest, boolean magUndisturbed, double magRefNorm, double magCandidateNorm, double magRefDip, double magCandidateDip) extends Record
Internal state of the sensor-fusion filter, for diagnosing calibration.
  • Constructor Details

    • AlgorithmState

      public AlgorithmState(double gyroBiasX, double gyroBiasY, double gyroBiasZ, boolean atRest, boolean magUndisturbed, double magRefNorm, double magCandidateNorm, double magRefDip, double magCandidateDip)
      Creates an instance of a AlgorithmState record class.
      Parameters:
      gyroBiasX - the value for the gyroBiasX record component
      gyroBiasY - the value for the gyroBiasY record component
      gyroBiasZ - the value for the gyroBiasZ record component
      atRest - the value for the atRest record component
      magUndisturbed - the value for the magUndisturbed record component
      magRefNorm - the value for the magRefNorm record component
      magCandidateNorm - the value for the magCandidateNorm record component
      magRefDip - the value for the magRefDip record component
      magCandidateDip - the value for the magCandidateDip 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 the compare method from their corresponding wrapper classes.
      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.
    • gyroBiasX

      public double gyroBiasX()
      Returns the value of the gyroBiasX record component.
      Returns:
      the value of the gyroBiasX record component
    • gyroBiasY

      public double gyroBiasY()
      Returns the value of the gyroBiasY record component.
      Returns:
      the value of the gyroBiasY record component
    • gyroBiasZ

      public double gyroBiasZ()
      Returns the value of the gyroBiasZ record component.
      Returns:
      the value of the gyroBiasZ record component
    • atRest

      public boolean atRest()
      Returns the value of the atRest record component.
      Returns:
      the value of the atRest record component
    • magUndisturbed

      public boolean magUndisturbed()
      Returns the value of the magUndisturbed record component.
      Returns:
      the value of the magUndisturbed record component
    • magRefNorm

      public double magRefNorm()
      Returns the value of the magRefNorm record component.
      Returns:
      the value of the magRefNorm record component
    • magCandidateNorm

      public double magCandidateNorm()
      Returns the value of the magCandidateNorm record component.
      Returns:
      the value of the magCandidateNorm record component
    • magRefDip

      public double magRefDip()
      Returns the value of the magRefDip record component.
      Returns:
      the value of the magRefDip record component
    • magCandidateDip

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