'Convert to geodetic coordinates.
Parameters
ellipsoid : str, optional
Reference ellipsoid to use.  Default is the one the coordinates
were initialized with.  Available are: \'WGS84\', \'GRS80\', \'WGS72\'
Returns
(lon, lat, height) : tuple
The tuple contains instances of `~astropy.coordinates.Longitude`,
`~astropy.coordinates.Latitude`, and `~astropy.units.Quantity`
Raises
ValueError
if ``ellipsoid`` is not recognized as among the ones implemented.
Notes
For the conversion to geodetic coordinates, the ERFA routine
``gc2gd`` is used.  See https://github.com/liberfa/erfa'

def to_geodetic(self, ellipsoid=None):

    ellipsoid = _check_ellipsoid(ellipsoid, default=self.ellipsoid)
    self_array = self.to(u.meter).view(self._array_dtype, np.ndarray)
    (lon, lat, height) = erfa.gc2gd(getattr(erfa, ellipsoid), self_array)
    return GeodeticLocation(Longitude((lon * u.radian), u.degree, wrap_angle=(180.0 * u.degree), copy=False), Latitude((lat * u.radian), u.degree, copy=False), u.Quantity((height * u.meter), self.unit, copy=False))
