Paparazzi UAS  v7.0_unstable
Paparazzi is a free software Unmanned Aircraft System.
pprz_rk_float.h File Reference

Runge-Kutta library (float version) More...

+ Include dependency graph for pprz_rk_float.h:
+ This graph shows which files directly or indirectly include this file:

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...
 

Detailed Description

Runge-Kutta library (float version)

Definition in file pprz_rk_float.h.

Function Documentation

◆ runge_kutta_1_float()

static void runge_kutta_1_float ( float *  xo,
const float *  x,
const int  n,
const float *  u,
const int  m,
void(*)(float *o, const float *x, const int n, const float *u, const int m)  f,
const float  dt 
)
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

Parameters
xooutput integrated state
xinitial state
nstate dimension
ucommand vector
mcommand dimension
fmodel function
dtintegration step

Definition at line 55 of file pprz_rk_float.h.

References f, float_vect_add(), float_vect_smul(), and simple_quad_sim::m.

+ Here is the call graph for this function:

◆ runge_kutta_2_float()

static void runge_kutta_2_float ( float *  xo,
const float *  x,
const int  n,
const float *  u,
const int  m,
void(*)(float *o, const float *x, const int n, const float *u, const int m)  f,
const float  dt 
)
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

Parameters
xooutput integrated state
xinitial state
nstate dimension
ucommand vector
mcommand dimension
fmodel function
dtintegration step

Definition at line 89 of file pprz_rk_float.h.

References f, float_vect_add(), float_vect_smul(), and simple_quad_sim::m.

+ Here is the call graph for this function:

◆ runge_kutta_4_float()

static void runge_kutta_4_float ( float *  xo,
const float *  x,
const int  n,
const float *  u,
const int  m,
void(*)(float *o, const float *x, const int n, const float *u, const int m)  f,
const float  dt 
)
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

Parameters
xooutput integrated state
xinitial state
nstate dimension
ucommand vector
mcommand dimension
fmodel function
dtintegration step

Definition at line 132 of file pprz_rk_float.h.

References f, float_vect_add(), float_vect_smul(), float_vect_sum(), and simple_quad_sim::m.

Referenced by ahrs_float_invariant_propagate(), and ins_float_invariant_propagate().

+ Here is the call graph for this function:
+ Here is the caller graph for this function: