Skip to content

Class inertialsim::geodesy::Field

ClassList > inertialsim > geodesy > Field

Interface class for geophysical field models. More...

  • #include <field.h>

Inherited by the following classes: inertialsim::geodesy::ConstantEarthRate, inertialsim::geodesy::ConstantMagneticField, inertialsim::geodesy::EllipsoidalEarthRate, inertialsim::geodesy::Gravity, inertialsim::geodesy::WorldMagneticModel

Public Functions

Type Name
virtual Scalar1D Magnitude (const Coordinates & coordinates) const
Return magnitude at the given coordinates.
Scalar1D Magnitude (const Array3D & coordinates, CoordinateSystem default_frame=CoordinateSystem::GEODETIC) const
Return magnitude at the given coordinates.
Scalar1D Magnitude (const geometry::Vector & coordinates, CoordinateSystem default_frame=CoordinateSystem::LOCAL) const
Return magnitude at the given coordinates.
Scalar1D Magnitude (const Vector3D & coordinates, CoordinateSystem default_frame=CoordinateSystem::LOCAL) const
Return magnitude at the given coordinates.
Vector3D Vector (const Coordinates & coordinates, const std::optional< CoordinateSystem > & basis=std::nullopt) const
Return the vector field at the given coordinates.
Vector3D Vector (const Array3D & coordinates, CoordinateSystem default_frame=CoordinateSystem::GEODETIC, const std::optional< CoordinateSystem > & basis=std::nullopt) const
Return the vector field at the given coordinates.
Vector3D Vector (const geometry::Vector & coordinates, CoordinateSystem default_frame=CoordinateSystem::LOCAL, const std::optional< CoordinateSystem > & basis=std::nullopt) const
Return the vector field at the given coordinates.
Vector3D Vector (const Vector3D & coordinates, CoordinateSystem default_frame=CoordinateSystem::LOCAL, const std::optional< CoordinateSystem > & basis=std::nullopt) const
Return the vector field at the given coordinates.
virtual ~Field () = default
Virtual destructor.

Protected Functions

Type Name
virtual Vector3D VectorImpl (const Coordinates & coordinates, const std::optional< CoordinateSystem > & basis) const = 0
Vector implementation to be overridden by subclasses.

Detailed Description

Subclasses of Field provide interfaces to geophysical field models of Earth, such as gravity and magnetic fields. It is also used to model the approximately constant rotation rate of Earth.

Field models provide two primary methods: * Magnitude(): Returns the scalar magnitude of the field at given coordinates * Vector(): Returns the vector representation of the field at given coordinates

Both methods support multiple input types (Coordinates, geometry::Vector, Array3D, Vector3D) with automatic coordinate system conversions based on the default_frame parameter.

Note:

Subclasses must implement the VectorImpl() method. The Magnitude() method has a default implementation that computes magnitude from the vector, but can be overridden for efficiency.

Note:

All input coordinates are expected to be in SI units with angles in radians. Output magnitudes and vectors are also in SI units.

See also: Coordinates for details on coordinate systems and conventions

See also: Gravity for gravity field models

See also: EarthRate for Earth rotation rate models

See also: MagneticField for magnetic field models

Public Functions Documentation

function Magnitude [¼]

Return magnitude at the given coordinates.

virtual Scalar1D inertialsim::geodesy::Field::Magnitude (
    const Coordinates & coordinates
) const

Parameters:

  • coordinates Array of coordinates.

Returns:

Array of magnitudes.


function Magnitude [2/4]

Return magnitude at the given coordinates.

Scalar1D inertialsim::geodesy::Field::Magnitude (
    const Array3D & coordinates,
    CoordinateSystem default_frame=CoordinateSystem::GEODETIC
) const

Parameters:

  • coordinates Array of raw coordinates (e.g. geodetic).
  • default_frame Coordinate system corresponding to the coordinate input.

Returns:

Array of magnitudes.


function Magnitude [¾]

Return magnitude at the given coordinates.

Scalar1D inertialsim::geodesy::Field::Magnitude (
    const geometry::Vector & coordinates,
    CoordinateSystem default_frame=CoordinateSystem::LOCAL
) const

Parameters:

  • coordinates Array of coordinates as geometry::Vector.
  • default_frame Coordinate system corresponding to the coordinate input.

Returns:

Array of magnitudes.


function Magnitude [4/4]

Return magnitude at the given coordinates.

Scalar1D inertialsim::geodesy::Field::Magnitude (
    const Vector3D & coordinates,
    CoordinateSystem default_frame=CoordinateSystem::LOCAL
) const

Parameters:

  • coordinates Array of raw coordinates (e.g. local xyz).
  • default_frame Coordinate system corresponding to the coordinate input.

Returns:

Array of magnitudes.


function Vector [¼]

Return the vector field at the given coordinates.

inline Vector3D inertialsim::geodesy::Field::Vector (
    const Coordinates & coordinates,
    const std::optional< CoordinateSystem > & basis=std::nullopt
) const

By default, the vector components will be expressed in the basis associated with the coordinates. For curvilinear systems (e.g. geodetic), the basis is the local basis at the given coordinates. If basis is supplied, it will be used instead.

Note:

For curvilinear coordinate systems like geodetic coordinates, the default basis is the local tangent plane basis at each coordinate location. For Cartesian systems like ECEF, the basis is constant.

Parameters:

  • coordinates Array of coordinates.
  • basis Optional basis in which to return the vector. If not specified, uses the basis associated with the coordinates.

Returns:

Array of vectors (3xN).


function Vector [2/4]

Return the vector field at the given coordinates.

Vector3D inertialsim::geodesy::Field::Vector (
    const Array3D & coordinates,
    CoordinateSystem default_frame=CoordinateSystem::GEODETIC,
    const std::optional< CoordinateSystem > & basis=std::nullopt
) const

Parameters:

  • coordinates Array of raw coordinates (e.g. geodetic).
  • default_frame Coordinate system corresponding to the coordinate input.
  • basis Optional basis in which to return the vector.

Returns:

Array of vectors.


function Vector [¾]

Return the vector field at the given coordinates.

Vector3D inertialsim::geodesy::Field::Vector (
    const geometry::Vector & coordinates,
    CoordinateSystem default_frame=CoordinateSystem::LOCAL,
    const std::optional< CoordinateSystem > & basis=std::nullopt
) const

Parameters:

  • coordinates Array of coordinates as geometry::Vector.
  • default_frame Coordinate system corresponding to the coordinate input.
  • basis Optional basis in which to return the vector.

Returns:

Array of vectors.


function Vector [4/4]

Return the vector field at the given coordinates.

Vector3D inertialsim::geodesy::Field::Vector (
    const Vector3D & coordinates,
    CoordinateSystem default_frame=CoordinateSystem::LOCAL,
    const std::optional< CoordinateSystem > & basis=std::nullopt
) const

Parameters:

  • coordinates Vector of raw coordinates (e.g. local xyz)
  • default_frame Coordinate system corresponding to the coordinate input.
  • basis Optional basis in which to return the vector.

Returns:

Array of vectors.


function ~Field

Virtual destructor.

virtual inertialsim::geodesy::Field::~Field () = default


Protected Functions Documentation

function VectorImpl

Vector implementation to be overridden by subclasses.

virtual Vector3D inertialsim::geodesy::Field::VectorImpl (
    const Coordinates & coordinates,
    const std::optional< CoordinateSystem > & basis
) const = 0

Parameters:

  • coordinates Array of coordinates.
  • basis Optional basis in which to return the vector.

Returns:

Array of vectors.



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