mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-22 01:11:42 +00:00
[wpilib] Use RKDP in DifferentialDrivetrainSim (#5931)
This commit is contained in:
@@ -148,8 +148,7 @@ public class DifferentialDrivetrainSim {
|
||||
* @param dtSeconds the time difference
|
||||
*/
|
||||
public void update(double dtSeconds) {
|
||||
// Update state estimate with RK4
|
||||
m_x = NumericalIntegration.rk4(this::getDynamics, m_x, m_u, dtSeconds);
|
||||
m_x = NumericalIntegration.rkdp(this::getDynamics, m_x, m_u, dtSeconds);
|
||||
m_y = m_x;
|
||||
if (m_measurementStdDevs != null) {
|
||||
m_y = m_y.plus(StateSpaceUtil.makeWhiteNoiseVector(m_measurementStdDevs));
|
||||
|
||||
Reference in New Issue
Block a user