itacart.geodesy.meridian_arc_quadrature

itacart.geodesy.meridian_arc_quadrature(lat_deg, *, tol=QUADRATURE_TOL_M, max_intervals=QUADRATURE_MAX_INTERVALS)[source]

Return the meridian arc by composite Simpson quadrature of Eq. (2).

Integrates meridian_radius() directly, doubling the interval count until two successive estimates agree to tol. Reference implementation: it does not share a line of arithmetic with the series of meridian_arc(), so agreement between the two is evidence about the integral itself rather than about one coefficient table.

The effective tolerance is max(tol, 4 * ulp(estimate)). At the quadrant one ULP is 1.86e-9 m, so a tolerance finer than that cannot be met in float64 and asking for it would only spend intervals at no gain in accuracy.

Parameters:
  • lat_deg (float) – Geodetic latitude, in degrees.

  • tol (float, default: QUADRATURE_TOL_M) – Absolute tolerance in metres, floored as described above.

  • max_intervals (int, default: QUADRATURE_MAX_INTERVALS) – Cap on the number of Simpson intervals.

Return type:

float

Returns:

Signed arc length in metres.

Raises:
  • DomainError – If lat_deg is not finite or lies outside [-90, 90], or if tol is not positive.

  • ConvergenceError – If the refinement reaches max_intervals without meeting the tolerance.