Module liba.trajpoly3
cubic polynomial trajectory
Functions
new (ts, p0, p1[, v0[, v1]]) | constructor for cubic polynomial trajectory |
gen (ctx, ts, p0, p1[, v0[, v1]]) | generate for cubic polynomial trajectory |
pos (ctx, x) | calculate position for cubic polynomial trajectory |
vel (ctx, x) | calculate velocity for cubic polynomial trajectory |
acc (ctx, x) | calculate acceleration for cubic polynomial trajectory |
Functions
- new (ts, p0, p1[, v0[, v1]])
-
constructor for cubic polynomial trajectory
Parameters:
- ts number difference between final time and initial time
- p0 number initial position
- p1 number final position
- v0 number initial velocity (optional)
- v1 number final velocity (optional)
Returns:
-
a.trajpoly3
cubic polynomial trajectory userdata
- gen (ctx, ts, p0, p1[, v0[, v1]])
-
generate for cubic polynomial trajectory
Parameters:
- ctx a.trajpoly3 cubic polynomial trajectory userdata
- ts number difference between final time and initial time
- p0 number initial position
- p1 number final position
- v0 number initial velocity (optional)
- v1 number final velocity (optional)
Returns:
-
a.trajpoly3
cubic polynomial trajectory userdata
- pos (ctx, x)
-
calculate position for cubic polynomial trajectory
Parameters:
- ctx a.trajpoly3 cubic polynomial trajectory userdata
- x number difference between current time and initial time
Returns:
-
number
position output
- vel (ctx, x)
-
calculate velocity for cubic polynomial trajectory
Parameters:
- ctx a.trajpoly3 cubic polynomial trajectory userdata
- x number difference between current time and initial time
Returns:
-
number
velocity output
- acc (ctx, x)
-
calculate acceleration for cubic polynomial trajectory
Parameters:
- ctx a.trajpoly3 cubic polynomial trajectory userdata
- x number difference between current time and initial time
Returns:
-
number
acceleration output