heyoka.model.cart2geo

Contents

heyoka.model.cart2geo#

heyoka.model.cart2geo(xyz: list[expression], ecc2: float = 0.006694379990197619, R_eq: float = 6378137.0, n_iters: int = 4) list[expression]#

Produces the expression of the Cartesian coordinates as a function of geodetic coordinates.

Added in version 4.0.0.

Note

A tutorial showcasing also the use of this function is available.

This function will compute the expressions of the Geodetic coordinates as a function of Cartesian coordinates using the Hirvonen and Moritz iterations (see “Physical Geodesy” by Heiskanen and Moritz pp.181-183).

A few checks are run on the input arguments. Specifically:

  • the number of Cartesian variable (i.e., the length of xyz) must be three,

  • ecc2 must be finite and positive,

  • R_eq must be finite and positive,

  • n_iters must be positive.

Parameters:
  • xyz – expressions for the Cartesian components. [units consistent with R_eq]

  • ecc2 – the reference ellipsoid eccentricity squared.

  • R_eq – the reference ellipsoid equatorial radius in meters. [units consistent with xyz]

  • n_iters – number of Hirvonen and Moritz iterations of the inversion algorithm.

Returns:

the expressions for the geodetic coordinates [alt, lat, lon]. alt in the same units as xyz and R_eq, lat in \(\left[ -\frac{\pi}{2}, \frac{\pi}{2} \right]\) and lon in \(\left[ -\pi, \pi \right]\).

Raises:

ValueError – if one or more input arguments are malformed, as explained above.