]> git.taranathan.com Git - FRC2026.git/commitdiff
tof change
authormaxwtan <100314265+MaxwellTTan20@users.noreply.github.com>
Sat, 11 Apr 2026 17:07:58 +0000 (10:07 -0700)
committermaxwtan <100314265+MaxwellTTan20@users.noreply.github.com>
Sat, 11 Apr 2026 17:07:58 +0000 (10:07 -0700)
src/main/java/frc/robot/commands/gpm/Superstructure.java
src/main/java/frc/robot/util/ShooterPhysics.java

index 97554f0cdf009003936bcebdac43ab3fc47a1ca5..1fe654d47b0fb0d5610aefc7bf117601c29517a5 100644 (file)
@@ -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;
index 4e40995757a39cfb8cf6abae773a8823674ae55d..f88d3b8292a8e57e2dc55391897f5973ce8f82d3 100644 (file)
@@ -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);