#[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: floattotal duration
p0: floatinitial position
p1: floatfinal position
v0: floatinitial velocity
v1: floatfinal velocity
vc: floatconstant velocity
ta: floattime before constant velocity
td: floattime after constant velocity
pa: floatposition before constant velocity
pd: floatposition after constant velocity
ac: floatacceleration before constant velocity
de: floatacceleration 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