Skip to content

Namespace inertialsim::geodesy::spherical

Namespace List > inertialsim > geodesy > spherical

Public Functions

Type Name
std::pair< Array3D, TransformMatrixArray > FromEcef (const Vector3D & xyz)
Geocentric spherical coordinates from ECEF coordinates.
std::pair< Array3D, TransformMatrixArray > FromGeodetic (const Array3D & lla, const GeodeticDatum & datum=WGS84)
Geocentric spherical coordinates from geodetic coordinates.
std::pair< Array3D, TransformMatrixArray > FromSpherical (const Array3D & rpl)
Geocentric spherical coordinates from geocentric spherical coordinates.
Array3D Validate (const Array3D & rpl)
Validates inputs meet geocentric spherical coordinate conventions.

Public Functions Documentation

function FromEcef

Geocentric spherical coordinates from ECEF coordinates.

std::pair< Array3D, TransformMatrixArray > inertialsim::geodesy::spherical::FromEcef (
    const Vector3D & xyz
) 

Parameters:

  • xyz Earth-centered, Earth-fixed (ECEF) cartesian coordinates.

Returns:

Tuple of (spherical coordinates, ECEF-to-spherical transform matrices).


function FromGeodetic

Geocentric spherical coordinates from geodetic coordinates.

std::pair< Array3D, TransformMatrixArray > inertialsim::geodesy::spherical::FromGeodetic (
    const Array3D & lla,
    const GeodeticDatum & datum=WGS84
) 

Parameters:

  • lla Geodetic coordinates (latitude, longitude, altitude).
  • datum A datum describing Earth's shape and gravity field.

Returns:

Tuple of (spherical coordinates, NED-to-spherical transform matrices).


function FromSpherical

Geocentric spherical coordinates from geocentric spherical coordinates.

std::pair< Array3D, TransformMatrixArray > inertialsim::geodesy::spherical::FromSpherical (
    const Array3D & rpl
) 

Validates the input coordinates and returns identity transforms.

Parameters:

  • rpl Geocentric spherical coordinates (radius, polar angle, longitude).

Returns:

Tuple of (validated rpl coordinates, identity transform matrices).


function Validate

Validates inputs meet geocentric spherical coordinate conventions.

Array3D inertialsim::geodesy::spherical::Validate (
    const Array3D & rpl
) 

Inputs are validated for shape, size, and range. The input must be a 3xN matrix where N is the number of coordinate sets. Radius must be positive (>=0). Polar angle must be in range [0, pi]. Longitude must be in range [-pi, 2*pi] and will be wrapped to (-pi, pi].

Parameters:

  • rpl Geocentric spherical coordinates (radius, polar angle, longitude).

Returns:

Validated coordinates with longitude wrapped to (-pi, pi].

Exception:

  • std::invalid_argument if shape or values are invalid.


The documentation for this class was generated from the following file cpp/include/inertialsim/geodesy/spherical.h