aboutsummaryrefslogtreecommitdiff
path: root/src/path.h
blob: 8aaa02469681fb47ac252228979f5a5d7c5ab1d6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
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