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
bouleto obtain the necessary ellipsoid parameters.- Parameters:
- longitude_p
float Longitude coordinate of the first point. Must be in radians.
- cosphi_p
float Cosine of the geodetic latitude coordinate of the first point.
- sinphi_p
float Sine of the geodetic latitude coordinate of the first point.
- height_p
float Height above the ellipsoid of the first point in meters.
- longitude_q
float Longitude coordinate of the second point. Must be in radians.
- cosphi_q
float Cosine of the geodetic latitude coordinate of the second point.
- sinphi_q
float Sine of the geodetic latitude coordinate of the second point.
- height_q
float Height above the ellipsoid of the second point in meters.
- prime_radius_p
float 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_q
float Prime vertical radius for the latitude of the second point. Must be in meters.
- eccentricity
float The first eccentricity of the ellipsoid \(e = \sqrt{2f - f^2}\), in which \(f\) is the flattening.
- longitude_p
- Returns:
- distance
float Euclidean distance between point \(\mathbf{p}\) and point \(\mathbf{q}\) in meters.
- distance