liba
0.1.15
An algorithm library based on C/C++
Toggle main menu visibility
Loading...
Searching...
No Matches
trajpoly5.h
Go to the documentation of this file.
1
6
7
#ifndef LIBA_TRAJPOLY5_H
8
#define LIBA_TRAJPOLY5_H
9
10
#include "
a.h
"
11
17
18
typedef
struct
a_trajpoly5
a_trajpoly5
;
19
20
#if defined(__cplusplus)
21
extern
"C"
{
22
#endif
/* __cplusplus */
23
47
A_EXTERN
void
a_trajpoly5_gen
(
a_trajpoly5
*ctx,
a_real
ts,
48
a_real
p0,
a_real
p1,
49
a_real
v0,
a_real
v1,
50
a_real
a0,
a_real
a1);
51
57
A_EXTERN
void
a_trajpoly5_c0
(
a_trajpoly5
const
*ctx,
a_real
c
[6]);
58
64
A_EXTERN
void
a_trajpoly5_c1
(
a_trajpoly5
const
*ctx,
a_real
c
[5]);
65
71
A_EXTERN
void
a_trajpoly5_c2
(
a_trajpoly5
const
*ctx,
a_real
c
[4]);
72
84
A_EXTERN
a_real
a_trajpoly5_pos
(
a_trajpoly5
const
*ctx,
a_real
x);
85
97
A_EXTERN
a_real
a_trajpoly5_vel
(
a_trajpoly5
const
*ctx,
a_real
x);
98
110
A_EXTERN
a_real
a_trajpoly5_acc
(
a_trajpoly5
const
*ctx,
a_real
x);
111
112
#if defined(__cplusplus)
113
}
/* extern "C" */
114
namespace
a
115
{
116
typedef
struct
a_trajpoly5 trajpoly5;
117
}
/* namespace a */
118
#endif
/* __cplusplus */
119
130
struct
a_trajpoly5
131
{
132
a_real
c
[6];
133
#if defined(__cplusplus)
134
A_INLINE
void
gen(
a_real
ts,
a_real
p0,
a_real
p1,
135
a_real
v0 = 0,
a_real
v1 = 0,
136
a_real
a0 = 0,
a_real
a1 = 0)
137
{
138
a_trajpoly5_gen
(
this
, ts, p0, p1, v0, v1, a0, a1);
139
}
140
A_INLINE
a_real
pos(
a_real
x)
const
141
{
142
return
a_trajpoly5_pos
(
this
, x);
143
}
144
A_INLINE
a_real
vel(
a_real
x)
const
145
{
146
return
a_trajpoly5_vel
(
this
, x);
147
}
148
A_INLINE
a_real
acc(
a_real
x)
const
149
{
150
return
a_trajpoly5_acc
(
this
, x);
151
}
152
A_INLINE
void
c0(
a_real
x[6])
const
153
{
154
a_trajpoly5_c0
(
this
, x);
155
}
156
A_INLINE
void
c1(
a_real
x[5])
const
157
{
158
a_trajpoly5_c1
(
this
, x);
159
}
160
A_INLINE
void
c2(
a_real
x[4])
const
161
{
162
a_trajpoly5_c2
(
this
, x);
163
}
164
#endif
/* __cplusplus */
165
};
166
168
169
#endif
/* a/trajpoly5.h */
a.h
algorithm library
a_real
double a_real
compiler built-in floating-point number type
Definition
a.h:1012
a_trajpoly5_c2
void a_trajpoly5_c2(a_trajpoly5 const *ctx, a_real c[4])
compute coefficients of acceleration for quintic polynomial trajectory
a_trajpoly5_pos
a_real a_trajpoly5_pos(a_trajpoly5 const *ctx, a_real x)
compute position for quintic polynomial trajectory
a_trajpoly5_c1
void a_trajpoly5_c1(a_trajpoly5 const *ctx, a_real c[5])
compute coefficients of velocity for quintic polynomial trajectory
a_trajpoly5_c0
void a_trajpoly5_c0(a_trajpoly5 const *ctx, a_real c[6])
compute coefficients of position for quintic polynomial trajectory
a_trajpoly5_gen
void a_trajpoly5_gen(a_trajpoly5 *ctx, a_real ts, a_real p0, a_real p1, a_real v0, a_real v1, a_real a0, a_real a1)
generate for quintic polynomial trajectory
a_trajpoly5_acc
a_real a_trajpoly5_acc(a_trajpoly5 const *ctx, a_real x)
compute acceleration for quintic polynomial trajectory
a_trajpoly5_vel
a_real a_trajpoly5_vel(a_trajpoly5 const *ctx, a_real x)
compute velocity for quintic polynomial trajectory
a_trajpoly5
instance structure for quintic polynomial trajectory
Definition
trajpoly5.h:131
a_trajpoly5::c
a_real c[6]
Definition
trajpoly5.h:132
trajpoly5.h
Generated by
1.17.0