Class DistanceRpmPoint

java.lang.Object
frc.robot.subsystems.shooter.config.DistanceRpmPoint

public class DistanceRpmPoint extends Object
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 Details

    • distanceMeters

      public double distanceMeters
      Distance from the robot to the target in meters.
    • rpm

      public double rpm
      Target flywheel RPM at this distance.
    • timeOfFlightSeconds

      public double timeOfFlightSeconds
      Estimated 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()