pub enum LinearizationModeTopp3<'a> {
Direct,
GivenFeasibleAdaptive(&'a [f64]),
}Expand description
Where the third-order rows of a station take their linearization point.
The tangent of 1/sqrt(a) lies below 1/sqrt(a) for every positive anchor, so
both variants keep the linearized rows an inner approximation of the nonlinear
ones; they differ only in how tight that approximation is and in which a the
rows still admit.
Typical usage:
- Default to
LinearizationModeTopp3::Direct, which reproduces the historical behaviour. LinearizationModeTopp3::GivenFeasibleAdaptiverequiresa_linearizationto be theaof a previously solved third-order profile and that profile’sbto be at hand; a lower-order profile discretizesbas(a[k+1] - a[k]) / (2 * ds[k])rather than througha[k+1] = a[k] + (b[k] + b[k+1]) * ds[k], so its state cannot be used here.- Given those, prefer it whenever
aspans a wide range over the window, and especially whenacan reach the1e-10scale ofEPS_ZERO. The upper and lower row of one axis differ only by an overall sign, so anchoring both at the same smalla_linearization[k]cancelsbandcand leavesa[k] <= 3 * a_linearization[k]– a cap set by the anchor rather than by the jerk limit, and one that noborccan offset. Adapting each row separately breaks the cancellation. - On a profile that stays well away from zero the two agree closely, and
LinearizationModeTopp3::Directis the cheaper of the two.
Variants§
Direct
Direct:
every row of a station is linearized at a_linearization[k].
GivenFeasibleAdaptive(&'a [f64])
GivenFeasibleAdaptive(b_linearization):
each row is anchored where that row is nearly active at the feasible state
(a_linearization, b_linearization), so a slack row is anchored high and a
tight one stays near the state. b_linearization must be the path
acceleration of the same profile as a_linearization, with the same length;
it is normally taken from a previously computed feasible third-order
profile.
Trait Implementations§
Source§impl<'a> Clone for LinearizationModeTopp3<'a>
impl<'a> Clone for LinearizationModeTopp3<'a>
Source§fn clone(&self) -> LinearizationModeTopp3<'a>
fn clone(&self) -> LinearizationModeTopp3<'a>
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl<'a> Debug for LinearizationModeTopp3<'a>
impl<'a> Debug for LinearizationModeTopp3<'a>
Source§impl<'a> Default for LinearizationModeTopp3<'a>
impl<'a> Default for LinearizationModeTopp3<'a>
Source§fn default() -> LinearizationModeTopp3<'a>
fn default() -> LinearizationModeTopp3<'a>
Source§impl<'a> PartialEq for LinearizationModeTopp3<'a>
impl<'a> PartialEq for LinearizationModeTopp3<'a>
impl<'a> Copy for LinearizationModeTopp3<'a>
impl<'a> StructuralPartialEq for LinearizationModeTopp3<'a>
Auto Trait Implementations§
impl<'a> Freeze for LinearizationModeTopp3<'a>
impl<'a> RefUnwindSafe for LinearizationModeTopp3<'a>
impl<'a> Send for LinearizationModeTopp3<'a>
impl<'a> Sync for LinearizationModeTopp3<'a>
impl<'a> Unpin for LinearizationModeTopp3<'a>
impl<'a> UnwindSafe for LinearizationModeTopp3<'a>
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more§impl<T> Pointable for T
impl<T> Pointable for T
§impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
impl<SS, SP> SupersetOf<SS> for SPwhere
SS: SubsetOf<SP>,
§fn to_subset(&self) -> Option<SS>
fn to_subset(&self) -> Option<SS>
self from the equivalent element of its
superset. Read more§fn is_in_subset(&self) -> bool
fn is_in_subset(&self) -> bool
self is actually part of its subset T (and can be converted to it).§fn to_subset_unchecked(&self) -> SS
fn to_subset_unchecked(&self) -> SS
self.to_subset but without any property checks. Always succeeds.§fn from_subset(element: &SS) -> SP
fn from_subset(element: &SS) -> SP
self to the equivalent element of its superset.