INSTINCT Code Coverage Report


Directory: src/
File: Navigation/Atmosphere/Pressure/Models/StandardAtmosphere.hpp
Date: 2025-02-07 16:54:41
Exec Total Coverage
Lines: 2 2 100.0%
Functions: 1 1 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 /// @file StandardAtmosphere.hpp
10 /// @brief Standard Atmosphere pressure model
11 /// @author T. Topp (topp@ins.uni-stuttgart.de)
12 /// @date 2023-01-31
13
14 #pragma once
15
16 #include <gcem.hpp>
17
18 namespace NAV
19 {
20
21 /// @brief Calculates the standard atmosphere total pressure
22 /// @param[in] altitudeMSL Geodetic height above MSL (mean sea level) [m]
23 /// @return The total pressure in [hPa] = [mbar]
24 /// @note See \cite RTKLIB RTKLIB ch. E.5, eq. E.5.1, p. 149
25 21942 [[nodiscard]] constexpr double calcTotalPressureStAtm(double altitudeMSL)
26 {
27 21942 return 1013.25 * gcem::pow(1 - 2.2557e-5 * altitudeMSL, 5.2568);
28 }
29
30 } // namespace NAV
31