[wpilib] Use RKDP in DifferentialDrivetrainSim (#5931)

This commit is contained in:
Tyler Veness
2023-11-17 08:41:18 -08:00
committed by GitHub
parent ead9ae5a69
commit b1fad062f7
4 changed files with 6 additions and 7 deletions

View File

@@ -58,7 +58,7 @@ void DifferentialDrivetrainSim::SetGearing(double newGearing) {
}
void DifferentialDrivetrainSim::Update(units::second_t dt) {
m_x = RK4([this](auto& x, auto& u) { return Dynamics(x, u); }, m_x, m_u, dt);
m_x = RKDP([this](auto& x, auto& u) { return Dynamics(x, u); }, m_x, m_u, dt);
m_y = m_x + frc::MakeWhiteNoiseVector<7>(m_measurementStdDevs);
}