INSTINCT Code Coverage Report


Directory: src/
File: Navigation/Atmosphere/Troposphere/Models/Saastamoinen.cpp
Date: 2025-02-07 16:54:41
Exec Total Coverage
Lines: 8 8 100.0%
Functions: 2 2 100.0%
Branches: 0 0 -%

Line Branch Exec Source
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 #include "Saastamoinen.hpp"
10
11 #include <cmath>
12 #include "util/Logger.hpp"
13
14 namespace NAV
15 {
16
17 21942 double calcZHD_Saastamoinen(const Eigen::Vector3d& lla_pos, double p)
18 {
19 21942 const double& lat = lla_pos(0); // Latitude in [rad]
20 21942 const double& alt = lla_pos(2); // Altitude/Height in [m]
21
22 // Zenith hydrostatic delay [m] - Davis, Appendix A, eq. A11, p. 1604
23 21942 double ZHD = 0.0022768 * p / (1 - 0.00266 * std::cos(2 * lat) - 0.00028 * alt * 1e-3);
24 LOG_DATA("ZHD {} [m] (Zenith hydrostatic delay)", ZHD);
25
26 21942 return ZHD;
27 }
28
29 21942 double calcZWD_Saastamoinen(double T, double e)
30 {
31 // Zenith wet delay [m]
32 21942 double ZWD = 0.002277 * (1255.0 / T + 0.05) * e;
33 LOG_DATA("ZWD {} [m] (Zenith wet delay)", ZWD);
34
35 21942 return ZWD;
36 }
37
38 } // namespace NAV
39