mirror of
https://github.com/BroncBotz3481/YAGSL
synced 2026-06-26 07:01:39 +00:00
Added heading angular velocity deadband from 1466
This commit is contained in:
@@ -189,4 +189,15 @@ public class SwerveController
|
||||
config.maxAngularVelocity);
|
||||
}
|
||||
|
||||
/**
|
||||
* Calculate the angular velocity given the current and target heading angle in radians.
|
||||
*
|
||||
* @param currentHeadingAngleRadians The current heading of the robot in radians.
|
||||
* @param targetHeadingAngleRadians The target heading of the robot in radians.
|
||||
* @return Angular velocity in radians per second.
|
||||
*/
|
||||
public double headingCalculate(double currentHeadingAngleRadians, double targetHeadingAngleRadians)
|
||||
{
|
||||
return thetaController.calculate(currentHeadingAngleRadians, targetHeadingAngleRadians) * config.maxAngularVelocity;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user