TeamCode/src/main/java/org/firstinspires/ftc/teamcode/libraries/AutoLib.java
public static MotorPowers GetSquirrelyWheelMotorPowers(
            double heading    // in degrees, zero = straight ahead, positive CCW, range +-180
    )
    {
        // wrap heading around to acceptable range
        heading = SensorLib.Utils.wrapAngle(heading);

        // compute front and back wheel relative speeds needed to go in desired direction
        double front = 0.0f;
        double back = 0.0f;
        if (heading < 0) {
            if (heading > -90) {
                front = 1.0;
                back = lerp(heading, 0, -90, 1, -1);
            } else {
                front = lerp(heading, -90, -180, 1, -1);
                back = -1.0;
            }
        }
        else {
            if (heading < 90) {
                front = lerp(heading, 0, 90, 1, -1);
                back = 1.0;
            }
            else {
                front = -1.0;
                back = lerp(heading, 90, 180, 1, -1);
            }
        }

        // return results
        return new MotorPowers(front, back);
    }
// "Back" (left) refers to a wheel whose rollers point to the left on the top of the wheel.
"Back" (left) refers to a wheel whose rollers point to the left on the top of the wheel.
" Back " ( left ) refers to a wheel whose rollers point to the left on the top of the wheel .
public static MotorPowers GetSquirrelyWheelMotorPowers(
            double heading    
    )
    {
        heading = SensorLib.Utils.wrapAngle(heading);
        double front = 0.0f;
        double back = 0.0f;
        if (heading < 0) {
            if (heading > -90) {
                front = 1.0;
                back = lerp(heading, 0, -90, 1, -1);
            } else {
                front = lerp(heading, -90, -180, 1, -1);
                back = -1.0;
            }
        }
        else {
            if (heading < 90) {
                front = lerp(heading, 0, 90, 1, -1);
                back = 1.0;
            }
            else {
                front = -1.0;
                back = lerp(heading, 90, 180, 1, -1);
            }
        }
        return new MotorPowers(front, back);
    }
public static MotorPowers GetSquirrelyWheelMotorPowers ( double heading ) { heading = SensorLib . Utils . wrapAngle ( heading ) ; double front = 0.0f ; double back = 0.0f ; if ( heading < 0 ) { if ( heading > - 90 ) { front = 1.0 ; back = lerp ( heading , 0 , - 90 , 1 , - 1 ) ; } else { front = lerp ( heading , - 90 , - 180 , 1 , - 1 ) ; back = - 1.0 ; } } else { if ( heading < 90 ) { front = lerp ( heading , 0 , 90 , 1 , - 1 ) ; back = 1.0 ; } else { front = - 1.0 ; back = lerp ( heading , 90 , 180 , 1 , - 1 ) ; } } return new MotorPowers ( front , back ) ; }
"Back" (left) refers to a wheel whose rollers point to the left on the top of the wheel.
" Back " ( left ) refers to a wheel whose rollers point to the left on the top of the wheel .
// in degrees, zero = straight ahead, positive CCW, range +-180 // wrap heading around to acceptable range // compute front and back wheel relative speeds needed to go in desired direction // return results