Class DistanceRpmPoint
java.lang.Object
frc.robot.subsystems.shooter.config.DistanceRpmPoint
Single data point mapping a distance in meters to a target flywheel RPM and estimated time of flight for the distance-based shooter interpolation
table.
Define an array of these in the shooter config JSON. At runtime, the subsystem builds interpolating lookup tables from these points and linearly interpolates between them to compute the target RPM and time of flight for any given distance.
-
Field Summary
FieldsModifier and TypeFieldDescriptiondoubleDistance from the robot to the target in meters.doubleTarget flywheel RPM at this distance.doubleEstimated time of flight in seconds for a ball launched at this distance's RPM to reach the target. -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
distanceMeters
public double distanceMetersDistance from the robot to the target in meters. -
rpm
public double rpmTarget flywheel RPM at this distance. -
timeOfFlightSeconds
public double timeOfFlightSecondsEstimated time of flight in seconds for a ball launched at this distance's RPM to reach the target.Used by the shoot-on-the-move solver to compute how far the ball drifts during flight due to inherited robot velocity. Initial estimates can be hand-tuned or generated by a projectile simulator. Set to 0.0 if unknown; the SOTM solver will fall back to a linear approximation.
-
-
Constructor Details
-
DistanceRpmPoint
public DistanceRpmPoint()
-