From: Arnav495 Date: Tue, 24 Feb 2026 23:56:56 +0000 (-0800) Subject: Merge remote-tracking branch 'origin/main' into shooter-calcs X-Git-Url: https://git.taranathan.com/?a=commitdiff_plain;h=ad4eeaaa01a23295a4f1c38a09836bed227af026;p=FRC2026.git Merge remote-tracking branch 'origin/main' into shooter-calcs --- ad4eeaaa01a23295a4f1c38a09836bed227af026 diff --cc src/main/java/frc/robot/commands/gpm/AutoShootCommand.java index 7b0e834,e12d054..14583ba --- a/src/main/java/frc/robot/commands/gpm/AutoShootCommand.java +++ b/src/main/java/frc/robot/commands/gpm/AutoShootCommand.java @@@ -107,14 -106,12 +107,14 @@@ public class AutoShootCommand extends C */ for (int i = 0; i < 20; i++) { Translation3d lookahead3d = new Translation3d(lookaheadPose.getX(), lookaheadPose.getY(), TurretConstants.DISTANCE_FROM_ROBOT_CENTER.getZ()); - Translation3d target3d = new Translation3d(target.getX(), target.getY(), FieldConstants.getHubTranslation().getZ()); // Add if statement so that it's only when it's shooting + Translation3d target3d = new Translation3d(target.getX(), target.getY(), FieldConstants.getHubTranslation().getZ()); - goalState = ShooterPhysics.getShotParams( + var goalStateWithT = ShooterPhysics.getShotParamsWithT( + Translation2d.kZero, target3d.minus(lookahead3d), 2.0); + goalState = goalStateWithT.getFirst(); - timeOfFlight = goalState.timeOfFlight(); + timeOfFlight = goalStateWithT.getSecond(); double offsetX = turretVelocityX * timeOfFlight; double offsetY = turretVelocityY * timeOfFlight; lookaheadPose =