0.2.0
Loading...
Searching...
No Matches
Gravity.hpp File Reference

Different Gravity Models. More...

Go to the source code of this file.

Enumerations

enum class  NAV::GravitationModel : int {
  None ,
  WGS84 ,
  WGS84_Skydel ,
  Somigliana ,
  EGM96 ,
  COUNT
}
 Available Gravitation Models. More...
 

Functions

bool NAV::ComboGravitationModel (const char *label, GravitationModel &gravitationModel)
 Shows a ComboBox to select the gravitation model.
 
template<typename Derived >
Eigen::Vector3< typename Derived::Scalar > NAV::n_calcGravitation (const Eigen::MatrixBase< Derived > &lla_position, GravitationModel gravitationModel=GravitationModel::EGM96)
 Calculates the gravitation (acceleration due to mass attraction of the Earth)
 
template<typename Derived >
Eigen::Vector3< typename Derived::Scalar > NAV::n_calcGravitation_EGM96 (const Eigen::MatrixBase< Derived > &lla_position, size_t ndegree=10)
 Calculates the gravitation (acceleration due to mass attraction of the Earth) at the WGS84 reference ellipsoid using the EGM96 spherical harmonic model (up to order 10)
 
template<typename Scalar , typename = std::enable_if_t<std::is_floating_point_v<Scalar>>>
Eigen::Vector3< Scalar > NAV::n_calcGravitation_SomiglianaAltitude (const Scalar &latitude, const Scalar &altitude)
 Calculates the gravitation (acceleration due to mass attraction of the Earth) at the WGS84 reference ellipsoid using the Somigliana model and makes corrections for altitude.
 
template<typename Scalar , typename = std::enable_if_t<std::is_floating_point_v<Scalar>>>
Eigen::Vector3< Scalar > NAV::n_calcGravitation_WGS84 (const Scalar &latitude, const Scalar &altitude)
 Calculates the gravitation (acceleration due to mass attraction of the Earth) at the WGS84 reference ellipsoid using gravity as derived from the gravity potential.
 
template<typename Scalar , typename = std::enable_if_t<std::is_floating_point_v<Scalar>>>
Eigen::Vector3< Scalar > NAV::n_calcGravitation_WGS84_Skydel (const Scalar &latitude, const Scalar &altitude)
 Calculates the gravitation (acceleration due to mass attraction of the Earth) at the WGS84 reference ellipsoid using gravity as derived from the gravity potential. However, the north component of the centrifugal acceleration is neglected in order to match the implementation of Skydel's 'ImuPlugin'.
 
const char * NAV::to_string (GravitationModel gravitationModel)
 Converts the enum to a string.
 

Detailed Description

Enumeration Type Documentation

◆ GravitationModel

enum class NAV::GravitationModel : int
strong

Available Gravitation Models.

Enumerator
None 

Gravity Model turned off.

WGS84 

World Geodetic System 1984.

WGS84_Skydel 

World Geodetic System 1984 implemented by the Skydel Simulator // FIXME: Remove after Skydel uses the same as Instinct.

Somigliana 

Somigliana gravity model.

EGM96 

Earth Gravitational Model 1996.

COUNT 

Amount of items in the enum.

Function Documentation

◆ ComboGravitationModel()

bool NAV::ComboGravitationModel ( const char * label,
GravitationModel & gravitationModel )

Shows a ComboBox to select the gravitation model.

Parameters
[in]labelLabel to show beside the combo box. This has to be a unique id for ImGui.
[in]gravitationModelReference to the gravitation model to select

◆ n_calcGravitation()

template<typename Derived >
Eigen::Vector3< typename Derived::Scalar > NAV::n_calcGravitation ( const Eigen::MatrixBase< Derived > & lla_position,
GravitationModel gravitationModel = GravitationModel::EGM96 )

Calculates the gravitation (acceleration due to mass attraction of the Earth)

Parameters
[in]lla_position[ϕ, λ, h] Latitude, Longitude, Altitude in [rad, rad, m]
[in]gravitationModelGravitation model to use
Returns
Gravitation vector in local-navigation frame coordinates in [m/s^2]

◆ n_calcGravitation_EGM96()

template<typename Derived >
Eigen::Vector3< typename Derived::Scalar > NAV::n_calcGravitation_EGM96 ( const Eigen::MatrixBase< Derived > & lla_position,
size_t ndegree = 10 )

Calculates the gravitation (acceleration due to mass attraction of the Earth) at the WGS84 reference ellipsoid using the EGM96 spherical harmonic model (up to order 10)

Parameters
[in]lla_position[ϕ, λ, h] Latitude, Longitude, Altitude in [rad, rad, m]
[in]ndegreeDegree of the EGM96 (1 <= ndegree <= 10)
Returns
Gravitation vector in local-navigation frame coordinates in [m/s^2]
Note
See Groves (2013) Chapter 2.4.3 and 'GUT User Guide' (2018) Chapter 7.4

◆ n_calcGravitation_SomiglianaAltitude()

template<typename Scalar , typename = std::enable_if_t<std::is_floating_point_v<Scalar>>>
Eigen::Vector3< Scalar > NAV::n_calcGravitation_SomiglianaAltitude ( const Scalar & latitude,
const Scalar & altitude )

Calculates the gravitation (acceleration due to mass attraction of the Earth) at the WGS84 reference ellipsoid using the Somigliana model and makes corrections for altitude.

Parameters
[in]latitudeLatitude in [rad]
[in]altitudeAltitude in [m]
Returns
Gravitation vector in local-navigation frame coordinates in [m/s^2]
Note
See S. Gleason (2009) - GNSS Applications and Methods (Chapter 6.2.3.2 - eq. 6.16)

◆ n_calcGravitation_WGS84()

template<typename Scalar , typename = std::enable_if_t<std::is_floating_point_v<Scalar>>>
Eigen::Vector3< Scalar > NAV::n_calcGravitation_WGS84 ( const Scalar & latitude,
const Scalar & altitude )

Calculates the gravitation (acceleration due to mass attraction of the Earth) at the WGS84 reference ellipsoid using gravity as derived from the gravity potential.

Parameters
[in]latitudeLatitude in [rad]
[in]altitudeAltitude in [m]
Returns
Gravitation vector in local-navigation frame coordinates in [m/s^2]
Note
See 'INS-Projects/INSTINCT/SpecificLiterature/GravityPotentialWGS84' in NC folder (eq. (3) derived after 'r')

◆ n_calcGravitation_WGS84_Skydel()

template<typename Scalar , typename = std::enable_if_t<std::is_floating_point_v<Scalar>>>
Eigen::Vector3< Scalar > NAV::n_calcGravitation_WGS84_Skydel ( const Scalar & latitude,
const Scalar & altitude )

Calculates the gravitation (acceleration due to mass attraction of the Earth) at the WGS84 reference ellipsoid using gravity as derived from the gravity potential. However, the north component of the centrifugal acceleration is neglected in order to match the implementation of Skydel's 'ImuPlugin'.

Parameters
[in]latitudeLatitude in [rad]
[in]altitudeAltitude in [m]
Returns
Gravitation vector in local-navigation frame coordinates in [m/s^2]
Note
See Skydel API plug-in 'skydel_plugin/source/library/inertial_math/Sources/source/gravity.cpp'

◆ to_string()

const char * NAV::to_string ( GravitationModel gravitationModel)

Converts the enum to a string.

Parameters
[in]gravitationModelEnum value to convert into text
Returns
String representation of the enum