liba 0.1.15
An algorithm library based on C/C++
 
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Modules Pages
Loading...
Searching...
No Matches
trajtrap.h
Go to the documentation of this file.
1
6
7#ifndef LIBA_TRAJTRAP_H
8#define LIBA_TRAJTRAP_H
9
10#include "a.h"
11
17
18typedef struct a_trajtrap a_trajtrap;
19
20#if defined(__cplusplus)
21extern "C" {
22#endif /* __cplusplus */
23
52
63A_EXTERN a_real a_trajtrap_pos(a_trajtrap const *ctx, a_real x);
64
74A_EXTERN a_real a_trajtrap_vel(a_trajtrap const *ctx, a_real x);
75
85A_EXTERN a_real a_trajtrap_acc(a_trajtrap const *ctx, a_real x);
86
87#if defined(__cplusplus)
88} /* extern "C" */
89namespace a
90{
91typedef struct a_trajtrap trajtrap;
92} /* namespace a */
93#endif /* __cplusplus */
94
99{
112#if defined(__cplusplus)
113 A_INLINE a_real gen(a_real vm, a_real ac_, a_real de_, a_real p0_, a_real p1_,
114 a_real v0_ = 0, a_real v1_ = 0)
115 {
116 return a_trajtrap_gen(this, vm, ac_, de_, p0_, p1_, v0_, v1_);
117 }
118 A_INLINE a_real pos(a_real x) const
119 {
120 return a_trajtrap_pos(this, x);
121 }
122 A_INLINE a_real vel(a_real x) const
123 {
124 return a_trajtrap_vel(this, x);
125 }
126 A_INLINE a_real acc(a_real x) const
127 {
128 return a_trajtrap_acc(this, x);
129 }
130#endif /* __cplusplus */
131};
132
134
135#endif /* a/trajtrap.h */
algorithm library
double a_real
compiler built-in floating-point number type
Definition a.h:1006
a_real a_trajtrap_gen(a_trajtrap *ctx, a_real vm, a_real ac, a_real de, a_real p0, a_real p1, a_real v0, a_real v1)
generate for trapezoidal velocity trajectory
a_real a_trajtrap_pos(a_trajtrap const *ctx, a_real x)
compute position for trapezoidal velocity trajectory
a_real a_trajtrap_acc(a_trajtrap const *ctx, a_real x)
compute acceleration for trapezoidal velocity trajectory
a_real a_trajtrap_vel(a_trajtrap const *ctx, a_real x)
compute velocity for trapezoidal velocity trajectory
instance structure for trapezoidal velocity trajectory
Definition trajtrap.h:99
a_real t
Definition trajtrap.h:100
a_real vc
Definition trajtrap.h:105
a_real v1
Definition trajtrap.h:104
a_real v0
Definition trajtrap.h:103
a_real de
Definition trajtrap.h:111
a_real pa
Definition trajtrap.h:108
a_real td
Definition trajtrap.h:107
a_real pd
Definition trajtrap.h:109
a_real p1
Definition trajtrap.h:102
a_real p0
Definition trajtrap.h:101
a_real ac
Definition trajtrap.h:110
a_real ta
Definition trajtrap.h:106