tpoly Generate scalar polynomial trajectory
[S,SD,SDD] = tpoly(S0, SF, M) is a scalar trajectory (Mx1) that varies
smoothly from S0 to SF in M steps using a quintic (5th order) polynomial.
Velocity and acceleration can be optionally returned as SD (Mx1) and SDD
(Mx1) respectively.
tpoly(S0, SF, M) as above but plots S, SD and SDD versus time in a single
figure.
[S,SD,SDD] = tpoly(S0, SF, T) as above but the trajectory is computed at
each point in the time vector T (Mx1).
[S,SD,SDD] = tpoly(S0, SF, T, QD0, QD1) as above but also specifies the
initial and final velocity of the trajectory.
Notes::
- If M is given
- Velocity is in units of distance per trajectory step, not per second.
- Acceleration is in units of distance per trajectory step squared, not
per second squared.
- If T is given then results are scaled to units of time.
- The time vector T is assumed to be monotonically increasing, and time
scaling is based on the first and last element.
- 如果给出了M.
- 速度以每个轨迹步长的距离为单位,而不是每秒。
- 加速度以每个轨迹步长的平方距离为单位,而不是每秒平方。
- 如果给出T,则结果按比例缩放到时间单位。
- 假设时间向量T单调递增,并且时间缩放基于第一个和最后一个元素。