Record Class Navx.AlgorithmState
java.lang.Object
java.lang.Record
com.studica.frc.Navx.AlgorithmState
- Record Components:
gyroBiasX- estimated gyroscope bias, X, in rad/sgyroBiasY- estimated gyroscope bias, Y, in rad/sgyroBiasZ- estimated gyroscope bias, Z, in rad/satRest- true if the sensor is detected at restmagUndisturbed- true if no magnetic disturbance is detectedmagRefNorm- reference magnetic field magnitude, in microteslamagCandidateNorm- candidate magnetic field magnitude, in microteslamagRefDip- reference magnetic dip angle, in radiansmagCandidateDip- 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 Summary
ConstructorsConstructorDescriptionAlgorithmState(double gyroBiasX, double gyroBiasY, double gyroBiasZ, boolean atRest, boolean magUndisturbed, double magRefNorm, double magCandidateNorm, double magRefDip, double magCandidateDip) Creates an instance of aAlgorithmStaterecord class. -
Method Summary
Modifier and TypeMethodDescriptionbooleanatRest()Returns the value of theatRestrecord component.final booleanIndicates whether some other object is "equal to" this one.doubleReturns the value of thegyroBiasXrecord component.doubleReturns the value of thegyroBiasYrecord component.doubleReturns the value of thegyroBiasZrecord component.final inthashCode()Returns a hash code value for this object.doubleReturns the value of themagCandidateDiprecord component.doubleReturns the value of themagCandidateNormrecord component.doubleReturns the value of themagRefDiprecord component.doubleReturns the value of themagRefNormrecord component.booleanReturns the value of themagUndisturbedrecord component.final StringtoString()Returns a string representation of this record class.
-
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 aAlgorithmStaterecord class.- Parameters:
gyroBiasX- the value for thegyroBiasXrecord componentgyroBiasY- the value for thegyroBiasYrecord componentgyroBiasZ- the value for thegyroBiasZrecord componentatRest- the value for theatRestrecord componentmagUndisturbed- the value for themagUndisturbedrecord componentmagRefNorm- the value for themagRefNormrecord componentmagCandidateNorm- the value for themagCandidateNormrecord componentmagRefDip- the value for themagRefDiprecord componentmagCandidateDip- the value for themagCandidateDiprecord component
-
-
Method Details
-
toString
-
hashCode
-
equals
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 thecomparemethod from their corresponding wrapper classes. -
gyroBiasX
-
gyroBiasY
-
gyroBiasZ
-
atRest
-
magUndisturbed
public boolean magUndisturbed()Returns the value of themagUndisturbedrecord component.- Returns:
- the value of the
magUndisturbedrecord component
-
magRefNorm
public double magRefNorm()Returns the value of themagRefNormrecord component.- Returns:
- the value of the
magRefNormrecord component
-
magCandidateNorm
public double magCandidateNorm()Returns the value of themagCandidateNormrecord component.- Returns:
- the value of the
magCandidateNormrecord component
-
magRefDip
-
magCandidateDip
public double magCandidateDip()Returns the value of themagCandidateDiprecord component.- Returns:
- the value of the
magCandidateDiprecord component
-