3 import java
.nio
.ByteBuffer
;
5 /** quintic polynomial trajectory */
6 public class trajpoly5
{
9 System
.loadLibrary("a");
13 static final native void clinit();
16 * get coefficients of position for quintic polynomial trajectory
18 * @return coefficients of position
20 public final native double[] p();
23 * get coefficients of velocity for quintic polynomial trajectory
25 * @return coefficients of velocity
27 public final native double[] v();
30 * get coefficients of acceleration for quintic polynomial trajectory
32 * @return coefficients of acceleration
34 public final native double[] a();
37 * construct a new {@link trajpoly5} object
39 * @param ts difference between final time and initial time
40 * @param p0 initial position
41 * @param p1 final position
42 * @param v0 initial velocity
43 * @param v1 final velocity
44 * @param a0 initial acceleration
45 * @param a1 final acceleration
47 public trajpoly5(double ts
, double p0
, double p1
, double v0
, double v1
,
48 double a0
, double a1
) {
49 gen(ts
, p0
, p1
, v0
, v1
, a0
, a1
);
53 * generate for quintic polynomial trajectory
55 * @param ts difference between final time and initial time
56 * @param p0 initial position
57 * @param p1 final position
58 * @param v0 initial velocity
59 * @param v1 final velocity
60 * @param a0 initial acceleration
61 * @param a1 final acceleration
62 * @return {@link trajpoly5}
64 public final native trajpoly5
gen(double ts
, double p0
, double p1
, double v0
, double v1
,
65 double a0
, double a1
);
68 * calculate position for quintic polynomial trajectory
70 * @param x difference between current time and initial time
71 * @return position output
73 public final native double pos(double x
);
76 * calculate velocity for quintic polynomial trajectory
78 * @param x difference between current time and initial time
79 * @return velocity output
81 public final native double vel(double x
);
84 * calculate acceleration for quintic polynomial trajectory
86 * @param x difference between current time and initial time
87 * @return acceleration output
89 public final native double acc(double x
);