liba 0.1.15
An algorithm library based on C/C++
Loading...
Searching...
No Matches
trajpoly7.h
Go to the documentation of this file.
1
7#ifndef LIBA_TRAJPOLY7_H
8#define LIBA_TRAJPOLY7_H
9
10#include "a.h"
11
18typedef struct a_trajpoly7 a_trajpoly7;
19
20#if !defined A_TRAJPOLY7
21#define A_TRAJPOLY7 4
22#endif /* A_TRAJPOLY7 */
23#if defined(__cplusplus)
24extern "C" {
25#endif /* __cplusplus */
26
54A_EXTERN void a_trajpoly7_gen(a_trajpoly7 *ctx, a_float ts,
55 a_float p0, a_float p1,
56 a_float v0, a_float v1,
57 a_float a0, a_float a1,
58 a_float j0, a_float j1);
59A_EXTERN void a_trajpoly7_gen0(a_trajpoly7 *ctx, a_float ts,
60 a_float p0, a_float p1,
61 a_float v0, a_float v1,
62 a_float a0, a_float a1,
63 a_float j0, a_float j1);
64#if defined(A_TRAJPOLY7) && (A_TRAJPOLY7 + 0 > 1)
65A_EXTERN void a_trajpoly7_gen1(a_trajpoly7 *ctx);
66#endif /* A_TRAJPOLY7 */
67#if defined(A_TRAJPOLY7) && (A_TRAJPOLY7 + 0 > 2)
68A_EXTERN void a_trajpoly7_gen2(a_trajpoly7 *ctx);
69#endif /* A_TRAJPOLY7 */
70#if defined(A_TRAJPOLY7) && (A_TRAJPOLY7 + 0 > 3)
71A_EXTERN void a_trajpoly7_gen3(a_trajpoly7 *ctx);
72#endif /* A_TRAJPOLY7 */
73
86
87#if defined(A_TRAJPOLY7) && (A_TRAJPOLY7 + 0 > 1)
100#endif /* A_TRAJPOLY7 */
101
102#if defined(A_TRAJPOLY7) && (A_TRAJPOLY7 + 0 > 2)
115#endif /* A_TRAJPOLY7 */
116
117#if defined(A_TRAJPOLY7) && (A_TRAJPOLY7 + 0 > 3)
130#endif /* A_TRAJPOLY7 */
131
132#if defined(__cplusplus)
133} /* extern "C" */
134namespace a
135{
136typedef struct a_trajpoly7 trajpoly7;
137} /* namespace a */
138#endif /* __cplusplus */
139
152{
154#if defined(A_TRAJPOLY7) && (A_TRAJPOLY7 + 0 > 1)
156#endif /* A_TRAJPOLY7 */
157#if defined(A_TRAJPOLY7) && (A_TRAJPOLY7 + 0 > 2)
159#endif /* A_TRAJPOLY7 */
160#if defined(A_TRAJPOLY7) && (A_TRAJPOLY7 + 0 > 3)
162#endif /* A_TRAJPOLY7 */
163#if defined(__cplusplus)
164 A_INLINE void gen(a_float ts, a_float p0, a_float p1,
165 a_float v0 = 0, a_float v1 = 0,
166 a_float a0 = 0, a_float a1 = 0,
167 a_float j0 = 0, a_float j1 = 0)
168 {
169 a_trajpoly7_gen(this, ts, p0, p1, v0, v1, a0, a1, j0, j1);
170 }
171 A_INLINE void gen0(a_float ts, a_float p0, a_float p1,
172 a_float v0 = 0, a_float v1 = 0,
173 a_float a0 = 0, a_float a1 = 0,
174 a_float j0 = 0, a_float j1 = 0)
175 {
176 a_trajpoly7_gen0(this, ts, p0, p1, v0, v1, a0, a1, j0, j1);
177 }
178 A_INLINE a_float pos(a_float x) const
179 {
180 return a_trajpoly7_pos(this, x);
181 }
182#if defined(A_TRAJPOLY7) && (A_TRAJPOLY7 + 0 > 1)
183 A_INLINE void gen1() { a_trajpoly7_gen1(this); }
184 A_INLINE a_float vel(a_float x) const
185 {
186 return a_trajpoly7_vel(this, x);
187 }
188#endif /* A_TRAJPOLY7 */
189#if defined(A_TRAJPOLY7) && (A_TRAJPOLY7 + 0 > 2)
190 A_INLINE void gen2() { a_trajpoly7_gen2(this); }
191 A_INLINE a_float acc(a_float x) const
192 {
193 return a_trajpoly7_acc(this, x);
194 }
195#endif /* A_TRAJPOLY7 */
196#if defined(A_TRAJPOLY7) && (A_TRAJPOLY7 + 0 > 3)
197 A_INLINE void gen3() { a_trajpoly7_gen3(this); }
198 A_INLINE a_float jer(a_float x) const
199 {
200 return a_trajpoly7_jer(this, x);
201 }
202#endif /* A_TRAJPOLY7 */
203#endif /* __cplusplus */
204};
205
208#endif /* a/trajpoly7.h */
algorithm library
#define a_float
Definition a.h:785
double a_trajpoly7_vel(a_trajpoly7 const *ctx, double x)
calculate velocity for hepta polynomial trajectory
double a_trajpoly7_acc(a_trajpoly7 const *ctx, double x)
calculate acceleration for hepta polynomial trajectory
void a_trajpoly7_gen(a_trajpoly7 *ctx, double ts, double p0, double p1, double v0, double v1, double a0, double a1, double j0, double j1)
generate for hepta polynomial trajectory
double a_trajpoly7_pos(a_trajpoly7 const *ctx, double x)
calculate position for hepta polynomial trajectory
double a_trajpoly7_jer(a_trajpoly7 const *ctx, double x)
calculate jerk for hepta polynomial trajectory
instance structure for hepta polynomial trajectory
Definition trajpoly7.h:152
double a[6]
coefficients of acceleration
Definition trajpoly7.h:158
double p[8]
coefficients of position
Definition trajpoly7.h:153
double v[7]
coefficients of velocity
Definition trajpoly7.h:155
double j[5]
coefficients of jerk
Definition trajpoly7.h:161