1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
/***
quintic polynomial trajectory
@classmod a.trajpoly5
*/
#ifndef LUA_LIBA_TRAJPOLY5_H
#define LUA_LIBA_TRAJPOLY5_H
#include "a.h"
/***
quintic polynomial trajectory
@field p coefficients of position
@field v coefficients of velocity
@field a coefficients of acceleration
@table a.trajpoly5
*/
#if defined(__cplusplus)
extern "C" {
#endif /* __cplusplus */
/***
constructor for quintic polynomial trajectory
@tparam number ts difference between final time and initial time
@tparam number p0 initial position
@tparam number p1 final position
@tparam[opt] number v0 initial velocity
@tparam[opt] number v1 final velocity
@tparam[opt] number a0 initial acceleration
@tparam[opt] number a1 final acceleration
@treturn a.trajpoly5 quintic polynomial trajectory userdata
@function new
*/
int liba_trajpoly5_new(lua_State *L);
/***
generate for quintic polynomial trajectory
@tparam number ts difference between final time and initial time
@tparam number p0 initial position
@tparam number p1 final position
@tparam[opt] number v0 initial velocity
@tparam[opt] number v1 final velocity
@tparam[opt] number a0 initial acceleration
@tparam[opt] number a1 final acceleration
@treturn a.trajpoly5 quintic polynomial trajectory userdata
@function gen
*/
int liba_trajpoly5_gen(lua_State *L);
/***
calculate position for quintic polynomial trajectory
@tparam number x difference between current time and initial time
@treturn number position output
@function pos
*/
int liba_trajpoly5_pos(lua_State *L);
/***
calculate velocity for quintic polynomial trajectory
@tparam number x difference between current time and initial time
@treturn number velocity output
@function vel
*/
int liba_trajpoly5_vel(lua_State *L);
/***
calculate acceleration for quintic polynomial trajectory
@tparam number x difference between current time and initial time
@treturn number acceleration output
@function acc
*/
int liba_trajpoly5_acc(lua_State *L);
#if defined(__cplusplus)
} /* extern "C" */
#endif /* __cplusplus */
#endif /* trajpoly5.h */