TrajectorySpline

Two-dimensional trajectory model parameterized by a shared scalar variable.


Declaration

classdef TrajectorySpline < CAAnnotatedClass

Overview

TrajectorySpline stores a planar parametric trajectory as two one-dimensional component splines,

\[x = x(t), \qquad y = y(t),\]

built from a shared parameter vector t. Use TrajectorySpline.fromData(...) when raw coordinate samples should be fit as one-dimensional ConstrainedSpline objects. The low-level TrajectorySpline(...) constructor is the cheap canonical constructor used for persisted restart and other direct bootstrap paths.

t = linspace(0, 1, 20)';
x = cos(2*pi*t);
y = sin(2*pi*t);

trajectory = TrajectorySpline.fromData(t, x, y, S=3);
xq = trajectory.x(t);
yq = trajectory.y(t);

Topics

  • Create a trajectory spline
    • TrajectorySpline Create a trajectory from canonical component-spline state.
    • fromData Create a trajectory spline from raw x(t) and y(t) samples.
  • Inspect trajectory properties
    • t Parameter samples shared by both component splines.
    • x One-dimensional spline for the x-coordinate trajectory component.
    • y One-dimensional spline for the y-coordinate trajectory component.
  • Evaluate trajectory derivatives
    • u Evaluate the x-velocity \(u(t) = \dot{x}(t)\) along the trajectory.
    • v Evaluate the y-velocity \(v(t) = \dot{y}(t)\) along the trajectory.