choclo.distance.distance_geodetic_core

choclo.distance.distance_geodetic_core#

choclo.distance.distance_geodetic_core(longitude_p, cosphi_p, sinphi_p, height_p, longitude_q, cosphi_q, sinphi_q, height_q, prime_radius_p, prime_radius_q, eccentricity)[source]#

Core computation of distance between two points in geodetic coordinates.

Computes the Euclidean distance between two points defined in geodetic coordinates given precomputed quantities related to the coordinates of both points: the longitude in radians, the sine and cosine of the geodetic latitude, and geometric properties of the ellipsoid. Precomputing this quantities may save computation time in some cases.

Important

All longitudinal angles must be in radians and heights in meters.

Hint

Use boule to obtain the necessary ellipsoid parameters.

Parameters:
longitude_pfloat

Longitude coordinate of the first point. Must be in radians.

cosphi_pfloat

Cosine of the geodetic latitude coordinate of the first point.

sinphi_pfloat

Sine of the geodetic latitude coordinate of the first point.

height_pfloat

Height above the ellipsoid of the first point in meters.

longitude_qfloat

Longitude coordinate of the second point. Must be in radians.

cosphi_qfloat

Cosine of the geodetic latitude coordinate of the second point.

sinphi_qfloat

Sine of the geodetic latitude coordinate of the second point.

height_qfloat

Height above the ellipsoid of the second point in meters.

prime_radius_pfloat

Prime vertical radius for the latitude of the first point \(N(\phi) = \frac{a}{\sqrt{1 - e^2 \sin^2(\phi)}}\) in which \(a\) is the semimajor axis and \(e\) is the eccentricity of the ellipsoid. Must be in meters.

prime_radius_qfloat

Prime vertical radius for the latitude of the second point. Must be in meters.

eccentricityfloat

The first eccentricity of the ellipsoid \(e = \sqrt{2f - f^2}\), in which \(f\) is the flattening.

Returns:
distancefloat

Euclidean distance between point \(\mathbf{p}\) and point \(\mathbf{q}\) in meters.