mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-07-04 03:11:43 +00:00
[wpimath] Refactor StateSpaceUtil into separate files (#8421)
* Moved makeWhiteNoiseVector() to random.Normal.normal() * Moved isControllable() and isDetectable() to system.LinearSystemUtil * Renamed makeCostMatrix() to costMatrix() (Java) * Renamed makeCovarianceMatrix() to covarianceMatrix() (Java) * Renamed MakeCostMatrix() to CostMatrix() (C++) * Renamed MakeCovMatrix() to CovarianceMatrix() (C++) * Removed deprecated poseTo3dVector(), poseTo4dVector(), poseToVector() * Removed clampInputMaxMagnitude() * We don't use it, and Eigen has this functionality built in via `u = u.array().min(u_max.array()).max(u_min.array());` * Simplified implementation of desaturateInputVector()
This commit is contained in:
@@ -7,9 +7,9 @@
|
||||
#include <array>
|
||||
|
||||
#include "wpi/math/linalg/EigenCore.hpp"
|
||||
#include "wpi/math/random/Normal.hpp"
|
||||
#include "wpi/math/system/LinearSystem.hpp"
|
||||
#include "wpi/math/util/StateSpaceUtil.hpp"
|
||||
#include "wpi/units/current.hpp"
|
||||
#include "wpi/units/time.hpp"
|
||||
|
||||
namespace wpi::sim {
|
||||
@@ -61,7 +61,7 @@ class LinearSystemSim {
|
||||
// Add noise. If the user did not pass a noise vector to the
|
||||
// constructor, then this method will not do anything because
|
||||
// the standard deviations default to zero.
|
||||
m_y += wpi::math::MakeWhiteNoiseVector<Outputs>(m_measurementStdDevs);
|
||||
m_y += wpi::math::Normal<Outputs>(m_measurementStdDevs);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user