#[repr(C)]pub struct trajtrap {
pub t: float,
pub p0: float,
pub p1: float,
pub v0: float,
pub v1: float,
pub vc: float,
pub ta: float,
pub td: float,
pub pa: float,
pub pd: float,
pub ac: float,
pub de: float,
}
Expand description
trapezoidal velocity trajectory
Fields§
§t: float
total duration
p0: float
initial position
p1: float
final position
v0: float
initial velocity
v1: float
final velocity
vc: float
constant velocity
ta: float
time before constant velocity
td: float
time after constant velocity
pa: float
position before constant velocity
pd: float
position after constant velocity
ac: float
acceleration before constant velocity
de: float
acceleration after constant velocity
Implementations§
source§impl trajtrap
impl trajtrap
sourcepub fn gen(
&mut self,
vm: float,
ac: float,
de: float,
p0: float,
p1: float,
v0: float,
v1: float,
) -> float
pub fn gen( &mut self, vm: float, ac: float, de: float, p0: float, p1: float, v0: float, v1: float, ) -> float
generate for trapezoidal velocity trajectory
sourcepub fn pos(&mut self, x: float) -> float
pub fn pos(&mut self, x: float) -> float
calculate position for trapezoidal velocity trajectory
Trait Implementations§
Auto Trait Implementations§
impl Freeze for trajtrap
impl RefUnwindSafe for trajtrap
impl Send for trajtrap
impl Sync for trajtrap
impl Unpin for trajtrap
impl UnwindSafe for trajtrap
Blanket Implementations§
source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more