docs: def eci2geodetic (x, y, z, gmst=None, ellipsoid=None):
    """Converts the given ECI coordinates to Geodetic coordinates at the
    given Greenwich Mean Sidereal Time (GMST) (defaults to now) and with
    the given ellipsoid (defaults to WGS84).
  
    This code was adapted from
    `shashwatak/satellite-js <https://github.com/shashwatak/satellite-js/blob/master/src/coordinate-transforms.js>`_
    and http://www.celestrak.com/columns/v02n03/
  
    """
    if gmst is None:
      gmst = dmc.toGMST()
  
    if ellipsoid is None:
      ellipsoid = WGS84
  
    a    = WGS84.a
    b    = WGS84.b
    f    = WGS84.f
    r    = math.sqrt((x * x) + (y * y))
    e2   = (2 * f) - (f * f)
    lon  = math.atan2(y, x) - gmst
    k    = 0
    kmax = 20
    lat  = math.atan2(z, r)
  
    while (k < kmax):
      slat = math.sin(lat)
      C    = 1 / math.sqrt( 1 - e2 * (slat * slat) )
      lat  = math.atan2(z + (a * C * e2 * slat), r)
      k   += 1
  
    z = (r / math.cos(lat)) - (a * C)
  
    return lat, lon, z