pub enum Shape {
SCurve,
SinSquared,
Poly345,
Poly4567,
}Expand description
The shape of a move from rest to rest (profile.shape, or shape of a [[cycle.segment]]).
Variants§
SCurve
Seven segments: jerk up, constant acceleration, jerk down, cruise, and the same braking.
SinSquared
The speed rises as sin² of time over the ramp (Bestehorn): peak acceleration (pi/2) v / T_ramp, peak jerk (pi^2/2) v / T_ramp^2, at the ramp’s ends.
Poly345
s = 10 u^3 - 15 u^4 + 6 u^5 over the whole move (VDI 2143): speed and acceleration zero at both ends.
Poly4567
s = 35 u^4 - 84 u^5 + 70 u^6 - 20 u^7: jerk zero at both ends too.
Implementations§
Source§impl Shape
impl Shape
pub const NAMES: [&str; 4]
pub fn from_name(name: &str) -> Option<Self>
pub fn name(&self) -> &'static str
Sourcepub fn peaks(&self) -> Option<[f64; 3]>
pub fn peaks(&self) -> Option<[f64; 3]>
For a polynomial law: the peaks of speed, acceleration and jerk over a move of 1 in a time of 1 (multiply by
h/T, h/T^2 and h/T^3). 3-4-5: s’ = 30 u^2 (1-u)^2, 1.875 at u = 1/2; s’’ = 60 u (1-u) (1-2u), 10/sqrt 3 at
u = (1 - 1/sqrt 3)/2; s’‘’ 60 at the ends. 4-5-6-7: s’ = 140 u^3 (1-u)^3, 2.1875; s’’ = 420 u^2 (1-u)^2 (1-2u),
with x = u - 1/2 largest at x^2 = 1/20: 420 * 2 / (25 sqrt 20) = 7.5132; s’‘’ = 840 u (1-u) (1 - 5u + 5u^2),
52.5 at u = 1/2. None for the shapes with a cruise.