diff options
Diffstat (limited to 'src/path.h')
-rw-r--r-- | src/path.h | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/path.h b/src/path.h new file mode 100644 index 0000000..8aaa024 --- /dev/null +++ b/src/path.h @@ -0,0 +1,21 @@ +#ifndef PATH_H +#define PATH_H + +#include <gsl/gsl_spline.h> + +typedef double getKineticEnergyFunc(double x, double T0); + +typedef struct path { + double pos[3]; + double dir[3]; + double theta0; + gsl_interp_accel *acc[8]; + gsl_spline *spline[8]; +} path; + +double path_get_coefficient(unsigned int k, double *s, double *x, double theta0, size_t n); +path *path_init(double *pos, double *dir, double T0, double range, double theta0, getKineticEnergyFunc *fun, double *z1, double *z2, size_t n, double m); +void path_eval(path *p, double s, double *pos, double *dir, double *T, double *t); +void path_free(path *p); + +#endif |