WeatherRoutingTool.algorithms package
Submodules
WeatherRoutingTool.algorithms.data_utils module
- WeatherRoutingTool.algorithms.data_utils.distance(route)[source]
TODO: Where is this function used? Calculates the accumulated distance along a route
- Parameters:
route (TODO: add type of route) – Some kind of route
- Returns:
Accumulated distance along a route
- Return type:
np.array
- WeatherRoutingTool.algorithms.data_utils.get_closest(array, value)[source]
Determine and return index of the value in the array which is closest to the given value. If there are multiple values in the array with the same distance to the value, the first/smallest index is used. :param array: array used to search in :type array: numpy.ndarray :param value: value for which the closest value in the array should be found :type value: numeric :return: index :rtype: numpy.int64
- WeatherRoutingTool.algorithms.data_utils.get_speed_from_arrival_time(lons, lats, departure_time, arrival_time) Quantity[source]
Calculate boat speed based on coordinates, departure and arrival time for a route array.
- Parameters:
lons (np.array) – longitudes
lats (np.array) – latitudes
departure_time (datetime object) – departure time
arrival_time (datetime object) – arrival time
- Returns:
boat speed in m/s (scalar/float)
- Return type:
u.Quantity