Update ftc2024-holonom.java

This commit is contained in:
GZod01 2024-01-21 15:19:41 +01:00 committed by GitHub
parent 0029cc2dfb
commit 0a25e45cc8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -110,7 +110,7 @@ public class Werobot_FTC2024 extends LinearOpMode {
double cur_motor_norm = Math.pow(((Math.pow(cur_motor[0],2))+(Math.pow(cur_motor[1],2))),(1.0/2.0)); double cur_motor_norm = Math.pow(((Math.pow(cur_motor[0],2))+(Math.pow(cur_motor[1],2))),(1.0/2.0));
double joystick_angle = Math.atan2(joystick_vector[0],joystick_vector[1]); double joystick_angle = Math.atan2(joystick_vector[0],joystick_vector[1]);
double cur_motor_angle = Math.atan2(cur_motor[0],cur_motor[1]); double cur_motor_angle = Math.atan2(cur_motor[0],cur_motor[1]);
double diff_angle = joystick_angle - cur_motor_angle+(Math.PI/4); double diff_angle = joystick_angle - cur_motor_angle - (Math.PI/4.0);
if (mode=="normal"){ if (mode=="normal"){
diff_angle-=Yaw; diff_angle-=Yaw;
} }