@sh.add_function(dsp, outputs=['theoretical_phases_distances'])
def calculate_theoretical_phases_distances(
times, theoretical_velocities, phases_indices):
"""
Calculates theoretical cycle phases distances [km].
:param times:
Time vector.
:type times: numpy.array
:param theoretical_velocities:
Theoretical velocity vector [km/h].
:type theoretical_velocities: numpy.array
:param phases_indices:
Indices of the cycle phases [-].
:type phases_indices: numpy.array
:return:
Theoretical cycle phases distances [km].
:rtype: numpy.array
"""
from .vehicle import calculate_distances
return calculate_phases_distances(
phases_indices, calculate_distances(times, theoretical_velocities)
)