Skip to content

Namespace inertialsim::geodesy::spherical

Namespace List > inertialsim > geodesy > spherical

Geocentric spherical coordinate conversions (internal API). More...

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.

Detailed Description

Internal API

This namespace is part of InertialSim's internal API. Most users should use the Coordinates class and its factory methods rather than calling these functions directly.

See also: Coordinates

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:

Pair containing:

  • 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:

Pair containing:

  • 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:

Pair containing:

  • 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 dimensions or values are invalid.


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