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
andz
are of the same length and all must be present iffirst
andsecond
are not provided.y (numpy.array, optional) – The Cartsian coordinates of a transect, where the number of segments is
len(x) - 1
.x
,y
andz
are of the same length and all must be present iffirst
andsecond
are not provided.z (numpy.array, optional) – The Cartsian coordinates of a transect, where the number of segments is
len(x) - 1
.x
,y
andz
are of the same length and all must be present iffirst
andsecond
are not provided.first (Vector) – The start and end points of each segment of the transect, where the
x
,y
, andz
attributes of each vector arenumpy.array
objects.second (Vector) – The start and end points of each segment of the transect, where the
x
,y
, andz
attributes of each vector arenumpy.array
objects.
- Returns
angularDistance (numpy.array) – The angular distance (in radians) between segments of the transect.