geodeticConversion

Functions

Eigen::Vector3d PCI2PCPF(Eigen::Vector3d pciPosition, double J20002Pfix[3][3])

Collection of utility functions for converting in/out of planet-centric reference frames.

The geodeticConversion library contains simple transformations between inertial coordinates and planet-fixed coordinates in a general way.

No support is provided for non-spherical bodies. Transformations are scripted from Vallado.

Converts from a planet-centered inertial position (i.e., J2000 ECI) to a planet-centered, planet-fixed position given a rotation matrix.

Parameters:
  • pciPosition – [m] Position vector in PCI coordinates

  • J20002Pfix – [-] 3x3 rotation matrix representing the rotation between PCPF and ECI frames

Returns:

pcpfPosition: [m] Position vector in PCPF coordinates

Eigen::Vector3d PCPF2LLA(Eigen::Vector3d pciPosition, double planetEqRadius, double planetPoRad = -1.0)

Converts from a planet-centered, planet-fixed coordinates to latitude/longitude/altitude (LLA) coordinates given a planet radius.

Parameters:
  • pcpfPosition – [m] Position vector in PCPF coordinates

  • planetEqRad – [m] Planetary radius, assumed to be constant (i.e., spherical)

  • planetPoRad – [m] Planetary polar used for elliptical surfaces if provided, otherwise spherical,

Returns:

llaPosition: Final position in latitude/longitude/altitude coordinates [0] : [rad] latitude above planetary equator [1] : [rad] longitude across planetary meridian [2] : [alt] altitude above planet radius

Eigen::Vector3d PCI2LLA(Eigen::Vector3d pciPosition, double J20002Pfix[3][3], double planetEqRad, double planetPoRad = -1.0)

Converts from a planet-centered inertial coordinates to latitutde/longitude/altitude (LLA) coordinates given a planet radius and rotation matrix.

Parameters:
  • pciPosition – [m] Position vector in PCPF coordinates

  • J20002Pfix – planet DCM

  • planetEqRad – [m] Planetary radius, assumed to be constant (i.e., spherical)

  • planetPoRad – [m] Planetary polar used for elliptical surfaces if provided, otherwise spherical,

Returns:

llaPosition: Final position in latitude/longitude/altitude coordinates [0] : [rad] latitude above planetary equator [1] : [rad] longitude across planetary meridian [2] : [alt] altitude above planet radius

Eigen::Vector3d LLA2PCPF(Eigen::Vector3d llaPosition, double planetEqRad, double planetPoRad = -1.0)

Converts from a Lat/Long/Altitude coordinates to planet-centered,planet-fixed coordinates given a planet radius.

Parameters:
  • llaPosition – [m] Position vector in PCPF coordinates

  • planetEqRad – [m] Planetary equatorial radius, assumed to be constant (i.e., spherical)

  • planetPoRad – [m] Planetary polar used for elliptical surfaces if provided, otherwise spherical,

Returns:

pcpfPosition: [m] Final position in the planet-centered, planet-fixed frame.

Eigen::Vector3d PCPF2PCI(Eigen::Vector3d pcpfPosition, double J20002Pfix[3][3])

Converts from a Lat/Long/Altitude coordinates to planet-centered inertialcoordinates given a planet radius and rotation matrix.

Parameters:
  • pcpfPosition – [m] Position vector in planet centered, planet fixed coordinates

  • J20002Pfix – [-] Rotation between inertial and pcf coordinates.

Returns:

pciPosition: [m] Final position in the planet-centered inertial frame.

Eigen::Vector3d LLA2PCI(Eigen::Vector3d llaPosition, double J20002Pfix[3][3], double planetEqRad, double planetPoRad = -1.0)

Converts from a planet-centered inertial coordinates to latitutde/longitude/altitude (LLA) coordinates given a planet radius and rotation matrix.

Parameters:
  • llaPosition – Final position in latitude/longitude/altitude coordinates [0] : [rad] latitude above planetary equator [1] : [rad] longitude across planetary meridian [2] : [alt] altitude above planet radius

  • J20002Pfix – rotation matrix between inertial and PCPF frames

  • planetEqRad – [m] Planetary radius, assumed to be constant (i.e., spherical)

  • planetPoRad – [m] Planetary polar used for elliptical surfaces if provided, otherwise spherical,

Returns:

pciPosition : [m] Position in inertial coordinates.

Eigen::Matrix3d C_PCPF2SEZ(double lat, double longitude)