Package frc.robot.util
Record Class ShotCalculator.ShooterParams
java.lang.Object
java.lang.Record
frc.robot.util.ShotCalculator.ShooterParams
- Record Components:
rps- The required shooter RPS to achieve the desired velocity at the given distance.hoodAngle- The required hood angle to achieve the desired trajectory at the given distance.timeOfFlight- The expected time of flight for a shot at the given distance with the baseline parameters. Used for velocity correction calculations.
- Enclosing class:
- ShotCalculator
public static record ShotCalculator.ShooterParams(double rps, double hoodAngle, double timeOfFlight)
extends Record
Parameters for a shooter shot, including RPS, hood angle, and time of flight.
-
Constructor Summary
ConstructorsConstructorDescriptionShooterParams(double rps, double hoodAngle, double timeOfFlight) Creates an instance of aShooterParamsrecord 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.doubleReturns the value of thehoodAnglerecord component.doublerps()Returns the value of therpsrecord component.doubleReturns the value of thetimeOfFlightrecord component.final StringtoString()Returns a string representation of this record class.
-
Constructor Details
-
ShooterParams
public ShooterParams(double rps, double hoodAngle, double timeOfFlight) Creates an instance of aShooterParamsrecord class.- Parameters:
rps- the value for therpsrecord componenthoodAngle- the value for thehoodAnglerecord componenttimeOfFlight- the value for thetimeOfFlightrecord component
-
-
Method Details
-
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. -
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. -
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 '=='. -
rps
public double rps()Returns the value of therpsrecord component.- Returns:
- the value of the
rpsrecord component
-
hoodAngle
public double hoodAngle()Returns the value of thehoodAnglerecord component.- Returns:
- the value of the
hoodAnglerecord component
-
timeOfFlight
public double timeOfFlight()Returns the value of thetimeOfFlightrecord component.- Returns:
- the value of the
timeOfFlightrecord component
-