mirror of
https://github.com/Team4388/2022NoWayHome.git
synced 2026-06-09 08:48:07 -06:00
Merge branch 'testRoboReveal' of https://github.com/Team4388/2022NoWayHome into testRoboReveal
This commit is contained in:
@@ -74,6 +74,7 @@ public class AimToCenter extends CommandBase {
|
||||
|
||||
public static double angleToCenter(double x, double y, double gyro) {
|
||||
double angle = ((Math.atan2(y, x) * (180./Math.PI) - gyro) + 180. + (360. * 4)) % 360.; // Finds the angle between the gyro of the robot and the target (positive x is gyro 0)
|
||||
// double angle = Math.toDegrees(Math.atan2(y, -x) - gyro);
|
||||
return (angle - 360);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user