Skip to content

Class inertialsim::geodesy::ConstantGravity

ClassList > inertialsim > geodesy > ConstantGravity

Constant gravity model. More...

  • #include <gravity.h>

Inherits the following classes: inertialsim::geodesy::Gravity

Public Static Attributes inherited from inertialsim::geodesy::Gravity

See inertialsim::geodesy::Gravity

Type Name
constexpr double standard_magnitude = STANDARD\_GRAVITY
Standard gravity magnitude.

Public Functions

Type Name
ConstantGravity (TopocentricAxisOrder axis_order=TopocentricAxisOrder::NED)
Construct from standard gravity (9.80665 m/s/s).
ConstantGravity (const Vector3D & gravity)
Construct from a gravity vector.
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.

Public Functions inherited from inertialsim::geodesy::Gravity

See inertialsim::geodesy::Gravity

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.

Public Functions inherited from inertialsim::geodesy::Field

See inertialsim::geodesy::Field

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.

Public Static Functions inherited from inertialsim::geodesy::Gravity

See inertialsim::geodesy::Gravity

Type Name
Vector3D StandardVector (TopocentricAxisOrder axis_order=TopocentricAxisOrder::NED)
Standard gravity in a topocentric frame.

Protected Functions

Type Name
virtual Vector3D VectorImpl (const Coordinates & coordinates, const std::optional< CoordinateSystem > & basis) override const
Return the gravity vector at the given coordinates.

Protected Functions inherited from inertialsim::geodesy::Field

See inertialsim::geodesy::Field

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

Detailed Description

Returns a constant gravity vector regardless of input coordinates. Useful for testing, simple simulations, and applications where a single global approximation of gravity is appropriate.

The constant gravity vector is replicated for each input coordinate, maintaining the same magnitude and direction throughout the model domain.

Note:

This model is appropriate for local applications where gravity variations can be neglected, or for testing and validation purposes.

See also: StandardVector() to use the standard gravity value (9.80665 m/s^2)

Public Functions Documentation

function ConstantGravity [½]

Construct from standard gravity (9.80665 m/s/s).

explicit inertialsim::geodesy::ConstantGravity::ConstantGravity (
    TopocentricAxisOrder axis_order=TopocentricAxisOrder::NED
) 

Parameters:

  • axis_order The axis ordering of the frame: NED or ENU.

function ConstantGravity [2/2]

Construct from a gravity vector.

explicit inertialsim::geodesy::ConstantGravity::ConstantGravity (
    const Vector3D & gravity
) 

Parameters:

  • gravity 3x1 gravity vector (m/s/s).

function Magnitude [¼]

Return magnitude at the given coordinates.

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

Parameters:

  • coordinates Array of coordinates.

Returns:

Array of magnitudes.

Implements inertialsim::geodesy::Field::Magnitude


function Magnitude [2/4]

Return magnitude at the given coordinates.

Scalar1D inertialsim::geodesy::ConstantGravity::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::ConstantGravity::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::ConstantGravity::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::ConstantGravity::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::ConstantGravity::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::ConstantGravity::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::ConstantGravity::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.


Protected Functions Documentation

function VectorImpl

Return the gravity vector at the given coordinates.

virtual Vector3D inertialsim::geodesy::ConstantGravity::VectorImpl (
    const Coordinates & coordinates,
    const std::optional< CoordinateSystem > & basis
) override const

Returns the same vector for each input coordinate.

Parameters:

  • coordinates Array of coordinates (only used for count).
  • basis Ignored (constant gravity has no coordinate dependence).

Returns:

Array of gravity vectors (3xN).

Implements inertialsim::geodesy::Field::VectorImpl



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