mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-02 05:04:08 +08:00
Changed rk4 to use generic matrix interface.
This commit is contained in:
parent
b9924820e1
commit
f2c0669c0d
@ -6,12 +6,12 @@ namespace matrix {
|
||||
|
||||
template<typename Type, size_t M, size_t N>
|
||||
int integrate_rk4(
|
||||
Vector<Type, M> (*f)(Type, const Vector<Type, M> &x, const Vector<Type, N> & u),
|
||||
const Vector<Type, M> & y0,
|
||||
const Vector<Type, N> & u,
|
||||
Vector<Type, M> (*f)(Type, const Matrix<Type, M, 1> &x, const Matrix<Type, N, 1> & u),
|
||||
const Matrix<Type, M, 1> & y0,
|
||||
const Matrix<Type, N, 1> & u,
|
||||
Type t0,
|
||||
Type h,
|
||||
Vector<Type, M> & y1
|
||||
Matrix<Type, M, 1> & y1
|
||||
)
|
||||
{
|
||||
// https://en.wikipedia.org/wiki/Runge%E2%80%93Kutta_methods
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user