0.4.1
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages Concepts
Klobuchar.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
9/// @file Klobuchar.hpp
10/// @brief Klobuchar Ionospheric correction model
11/// @author T. Topp (topp@ins.uni-stuttgart.de)
12/// @date 2022-05-26
13
14#pragma once
15
16#include <array>
18
19namespace NAV
20{
21
22/// @brief Calculates the ionospheric time delay with the Klobuchar model
23/// @param[in] tow GPS time of week in [s]
24/// @param[in] freq Frequency of the signal
25/// @param[in] freqNum Frequency number. Only used for GLONASS G1 and G2
26/// @param[in] latitude 𝜙 Geodetic latitude in [rad]
27/// @param[in] longitude λ Geodetic longitude in [rad]
28/// @param[in] elevation Angle between the user and satellite [rad]
29/// @param[in] azimuth Angle between the user and satellite, measured clockwise positive from the true North [rad]
30/// @param[in] alpha The coefficients of a cubic equation representing the amplitude of the vertical delay
31/// @param[in] beta The coefficients of a cubic equation representing the period of the model
32/// @return Ionospheric time delay in [s]
33/// @note See \cite Klobuchar1987 Klobuchar p. 329
34/// @note See \cite IS-GPS-200M IS-GPS-200 ch. 20.3.3.5.2.5 Figure 20-4 p.131-134
35/// @anchor Ionosphere-Model-Klobuchar
36///
37/// #### Algorithm description
38/// Given the approximate position \f$ \phi, \lambda \f$, the elevation angle \f$ \varepsilon \f$, the azimuth \f$ \alpha \f$ as well as the 8 Klobuchar coefficients \f$ \alpha_i, \beta_i, i = 0,...,3 \f$ one can compute the following:
39///
40/// - earth-centred angle (elevation in semicircles)
41/// \anchor eq-klobuchar-earthCentredAngle \f{equation}{ \label{eq:eq-klobuchar-earthCentredAngle}
42/// \psi = \frac{0.0137}{\varepsilon + 0.11} - 0.022
43/// \f}
44///
45/// - latitude of the Ionospheric Pierce Point IPP (semicircles)
46/// \anchor eq-klobuchar-latIPP \f{equation}{ \label{eq:eq-klobuchar-latIPP}
47/// \phi_\mathrm{IPP} = \phi + \psi \cos(\alpha)
48/// \f}
49/// If \f$ \phi_\mathrm{IPP} > 0.416 \f$, then \f$ \phi_\mathrm{IPP} = 0.416 \f$ and if \f$ \phi_\mathrm{IPP} < -0.416 \f$, then \f$ \phi_\mathrm{IPP} = -0.416 \f$ .
50///
51/// - longitude of the Ionospheric Pierce Point IPP (semicircles)
52/// \anchor eq-klobuchar-longIPP \f{equation}{ \label{eq:eq-klobuchar-longIPP}
53/// \lambda_\mathrm{IPP} = \lambda + \frac{\psi \sin(\alpha)}{\cos(\phi_\mathrm{IPP})}
54/// \f}
55///
56/// - geomagnetic latitude of IPP
57/// \anchor eq-klobuchar-latIPP-geomag \f{equation}{ \label{eq:eq-klobuchar-latIPP-geomag}
58/// \phi_\mathrm{mag} = \phi_\mathrm{IPP} + 0.064 \cos(\lambda_\mathrm{IPP}-1.617)
59/// \f}
60///
61/// - local time at IPP in [s]
62/// \anchor eq-klobuchar-localTimeIPP \f{equation}{ \label{eq:eq-klobuchar-localTimeIPP}
63/// t = 43200 \lambda_\mathrm{IPP} + t_\mathrm{GPS}
64/// \f}
65/// where the local time at IPP is \f$ 0 \leq t < 86400 \f$, so if \f$ t \geq 86400 \f$, \f$ t = t - 86400 \f$ and if \f$ t < 0 \f$, \f$ t = t + 86400 \f$.
66///
67/// - slant factor (elevation in semicircles)
68/// \anchor eq-klobuchar-slantFactor \f{equation}{ \label{eq:eq-klobuchar-slantFactor}
69/// F = 1.0 + 16.0 (0.53-\varepsilon)^{3}
70/// \f}
71///
72/// - amplitude of ionospheric delay in [s]
73/// \anchor eq-klobuchar-amp \f{equation}{ \label{eq:eq-klobuchar-amp}
74/// A_\mathrm{I}=\sum_{n=0}^{3} \alpha_{n} \phi_{mag}^{n}
75/// \f}
76///
77/// - period of ionospheric delay in [s]
78/// \anchor eq-klobuchar-period \f{equation}{ \label{eq:eq-klobuchar-period}
79/// P_\mathrm{I}=\sum_{n=0}^{3} \beta_{n} \phi_{mag}^{n}
80/// \f}
81/// If \f$ P_\mathrm{I} < 72000 \f$, set it to \f$ P_\mathrm{I} = 72000 \f$.
82///
83/// - phase of ionospheric delay in [rad]
84/// \anchor eq-klobuchar-phase \f{equation}{ \label{eq:eq-klobuchar-phase}
85/// X_\mathrm{I} = \frac{2\pi (t-50400)}{P_\mathrm{I}}
86/// \f}
87///
88/// - ionospheric time delay in [s]
89/// \anchor eq-klobuchar-ionoTimeDelay \f{equation}{ \label{eq:eq-klobuchar-ionoTimeDelay}
90/// I_{L1_{GPS}}= \begin{cases}{
91/// \left[5 \cdot 10^{-9}+ A_\mathrm{I} \cdot\left(1-\frac{X_{I}^{2}}{2}+\frac{X_{I}^{4}}{24}\right)\right] \cdot F} & , \text{if} \left|X_{I}\right| < 1.57 \\
92/// 5 \cdot 10^{-9} \cdot F & , \text{if} \left|X_{I}\right| \geq 1.57
93/// \end{cases}
94/// \f}
95///
96/// - The ionospheric time delay \f$ I_{L1_{GPS}} \f$ refers to the GPS L1 frequency and gets adapted to the given frequency automatically.
97double calcIonosphericTimeDelay_Klobuchar(double tow, Frequency freq, int8_t freqNum,
98 double latitude, double longitude,
99 double elevation, double azimuth,
100 const std::array<double, 4>& alpha, const std::array<double, 4>& beta);
101
102} // namespace NAV
Frequency definition for different satellite systems.
Frequency definition for different satellite systems.
Definition Frequency.hpp:59
double calcIonosphericTimeDelay_Klobuchar(double tow, Frequency freq, int8_t freqNum, double latitude, double longitude, double elevation, double azimuth, const std::array< double, 4 > &alpha, const std::array< double, 4 > &beta)
Calculates the ionospheric time delay with the Klobuchar model.
Definition Klobuchar.cpp:21