Cartesian to Geodetic on Custom Ellipsoid

Convert (X, Y, Z) to (Latitude, Longitude, Height).

X, m
Y, m
Z, m
Semi-major Axis A, m
Inversed Flattening

Latitude
Longitude
Height, m

The cartesian coordinate system is a right-hand, rectangular, three-dimensional, earth-fixed coordinate system with an origin at (0, 0, 0). The Z-axis, is parrallel to the axis of rotation of the earth. The Z-coordinate is positive toward the North pole. The X-Y plane lies in the equatorial plane. The X-axis lies along the intersection of the plane containing the prime meridian and the equatorial plane. The X-coordinate is positive toward the intersection of the prime meridian and equator.