movingpandas.TrajectoryCollection.add_angular_difference#

TrajectoryCollection.add_angular_difference(overwrite=False, name='angular_difference', n_processes=1, **kwargs)#

Add angular difference to the trajectory’s DataFrame.

Angular difference is calculated as the absolute smaller angle between direction for points along the trajectory. Values are [0, 180.0]

Parameters:
  • overwrite (bool) – Whether to overwrite existing angular difference values (default: False)

  • name (str) – Name of the angular_difference column (default: “angular_difference”)

  • n_processes (int or None, optional) – Number of processes to use for computation (default: 1). If set to None, the number of processes will be set to os.cpu_count(), enabling full CPU utilization via multiprocessing.

  • n_threads (int, optional) – DEPRECATED. Use n_processes instead. This parameter will be removed in a future version.