@sh.add_function(dsp, outputs=['extended_phases_distances'])
def calculate_extended_phases_distances(
times, extended_phases_integration_times, velocities):
"""
Calculates extended cycle phases distances [km].
:param times:
Time vector [s].
:type times: numpy.array
:param extended_phases_integration_times:
Extended cycle phases integration times [s].
:type extended_phases_integration_times: tuple
:param velocities:
Velocity vector [km/h].
:type velocities: numpy.array
:return:
Extended cycle phases distances [km].
:rtype: numpy.array
"""
from ..co2 import calculate_phases_distances, identify_phases_indices
indices = identify_phases_indices(times, extended_phases_integration_times)
return calculate_phases_distances(times, indices, velocities)