  In this work, the geodesic equations and their numerical solution in
Cartesian coordinates on an oblate spheroid, presented by Panou and Korakitis
(2017), are generalized on a triaxial ellipsoid. A new exact analytical method
and a new numerical method of converting Cartesian to ellipsoidal coordinates
of a point on a triaxial ellipsoid are presented. An extensive test set for the
coordinate conversion is used, in order to evaluate the performance of the two
methods. The direct geodesic problem on a triaxial ellipsoid is described as an
initial value problem and is solved numerically in Cartesian coordinates. The
solution provides the Cartesian coordinates and the angle between the line of
constant {\lambda} and the geodesic, at any point along the geodesic. Also, the
Liouville constant is computed at any point along the geodesic, allowing to
check the precision of the method. An extensive data set of geodesics is used,
in order to demonstrate the validity of the numerical method for the geodesic
problem. We conclude that a complete, stable and precise solution of the
problem is accomplished.
