0.2.0
Loading...
Searching...
No Matches
Constants.hpp
Go to the documentation of this file.
1// This file is part of INSTINCT, the INS Toolkit for Integrated
2// Navigation Concepts and Training by the Institute of Navigation of
3// the University of Stuttgart, Germany.
4//
5// This Source Code Form is subject to the terms of the Mozilla Public
6// License, v. 2.0. If a copy of the MPL was not distributed with this
7// file, You can obtain one at https://mozilla.org/MPL/2.0/.
8
13
14#pragma once
15
16#include <cmath>
17#include "util/Eigen.hpp"
18#include <gcem.hpp>
19
20namespace NAV
21{
22
24template<typename Scalar = double>
26{
27 public:
29 InsConst() = delete;
30
32 static constexpr Scalar pseudometre = 6370000;
33
35 static constexpr Scalar C = 299792458.0;
36
38 static constexpr Scalar G_NORM = 9.80665;
39
41 class WGS84
42 {
43 public:
45 WGS84() = delete;
46
48 static constexpr Scalar a = 6378137.0;
50 static constexpr Scalar f = 1.0 / 298.257223563;
52 static constexpr Scalar b = a - f * a;
54 static constexpr Scalar e_squared = 2 * f - f * f;
56 static constexpr Scalar MU = 3.986004418e14;
58 static constexpr Scalar J2 = 1.081874e-3;
60 static constexpr Scalar omega_ie = 7.2921151467e-05;
61 };
62
64 class GRS80
65 {
66 public:
68 GRS80() = delete;
69
71 static constexpr Scalar a = 6378137;
73 static constexpr Scalar f = 1.0 / 298.257222101;
75 static constexpr Scalar b = a - f * a;
77 static constexpr Scalar e_squared = 2 * f - f * f;
78 };
79
81 class PZ90
82 {
83 public:
85 PZ90() = delete;
86
88 static constexpr Scalar a = 6378136;
90 static constexpr Scalar f = 1.0 / 298.25784;
92 static constexpr Scalar b = a - f * a;
94 static constexpr Scalar e_squared = 2 * f - f * f;
96 static constexpr Scalar MU = 3.986004418e14;
98 static constexpr Scalar omega_ie = 7.292115e-05;
99
101 static constexpr Scalar J2 = 1.08262575e-3;
102 };
103
105 class GPS
106 {
107 public:
109 GPS() = delete;
110
112 static constexpr Scalar MU = 3.986005e+14;
114 static constexpr Scalar omega_ie = WGS84::omega_ie;
116 static constexpr Scalar F = -2.0 * gcem::sqrt(MU) / (C * C);
118 static constexpr Scalar R_E = WGS84::a;
120 static constexpr Scalar J2 = 1.0826262e-3;
121 };
122
124 class GLO
125 {
126 public:
128 GLO() = delete;
129
131 static constexpr Scalar a = PZ90::a;
133 static constexpr Scalar MU = PZ90::MU;
135 static constexpr Scalar omega_ie = 7.2921151467e-05;
137 static constexpr Scalar J2 = PZ90::J2;
139 static constexpr Scalar C20_bar = 1.0 / gcem::sqrt(5.0) * J2;
141 static constexpr Scalar C20 = -J2;
142 };
143
145 class GAL
146 {
147 public:
149 GAL() = delete;
150
152 static constexpr Scalar omega_ie = WGS84::omega_ie;
154 static constexpr Scalar MU = 3.986004418e+14;
156 static constexpr Scalar F = -2.0 * gcem::sqrt(MU) / (C * C);
157 };
158
162 static constexpr Scalar omega_ie = WGS84::omega_ie;
164 static constexpr Scalar omega_ie_Skydel = 7.2921155e-5; // FIXME: Skydel (for compatibility with Skydel's IMU plugin)
165
167 const static inline Eigen::Vector3<Scalar> e_omega_ie{ 0.0, 0.0, omega_ie };
168
171 static constexpr Scalar N_A = 6.02214076e23;
173 static constexpr Scalar k_B = 1.380649e-23;
175 static constexpr Scalar Rg = N_A * k_B;
176
178 static constexpr Scalar dMtr = 28.965e-3;
179};
180
181} // namespace NAV
Vector space operations.
GALILEO related constants.
Definition Constants.hpp:146
static constexpr Scalar omega_ie
Earth angular velocity GALILEO [rad/s].
Definition Constants.hpp:152
static constexpr Scalar F
Relativistic constant F for clock corrections [s/√m] (-2*√µ/c²)
Definition Constants.hpp:156
GAL()=delete
Default Constructor.
static constexpr Scalar MU
Earth gravitational constant GALILEO [m³/s²].
Definition Constants.hpp:154
GLONASS related constants (see GLONASS ICD 5.1 Table 3.2)
Definition Constants.hpp:125
static constexpr Scalar MU
Gravitational constant GLONASS [m³/s²].
Definition Constants.hpp:133
static constexpr Scalar C20_bar
Normalized harmonic of the normal geopotential [-].
Definition Constants.hpp:139
static constexpr Scalar a
Semi-major axis = equatorial radius.
Definition Constants.hpp:131
static constexpr Scalar omega_ie
Earth angular velocity GLONASS [rad/s].
Definition Constants.hpp:135
static constexpr Scalar J2
Second degree zonal coefficient of normal potential [-].
Definition Constants.hpp:137
static constexpr Scalar C20
Second zonal coefficient of spherical harmonic expansion [-].
Definition Constants.hpp:141
GLO()=delete
Default Constructor.
GPS related constants.
Definition Constants.hpp:106
static constexpr Scalar J2
Oblate Earth Gravity Coefficient [-].
Definition Constants.hpp:120
static constexpr Scalar R_E
Earth Equatorial Radius [m].
Definition Constants.hpp:118
static constexpr Scalar MU
Gravitational constant GPS [m³/s²]. See IS-GPS-200M p. 106.
Definition Constants.hpp:112
static constexpr Scalar omega_ie
Earth angular velocity GPS [rad/s]. See IS-GPS-200M p. 106.
Definition Constants.hpp:114
static constexpr Scalar F
Relativistic constant F for GPS clock corrections [s/√m] (-2*√µ/c²)
Definition Constants.hpp:116
GPS()=delete
Default Constructor.
Geodetic Reference System 1980.
Definition Constants.hpp:65
static constexpr Scalar f
Flattening f = (a-b)/a.
Definition Constants.hpp:73
static constexpr Scalar e_squared
Square of the first eccentricity of the ellipsoid.
Definition Constants.hpp:77
static constexpr Scalar a
Semi-major axis = equatorial radius.
Definition Constants.hpp:71
GRS80()=delete
Default Constructor.
static constexpr Scalar b
Semi-minor axis = polar radius.
Definition Constants.hpp:75
Parametry Zemli 1990 goda (see )
Definition Constants.hpp:82
static constexpr Scalar J2
Second degree zonal coefficient of normal potential [-].
Definition Constants.hpp:101
static constexpr Scalar b
Semi-minor axis = polar radius.
Definition Constants.hpp:92
static constexpr Scalar omega_ie
Earth rotation rate in [rads/s].
Definition Constants.hpp:98
static constexpr Scalar f
Flattening f = (a-b)/a.
Definition Constants.hpp:90
static constexpr Scalar e_squared
Square of the first eccentricity of the ellipsoid.
Definition Constants.hpp:94
static constexpr Scalar MU
Gravitational constant (mass of Earth’s atmosphere included) [m³/s²].
Definition Constants.hpp:96
PZ90()=delete
Default Constructor.
static constexpr Scalar a
Semi-major axis = equatorial radius.
Definition Constants.hpp:88
World Geodetic System 1984.
Definition Constants.hpp:42
static constexpr Scalar a
Semi-major axis = equatorial radius.
Definition Constants.hpp:48
static constexpr Scalar e_squared
Square of the first eccentricity of the ellipsoid.
Definition Constants.hpp:54
static constexpr Scalar f
Flattening f = (a-b)/a.
Definition Constants.hpp:50
static constexpr Scalar omega_ie
Earth rotation rate in [rads/s].
Definition Constants.hpp:60
WGS84()=delete
Default Constructor.
static constexpr Scalar MU
Gravitational constant (mass of Earth’s atmosphere included) [m³/s²].
Definition Constants.hpp:56
static constexpr Scalar J2
Dynamic form factor, derived [-].
Definition Constants.hpp:58
static constexpr Scalar b
Semi-minor axis = polar radius.
Definition Constants.hpp:52
Constants.
Definition Constants.hpp:26
static constexpr Scalar k_B
Boltzmann constant [J/K].
Definition Constants.hpp:173
static const Eigen::Vector3< Scalar > e_omega_ie
ω_ie_e = ω_ie_i Nominal mean angular velocity of the Earth in [rad/s], in earth coordinates
Definition Constants.hpp:167
static constexpr Scalar G_NORM
Standard gravity in [m / s^2].
Definition Constants.hpp:38
static constexpr Scalar N_A
Definition Constants.hpp:171
static constexpr Scalar dMtr
Molar mass of dry air in [kg/mol].
Definition Constants.hpp:178
InsConst()=delete
Default Constructor.
static constexpr Scalar pseudometre
Conversion factor between latitude and longitude in [rad] to [pseudometre].
Definition Constants.hpp:32
static constexpr Scalar omega_ie_Skydel
Nominal mean angular velocity of the Earth in [rad/s]. Value implemented by the Skydel GNSS simulator...
Definition Constants.hpp:164
static constexpr Scalar C
Speed of light [m/s].
Definition Constants.hpp:35
static constexpr Scalar omega_ie
Nominal mean angular velocity of the Earth in [rad/s].
Definition Constants.hpp:162
static constexpr Scalar Rg
Universal gas constant in [J/K/mol].
Definition Constants.hpp:175