mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-28 02: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:
@@ -6,8 +6,8 @@
|
||||
|
||||
#include <Eigen/Core>
|
||||
|
||||
#include "org_wpilib_math_jni_StateSpaceUtilJNI.h"
|
||||
#include "wpi/math/util/StateSpaceUtil.hpp"
|
||||
#include "org_wpilib_math_jni_LinearSystemUtilJNI.h"
|
||||
#include "wpi/math/system/LinearSystemUtil.hpp"
|
||||
#include "wpi/util/jni_util.hpp"
|
||||
|
||||
using namespace wpi::util::java;
|
||||
@@ -15,12 +15,12 @@ using namespace wpi::util::java;
|
||||
extern "C" {
|
||||
|
||||
/*
|
||||
* Class: org_wpilib_math_jni_StateSpaceUtilJNI
|
||||
* Class: org_wpilib_math_jni_LinearSystemUtilJNI
|
||||
* Method: isStabilizable
|
||||
* Signature: (II[D[D)Z
|
||||
*/
|
||||
JNIEXPORT jboolean JNICALL
|
||||
Java_org_wpilib_math_jni_StateSpaceUtilJNI_isStabilizable
|
||||
Java_org_wpilib_math_jni_LinearSystemUtilJNI_isStabilizable
|
||||
(JNIEnv* env, jclass, jint states, jint inputs, jdoubleArray aSrc,
|
||||
jdoubleArray bSrc)
|
||||
{
|
||||
Reference in New Issue
Block a user