mpas_tools.transects.angular_distance

mpas_tools.transects.angular_distance(x=None, y=None, z=None, first=None, second=None)[source]

Compute angular distance between points on the sphere, following: https://en.wikipedia.org/wiki/Great-circle_distance

Parameters
  • x (numpy.array, optional) – The Cartsian coordinates of a transect, where the number of segments is len(x) - 1. x, y and z are of the same length and all must be present if first and second are not provided.

  • y (numpy.array, optional) – The Cartsian coordinates of a transect, where the number of segments is len(x) - 1. x, y and z are of the same length and all must be present if first and second are not provided.

  • z (numpy.array, optional) – The Cartsian coordinates of a transect, where the number of segments is len(x) - 1. x, y and z are of the same length and all must be present if first and second are not provided.

  • first (Vector) – The start and end points of each segment of the transect, where the x, y, and z attributes of each vector are numpy.array objects.

  • second (Vector) – The start and end points of each segment of the transect, where the x, y, and z attributes of each vector are numpy.array objects.

Returns

angularDistance (numpy.array) – The angular distance (in radians) between segments of the transect.