Package frc.rebuilt

Class ShotCalculator

java.lang.Object
frc.rebuilt.ShotCalculator

public class ShotCalculator extends Object
  • Field Details

    • STARTING_HOOD_ANGLE_OFFSET

      public static final double STARTING_HOOD_ANGLE_OFFSET
      See Also:
    • HOOD_ANGLE_OFFSET

      public static double HOOD_ANGLE_OFFSET
    • STARTING_DRIVE_ANGLE_OFFSET

      public static final double STARTING_DRIVE_ANGLE_OFFSET
      See Also:
    • DRIVE_ANGLE_OFFSET

      public static double DRIVE_ANGLE_OFFSET
  • Method Details

    • getInstance

      public static ShotCalculator getInstance()
    • increaseHoodAngleOffset

      public static Command increaseHoodAngleOffset()
    • decreaseHoodAngleOffset

      public static Command decreaseHoodAngleOffset()
    • increaseDriveAngleOffset

      public static Command increaseDriveAngleOffset()
    • decreaseDriveAngleOffset

      public static Command decreaseDriveAngleOffset()
    • getParameters

      public ShotCalculator.ShootingParameters getParameters()
      Shot parameters for the current pose and velocity, cached until clearShootingParameters() is called.
      1. Delay the odometry pose by PHASE_DELAY_SECS to cover sensor latency.
      2. Split the launcher's field-relative velocity into radial and tangential parts.
      3. Run the 1690 Orbit virtual-target solver, which corrects the aim for robot motion during flight.
      4. Turn that into a drive angle, a hood angle, and a flywheel speed.
      Returns:
      the latest ShotCalculator.ShootingParameters
    • clearShootingParameters

      public void clearShootingParameters()