Update autonome_api.java

This commit is contained in:
GZod01 2024-03-07 16:21:56 +01:00 committed by GitHub
parent fe5e982adf
commit ce1f5a5741
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -52,7 +52,9 @@ public class ftc2024_autonome_api extends LinearOpMode {
}
public void rotate(double angle, double motor_speed=1.0){
double start_yaw = robotOrientation.getYaw(AngleUnit.DEGREES);
angle = Math.toDegrees(Math.atan(Math.tan(Math.toRadians(angle))));
angle = 200.0;
double anglerad = Math.toRadians(angle);
angle = Math.toDegrees(Math.atan2(Math.sin(anglerad),Math.cos(anglerad)));
double left_multiplier = -( (double) Math.signum(angle));
double right_multiplier = ((double) Math.signum(angle));
double m_power = motor_speed;