Package frc.robot.shotdata
Record Class ShotData.ShotEntry
java.lang.Object
java.lang.Record
frc.robot.shotdata.ShotData.ShotEntry
- Enclosing class:
- ShotData
public static record ShotData.ShotEntry(double distanceFeet, double flywheelSpeedRps, double hoodAngleDeg, double timeOfFlight)
extends Record
Parameters for a successful shot.
-
Constructor Summary
ConstructorsConstructorDescriptionShotEntry(double distanceFeet, double flywheelSpeedRps, double hoodAngleDeg, double timeOfFlight) Creates an instance of aShotEntryrecord class. -
Method Summary
Modifier and TypeMethodDescriptiondoubleReturns the value of thedistanceFeetrecord component.final booleanIndicates whether some other object is "equal to" this one.doubleExit angle in radiansdoubleExit speed in m/sdoubleReturns the value of theflywheelSpeedRpsrecord component.final inthashCode()Returns a hash code value for this object.doubleReturns the value of thehoodAngleDegrecord component.doubleHorizontal exit velocity in m/sdoubleReturns the value of thetimeOfFlightrecord component.final StringtoString()Returns a string representation of this record class.doubleVertical exit velocity in m/s
-
Constructor Details
-
ShotEntry
public ShotEntry(double distanceFeet, double flywheelSpeedRps, double hoodAngleDeg, double timeOfFlight) Creates an instance of aShotEntryrecord class.- Parameters:
distanceFeet- the value for thedistanceFeetrecord componentflywheelSpeedRps- the value for theflywheelSpeedRpsrecord componenthoodAngleDeg- the value for thehoodAngleDegrecord componenttimeOfFlight- the value for thetimeOfFlightrecord component
-
-
Method Details
-
verticalVelocity
public double verticalVelocity()Vertical exit velocity in m/s -
horizontalVelocity
public double horizontalVelocity()Horizontal exit velocity in m/s -
exitAngle
public double exitAngle()Exit angle in radians -
exitSpeed
public double exitSpeed()Exit speed in m/s -
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 '=='. -
distanceFeet
public double distanceFeet()Returns the value of thedistanceFeetrecord component.- Returns:
- the value of the
distanceFeetrecord component
-
flywheelSpeedRps
public double flywheelSpeedRps()Returns the value of theflywheelSpeedRpsrecord component.- Returns:
- the value of the
flywheelSpeedRpsrecord component
-
hoodAngleDeg
public double hoodAngleDeg()Returns the value of thehoodAngleDegrecord component.- Returns:
- the value of the
hoodAngleDegrecord component
-
timeOfFlight
public double timeOfFlight()Returns the value of thetimeOfFlightrecord component.- Returns:
- the value of the
timeOfFlightrecord component
-