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
/***
cubic polynomial trajectory
@classmod a.trajpoly3
*/
#ifndef LUA_LIBA_TRAJPOLY3_H
#define LUA_LIBA_TRAJPOLY3_H
#include "a.h"
/***
cubic polynomial trajectory
@field p coefficients of position
@field v coefficients of velocity
@field a coefficients of acceleration
@table a.trajpoly3
*/
#if defined(__cplusplus)
extern "C" {
#endif /* __cplusplus */
/***
constructor for cubic 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
@treturn a.trajpoly3 cubic polynomial trajectory userdata
@function new
*/
int liba_trajpoly3_new(lua_State *L);
/***
generate for cubic 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
@treturn a.trajpoly3 cubic polynomial trajectory userdata
@function gen
*/
int liba_trajpoly3_gen(lua_State *L);
/***
calculate position for cubic polynomial trajectory
@tparam number x difference between current time and initial time
@treturn number position output
@function pos
*/
int liba_trajpoly3_pos(lua_State *L);
/***
calculate velocity for cubic polynomial trajectory
@tparam number x difference between current time and initial time
@treturn number velocity output
@function vel
*/
int liba_trajpoly3_vel(lua_State *L);
/***
calculate acceleration for cubic polynomial trajectory
@tparam number x difference between current time and initial time
@treturn number acceleration output
@function acc
*/
int liba_trajpoly3_acc(lua_State *L);
#if defined(__cplusplus)
} /* extern "C" */
#endif /* __cplusplus */
#endif /* trajpoly3.h */