docs: def meridian_dist(lat: float, ell: Ellipsoid = None, deg: bool = True):
      """
      computes the meridian distance on an ellipsoid *from the equator* to a latitude.
  
      Parameters
      ----------
  
      lat : float or numpy.ndarray of float
          geodetic latitude
      ell : Ellipsoid, optional
           reference ellipsoid (default WGS84)
      deg : bool, optional
           degrees input/output  (False: radians in/out)
  
      Results
      -------
  
      mdist : float or numpy.ndarray of float
           meridian distance (degrees/radians)
  
  
      Notes
      -----
  
      Formula given Baeschlin, C.F., 1948,
      "Lehrbuch Der Geodasie", Orell Fussli Verlag, Zurich, pp.47-50.
  
      Based on Deakin, R.E., 2010, 'The Loxodrome on an Ellipsoid', Lecture Notes,
      School of Mathematical and Geospatial Sciences, RMIT University, January 2010
      """
  
      if deg is True:
          lat = np.radians(lat)
  
      #   set ellipsoid parameters
      if ell is None:
          ell = Ellipsoid()
  
      a = ell.a
      f = ell.f  # flattening of ellipsoid
  
      e2 = f * (2 - f)  # eccentricity-squared
  
      # powers of eccentricity
      e4 = e2 * e2
      e6 = e4 * e2
      e8 = e6 * e2
      e10 = e8 * e2
  
      # coefficients of series expansion for meridian distance
      A = 1 + (3 / 4) * e2 + (45 / 64) * e4 + (175 / 256) * e6 + (11025 / 16384) * e8 + (43659 / 65536) * e10
      B = (3 / 4) * e2 + (15 / 16) * e4 + (525 / 512) * e6 + (2205 / 2048) * e8 + (72765 / 65536) * e10
      C = (15 / 64) * e4 + (105 / 256) * e6 + (2205 / 4096) * e8 + (10395 / 16384) * e10
      D = (35 / 512) * e6 + (315 / 2048) * e8 + (31185 / 131072) * e10
      E = (315 / 16384) * e8 + (3465 / 65536) * e10
      F = (693 / 131072) * e10
  
      term1 = A * lat
      term2 = (B / 2) * np.sin(2 * lat)
      term3 = (C / 4) * np.sin(4 * lat)
      term4 = (D / 6) * np.sin(6 * lat)
      term5 = (E / 8) * np.sin(8 * lat)
      term6 = (F / 10) * np.sin(10 * lat)
  
      mdist = a * (1 - e2) * (term1 - term2 + term3 - term4 + term5 - term6)
  
      return mdist