mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-28 02:11:43 +00:00
[wpimath] Replace frc/EigenCore.h typedefs with Eigen's where possible (#5597)
This commit is contained in:
@@ -49,7 +49,7 @@ class WPILIB_DLLEXPORT CubicHermiteSpline : public Spline<3> {
|
||||
* Returns the hermite basis matrix for cubic hermite spline interpolation.
|
||||
* @return The hermite basis matrix for cubic hermite spline interpolation.
|
||||
*/
|
||||
static Matrixd<4, 4> MakeHermiteBasis() {
|
||||
static Eigen::Matrix4d MakeHermiteBasis() {
|
||||
// Given P(i), P'(i), P(i+1), P'(i+1), the control vectors, we want to find
|
||||
// the coefficients of the spline P(t) = a₃t³ + a₂t² + a₁t + a₀.
|
||||
//
|
||||
@@ -71,10 +71,10 @@ class WPILIB_DLLEXPORT CubicHermiteSpline : public Spline<3> {
|
||||
// [a₁] = [ 0 1 0 0][P(i+1) ]
|
||||
// [a₀] = [ 1 0 0 0][P'(i+1)]
|
||||
|
||||
static const Matrixd<4, 4> basis{{+2.0, +1.0, -2.0, +1.0},
|
||||
{-3.0, -2.0, +3.0, -1.0},
|
||||
{+0.0, +1.0, +0.0, +0.0},
|
||||
{+1.0, +0.0, +0.0, +0.0}};
|
||||
static const Eigen::Matrix4d basis{{+2.0, +1.0, -2.0, +1.0},
|
||||
{-3.0, -2.0, +3.0, -1.0},
|
||||
{+0.0, +1.0, +0.0, +0.0},
|
||||
{+1.0, +0.0, +0.0, +0.0}};
|
||||
return basis;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user