discrete_time_rocket_c/cfunction.cpp
Go to the documentation of this file.
1 void myAcadoDifferentialEquation( double *x, double *f, void *user_data ){
2 
3  // x[0] -> time t
4  // x[1] -> v
5  // x[2] -> s
6  // x[3] -> m
7  // x[4] -> u
8 
9  double h = 0.01;
10 
11  double t = x[0];
12  double v = x[1];
13  double s = x[2];
14  double m = x[3];
15  double u = x[4];
16 
17  f[0] = s + h*v;
18  f[0] = v + h*(u-0.02*v*v)/m;
19  f[0] = m - h*0.01*u*u;
20 
21 }
void myAcadoDifferentialEquation(double *x, double *f, void *user_data)
#define v


acado
Author(s): Milan Vukov, Rien Quirynen
autogenerated on Mon Jun 10 2019 12:34:29