This commit is contained in:
Gzod01 2024-01-06 16:40:38 +01:00
parent e1a6059f8c
commit ebdf086efc

View file

@ -67,9 +67,9 @@ public class Werobot_FTC2024_carlike extends LinearOpMode {
rpower = gamepad1.right_stick_y; rpower = gamepad1.right_stick_y;
} }
else if (mode=="essaifranck"){ else if (mode=="essaifranck"){
double a = (x+y)/Math.pow(2,1/2); double a = (y+x)/Math.pow(2,1/2);
double b = (x-y)/Math.pow(2,1/2); double b = (y-x)/Math.pow(2,1/2);
double vmean = (a+b)/2; double vmean = (Math.abs(a)+Math.abs(b))/2;
lpower = (a/vmean)*t2; lpower = (a/vmean)*t2;
rpower = (b/vmean)*t2; rpower = (b/vmean)*t2;
} }