Paparazzi UAS
v5.15_devel-230-gc96ce27
Paparazzi is a free software Unmanned Aircraft System.
|
Runge-Kutta library (float version) More...
#include "math/pprz_algebra_float.h"
Go to the source code of this file.
Functions | |
static void | runge_kutta_1_float (float *xo, const float *x, const int n, const float *u, const int m, void(*f)(float *o, const float *x, const int n, const float *u, const int m), const float dt) |
First-Order Runge-Kutta. More... | |
static void | runge_kutta_2_float (float *xo, const float *x, const int n, const float *u, const int m, void(*f)(float *o, const float *x, const int n, const float *u, const int m), const float dt) |
Second-Order Runge-Kutta. More... | |
static void | runge_kutta_4_float (float *xo, const float *x, const int n, const float *u, const int m, void(*f)(float *o, const float *x, const int n, const float *u, const int m), const float dt) |
Fourth-Order Runge-Kutta. More... | |
Runge-Kutta library (float version)
Definition in file pprz_rk_float.h.
|
inlinestatic |
First-Order Runge-Kutta.
aka RK1, aka the euler method
considering x' = f(x,u) with x = x0 the initial state and u the command vector
x_new = x + dt * f(x, u) is the integrated state vector x based on model f under command u
xo | output integrated state |
x | initial state |
n | state dimension |
u | command vector |
m | command dimension |
f | model function |
dt | integration step |
Definition at line 55 of file pprz_rk_float.h.
References float_vect_add(), and float_vect_smul().
|
inlinestatic |
Second-Order Runge-Kutta.
aka RK2, aka the mid-point method
considering x' = f(x,u) with x = x0 the initial state and u the command vector
mid_point = x + (dt/2)*f(x, u) x_new = x + dt * f(mid_point, u) is the integrated state vector x based on model f under command u
xo | output integrated state |
x | initial state |
n | state dimension |
u | command vector |
m | command dimension |
f | model function |
dt | integration step |
Definition at line 89 of file pprz_rk_float.h.
References float_vect_add(), and float_vect_smul().
|
inlinestatic |
Fourth-Order Runge-Kutta.
aka RK4, aka 'the' Runge-Kutta
considering x' = f(x,u) with x = x0 the initial state and u the command vector
k1 = f(x, u) k2 = f(x + dt * (k1 / 2), u) k3 = f(x + dt * (k2 / 2), u) k4 = f(x + dt * k3, u)
x_new = x + (dt / 6) * (k1 + 2 * (k2 + k3) + k4) is the integrated state vector x based on model f under command u
xo | output integrated state |
x | initial state |
n | state dimension |
u | command vector |
m | command dimension |
f | model function |
dt | integration step |
Definition at line 132 of file pprz_rk_float.h.
References float_vect_add(), float_vect_smul(), and float_vect_sum().
Referenced by ahrs_float_invariant_propagate(), and ins_float_invariant_propagate().