copp.interpolation.s_to_t_topp2

Convert a TOPP2 a(s) profile into cumulative arrival times.

Syntax

[t_final, t_s] = copp.interpolation.s_to_t_topp2(s, a)
[t_final, t_s] = copp.interpolation.s_to_t_topp2(s, a, t0=t0)

Description

Converts a second-order path-speed profile into arrival times. S and A must be real finite vectors of the same length N; either \(1 \times N\) or \(N \times 1\) input is accepted. A(k) stores \((ds/dt)^2\) at S(k).

Starts the cumulative time at T0. T_S is returned as an \(N \times 1\) double column vector, matching solver profile outputs.

Input Arguments

s

Station grid or path-parameter samples. Use a real finite vector; station-grid inputs are usually strictly increasing.

a

Second-order node profile. Element a(k) stores the squared path speed \((ds/dt)^2\) at station s(k).

Name-Value Arguments

t0

Initial time offset added to the cumulative arrival-time grid. Default: 0

Output Arguments

t_final

Final traversal time. This is the last element of the cumulative time grid.

t_s

Cumulative arrival time at each station, returned as an \(N \times 1\) double column vector.

Examples

MATLAB
s = linspace(0, 1, 5).';
a = 0.2 + sin(pi*s).^2;
[t_final, t_s] = copp.interpolation.s_to_t_topp2(s, a);
disp([t_final, t_s(end)])

See Also

copp.interpolation