0.3.0
Loading...
Searching...
No Matches
Saastamoinen.cpp
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#include "Saastamoinen.hpp"
10
11#include <cmath>
12#include "util/Logger.hpp"
13
14namespace NAV
15{
16
17double calcZHD_Saastamoinen(const Eigen::Vector3d& lla_pos, double p)
18{
19 const double& lat = lla_pos(0); // Latitude in [rad]
20 const double& alt = lla_pos(2); // Altitude/Height in [m]
21
22 // Zenith hydrostatic delay [m] - Davis, Appendix A, eq. A11, p. 1604
23 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 return ZHD;
27}
28
29double calcZWD_Saastamoinen(double T, double e)
30{
31 // Zenith wet delay [m]
32 double ZWD = 0.002277 * (1255.0 / T + 0.05) * e;
33 LOG_DATA("ZWD {} [m] (Zenith wet delay)", ZWD);
34
35 return ZWD;
36}
37
38} // namespace NAV
Utility class for logging to console and file.
#define LOG_DATA
All output which occurs repeatedly every time observations are received.
Definition Logger.hpp:29
Saastamoinen troposphere correction model.
double calcZWD_Saastamoinen(double T, double e)
Calculates the tropospheric zenith wet delay with the Saastamoinen model.
double calcZHD_Saastamoinen(const Eigen::Vector3d &lla_pos, double p)
Calculates the tropospheric zenith hydrostatic delay with the Saastamoinen model.