Record Class OdometryGuard.Output
java.lang.Object
java.lang.Record
frc.spectrumLib.localization.OdometryGuard.Output
- Record Components:
heading- gyro angle for the estimatorspositions- module positions for the estimatorsmodulesUsed- bitmset when modulemwas usedheadingSource- where this sample's heading change came from
- Enclosing class:
OdometryGuard
public static record OdometryGuard.Output(Rotation2d heading, SwerveModulePosition[] positions, int modulesUsed, OdometryGuard.HeadingSource headingSource)
extends Record
What to hand the estimators.
-
Constructor Summary
ConstructorsConstructorDescriptionOutput(Rotation2d heading, SwerveModulePosition[] positions, int modulesUsed, OdometryGuard.HeadingSource headingSource) Creates an instance of aOutputrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.heading()Returns the value of theheadingrecord component.Returns the value of theheadingSourcerecord component.intReturns the value of themodulesUsedrecord component.Returns the value of thepositionsrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
Output
public Output(Rotation2d heading, SwerveModulePosition[] positions, int modulesUsed, OdometryGuard.HeadingSource headingSource) Creates an instance of aOutputrecord class.- Parameters:
heading- the value for theheadingrecord componentpositions- the value for thepositionsrecord componentmodulesUsed- the value for themodulesUsedrecord componentheadingSource- the value for theheadingSourcerecord 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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with thecomparemethod from their corresponding wrapper classes. -
heading
-
positions
-
modulesUsed
public int modulesUsed()Returns the value of themodulesUsedrecord component.- Returns:
- the value of the
modulesUsedrecord component
-
headingSource
Returns the value of theheadingSourcerecord component.- Returns:
- the value of the
headingSourcerecord component
-