]> git.taranathan.com Git - FRC2026.git/commitdiff
Update TurretAutoShoot.java
authormixxlto <maxtan0626@gmail.com>
Sun, 25 Jan 2026 23:23:00 +0000 (15:23 -0800)
committermixxlto <maxtan0626@gmail.com>
Sun, 25 Jan 2026 23:23:00 +0000 (15:23 -0800)
src/main/java/frc/robot/commands/gpm/TurretAutoShoot.java

index 1a65db39226eaed8dcde8ac1344139afb6f98845..45deb1574177a4455e78eb8d678175cbc0318e52 100644 (file)
@@ -44,6 +44,8 @@ public class TurretAutoShoot extends Command {
         Translation2d target = FieldConstants.getHubTranslation().toTranslation2d();
         double D_y;
         double D_x;
+        // TODO: Change time to goal on actual comp bot
+        double timeToGoal = 0.67;
         
         // If the robot is moving, adjust the target position based on velocity
         if (SOTM) {
@@ -52,8 +54,8 @@ public class TurretAutoShoot extends Command {
             double xVel = fieldRelVel.vxMetersPerSecond;
             double yVel = fieldRelVel.vyMetersPerSecond;
             
-            D_y = target.getY() - drivepose.getY() - (0.67) * yVel;
-            D_x = target.getX() - drivepose.getX() - (0.67) * xVel;
+            D_y = target.getY() - drivepose.getY() - timeToGoal * yVel;
+            D_x = target.getX() - drivepose.getX() - timeToGoal * xVel;
         } else {
             D_y = target.getY() - drivepose.getY();
             D_x = target.getX() - drivepose.getX();