liba 0.1.15
An algorithm library based on C/C++
 
Loading...
Searching...
No Matches
trajbell.h
Go to the documentation of this file.
1
6
7#ifndef LIBA_TRAJBELL_H
8#define LIBA_TRAJBELL_H
9
10#include "a.h"
11
17
18typedef struct a_trajbell a_trajbell;
19
20#if defined(__cplusplus)
21extern "C" {
22#endif /* __cplusplus */
23
61
80A_EXTERN a_float a_trajbell_pos(a_trajbell const *ctx, a_float x);
81
99A_EXTERN a_float a_trajbell_vel(a_trajbell const *ctx, a_float x);
100
118A_EXTERN a_float a_trajbell_acc(a_trajbell const *ctx, a_float x);
119
137A_EXTERN a_float a_trajbell_jer(a_trajbell const *ctx, a_float x);
138
139#if defined(__cplusplus)
140} /* extern "C" */
141namespace a
142{
143typedef struct a_trajbell trajbell;
144} /* namespace a */
145#endif /* __cplusplus */
146
151{
166#if defined(__cplusplus)
167 A_INLINE a_float gen(a_float jm_, a_float am_, a_float vm_, a_float p0_, a_float p1_,
168 a_float v0_ = 0, a_float v1_ = 0)
169 {
170 return a_trajbell_gen(this, jm_, am_, vm_, p0_, p1_, v0_, v1_);
171 }
172 A_INLINE a_float pos(a_float x) const
173 {
174 return a_trajbell_pos(this, x);
175 }
176 A_INLINE a_float vel(a_float x) const
177 {
178 return a_trajbell_vel(this, x);
179 }
180 A_INLINE a_float acc(a_float x) const
181 {
182 return a_trajbell_acc(this, x);
183 }
184 A_INLINE a_float jer(a_float x) const
185 {
186 return a_trajbell_jer(this, x);
187 }
188#endif /* __cplusplus */
189};
190
192
193#endif /* a/trajbell.h */
algorithm library
double a_float
compiler built-in floating-point number type
Definition a.h:1003
a_float a_trajbell_acc(a_trajbell const *ctx, a_float x)
calculate acceleration for bell-shaped velocity trajectory
a_float a_trajbell_vel(a_trajbell const *ctx, a_float x)
calculate velocity for bell-shaped velocity trajectory
a_float a_trajbell_gen(a_trajbell *ctx, a_float jm, a_float am, a_float vm, a_float p0, a_float p1, a_float v0, a_float v1)
generate for bell-shaped velocity trajectory
a_float a_trajbell_jer(a_trajbell const *ctx, a_float x)
calculate jerk for bell-shaped velocity trajectory
a_float a_trajbell_pos(a_trajbell const *ctx, a_float x)
calculate position for bell-shaped velocity trajectory
instance structure for bell-shaped velocity trajectory
Definition trajbell.h:151
a_float jm
Definition trajbell.h:163
a_float v1
Definition trajbell.h:161
a_float p1
Definition trajbell.h:159
a_float dm
Definition trajbell.h:165
a_float tv
Definition trajbell.h:153
a_float td
Definition trajbell.h:155
a_float taj
Definition trajbell.h:156
a_float tdj
Definition trajbell.h:157
a_float t
Definition trajbell.h:152
a_float ta
Definition trajbell.h:154
a_float v0
Definition trajbell.h:160
a_float p0
Definition trajbell.h:158
a_float am
Definition trajbell.h:164
a_float vm
Definition trajbell.h:162