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