From 3ca4f2a433b9ec60848dd40005742c2dd791b2f9 Mon Sep 17 00:00:00 2001 From: maxwtan <100314265+MaxwellTTan20@users.noreply.github.com> Date: Sat, 11 Apr 2026 10:07:58 -0700 Subject: [PATCH] tof change --- .../java/frc/robot/commands/gpm/Superstructure.java | 3 ++- src/main/java/frc/robot/util/ShooterPhysics.java | 11 +++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) diff --git a/src/main/java/frc/robot/commands/gpm/Superstructure.java b/src/main/java/frc/robot/commands/gpm/Superstructure.java index 97554f0..1fe654d 100644 --- a/src/main/java/frc/robot/commands/gpm/Superstructure.java +++ b/src/main/java/frc/robot/commands/gpm/Superstructure.java @@ -67,7 +67,8 @@ public class Superstructure extends Command { private double distanceFromTarget = 0.0; - private double TOFAdjustment = 0.85; + // private double TOFAdjustment = 0.85; + private double TOFAdjustment = 1.1; public Superstructure(Turret turret, Drivetrain drivetrain, Hood hood, Shooter shooter, Spindexer spindexer) { this.turret = turret; diff --git a/src/main/java/frc/robot/util/ShooterPhysics.java b/src/main/java/frc/robot/util/ShooterPhysics.java index 4e40995..f88d3b8 100644 --- a/src/main/java/frc/robot/util/ShooterPhysics.java +++ b/src/main/java/frc/robot/util/ShooterPhysics.java @@ -44,6 +44,17 @@ public class ShooterPhysics { * @param peakHeight The peak height the trajectory should reach. * @return A TurretState that represents the shot the robot should take. */ + /* + zExitVel = 6.260990336 <-- im calling this x + z is the hub height = 72 inches + (-x - sqrt(x^2 -2 gz)) / -g + 0.83 seconds when shooting + + 1.28 seconds when shuttling since target is 0; + + 0.83 * 0.85 + + */ public static TurretState getShotParams(Translation2d robotVelocity, Translation3d robotToTarget, double peakHeight) { double zExitVel = Math.sqrt(2 * peakHeight * Constants.GRAVITY_ACCELERATION); -- 2.39.5