choclo.utils.distance_spherical#
- choclo.utils.distance_spherical(longitude_p, latitude_p, radius_p, longitude_q, latitude_q, radius_q)[source]#
Euclidean distance between two points in spherical coordinates
Important
All angles must be in degrees and radii in meters.
- Parameters:
- longitude_p, latitude_p, radius_p
float
Longitude, latitude and radial coordinates of point
. Longitude and latitude must be in degrees. Radial coordinate should be in meters.- longitude_q, latitude_q, radius_q
float
Longitude, latitude and radial coordinates of point
. Longitude and latitude must be in degrees. Radial coordinate should be in meters.
- longitude_p, latitude_p, radius_p
- Returns:
- distance
float
Euclidean distance between point
and point .
- distance
Notes
Given two points
and defined in a spherical coordinate system , return the Euclidean (L2) distance between them:where
and
is the longitude angle, the spherical latitude angle an is the radial coordinate.