mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
[wpimath] Make RamseteController::Calculate() more concise (#3763)
This commit is contained in:
@@ -71,10 +71,8 @@ ChassisSpeeds RamseteController::Calculate(
|
||||
units::math::sqrt(units::math::pow<2>(omegaRef) +
|
||||
m_b * units::math::pow<2>(vRef));
|
||||
|
||||
units::meters_per_second_t v{vRef * m_poseError.Rotation().Cos() + k * eX};
|
||||
units::radians_per_second_t omega{omegaRef + k * eTheta +
|
||||
m_b * vRef * Sinc(eTheta) * eY};
|
||||
return ChassisSpeeds{v, 0_mps, omega};
|
||||
return ChassisSpeeds{vRef * m_poseError.Rotation().Cos() + k * eX, 0_mps,
|
||||
omegaRef + k * eTheta + m_b * vRef * Sinc(eTheta) * eY};
|
||||
}
|
||||
|
||||
ChassisSpeeds RamseteController::Calculate(
|
||||
|
||||
Reference in New Issue
Block a user