Drive Vector Scaler
This is the DriveVectorScaler class. This class takes in inputs Vectors for driving, heading correction, and translational/centripetal correction and returns an array with wheel powers.
Author
Anyi Lin - 10158 Scott's Bots
Aaron Yang - 10158 Scott's Bots
Harrison Womack - 10158 Scott's Bots
Constructors
Properties
Link copied to clipboard
public double maxPowerScaling
Functions
Link copied to clipboard
This takes in two Vectors, one static and one variable, and returns the scaling factor that, when multiplied to the variable Vector, results in magnitude of the sum of the static Vector and the scaled variable Vector being the max power scaling.
Link copied to clipboard
public Array<double> getDrivePowers(Vector correctivePower, Vector headingPower, Vector pathingPower, double robotHeading)
This takes in vectors for corrective power, heading power, and pathing power and outputs an Array of four doubles, one for each wheel's motor power.
Link copied to clipboard
Gets the maximum power that can be used by the drive vector scaler.
Link copied to clipboard
Sets the maximum power that can be used by the drive vector scaler.