Skip to main content

LinearizationModeTopp3

Enum LinearizationModeTopp3 

Source
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::GivenFeasibleAdaptive requires a_linearization to be the a of a previously solved third-order profile and that profile’s b to be at hand; a lower-order profile discretizes b as (a[k+1] - a[k]) / (2 * ds[k]) rather than through a[k+1] = a[k] + (b[k] + b[k+1]) * ds[k], so its state cannot be used here.
  • Given those, prefer it whenever a spans a wide range over the window, and especially when a can reach the 1e-10 scale of EPS_ZERO. The upper and lower row of one axis differ only by an overall sign, so anchoring both at the same small a_linearization[k] cancels b and c and leaves a[k] <= 3 * a_linearization[k] – a cap set by the anchor rather than by the jerk limit, and one that no b or c can offset. Adapting each row separately breaks the cancellation.
  • On a profile that stays well away from zero the two agree closely, and LinearizationModeTopp3::Direct is 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>

Source§

fn clone(&self) -> LinearizationModeTopp3<'a>

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<'a> Debug for LinearizationModeTopp3<'a>

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl<'a> Default for LinearizationModeTopp3<'a>

Source§

fn default() -> LinearizationModeTopp3<'a>

Returns the “default value” for a type. Read more
Source§

impl<'a> PartialEq for LinearizationModeTopp3<'a>

Source§

fn eq(&self, other: &LinearizationModeTopp3<'a>) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl<'a> Copy for LinearizationModeTopp3<'a>

Source§

impl<'a> StructuralPartialEq for LinearizationModeTopp3<'a>

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoEither for T

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts 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 more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts 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

§

const ALIGN: usize

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
§

impl<SS, SP> SupersetOf<SS> for SP
where SS: SubsetOf<SP>,

§

fn to_subset(&self) -> Option<SS>

The inverse inclusion map: attempts to construct self from the equivalent element of its superset. Read more
§

fn is_in_subset(&self) -> bool

Checks if self is actually part of its subset T (and can be converted to it).
§

fn to_subset_unchecked(&self) -> SS

Use with care! Same as self.to_subset but without any property checks. Always succeeds.
§

fn from_subset(element: &SS) -> SP

The inclusion map: converts self to the equivalent element of its superset.
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> Scalar for T
where T: 'static + Clone + PartialEq + Debug,