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.ndarray, optional) – The Cartesian x coordinate 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.ndarray, optional) – The Cartesian y coordinate of the transect
z (numpy.ndarray, optional) – The Cartesian z coordinate of the transect
first (mpas_tools.transect.Vector, optional) – The start points of each segment of the transect, where the
x
,y
, andz
attributes of each vector are numpy.ndarray objects.second (mpas_tools.transect.Vector, optional) – The end points of each segment of the transect
- Returns
angularDistance (numpy.ndarray) – The angular distance (in radians) between segments of the transect.