0.3.0
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages Concepts
WaterVapor.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 <cstdint>
17#include <fmt/format.h>
18
19namespace NAV
20{
21
23enum class WaterVaporModel : uint8_t
24{
25 None,
26 ISA,
27 GPT2,
28 GPT3,
29 COUNT,
30};
31
35const char* to_string(WaterVaporModel waterVaporModel);
36
40bool ComboWaterVaporModel(const char* label, WaterVaporModel& waterVaporModel);
41
47[[nodiscard]] double calcWaterVaporPartialPressure(double temp, double humidity_rel, WaterVaporModel waterVaporModel);
48
49} // namespace NAV
50
51#ifndef DOXYGEN_IGNORE
52
54template<>
55struct fmt::formatter<NAV::WaterVaporModel> : fmt::formatter<std::string>
56{
61 template<typename FormatContext>
62 auto format(const NAV::WaterVaporModel& data, FormatContext& ctx) const
63 {
64 return fmt::formatter<std::string>::format(NAV::to_string(data), ctx);
65 }
66};
67
68#endif
@ None
None.
Definition GlobalActions.hpp:21
@ COUNT
Amount of items in the enum.
const char * to_string(gui::widgets::PositionWithFrame::ReferenceFrame refFrame)
Converts the enum to a string.
@ ISA
ICAO Standard Atmosphere.
WaterVaporModel
Available Water vapor Models.
Definition WaterVapor.hpp:24
bool ComboWaterVaporModel(const char *label, WaterVaporModel &waterVaporModel)
Shows a ComboBox to select the water vapor model.
double calcWaterVaporPartialPressure(double temp, double humidity_rel, WaterVaporModel waterVaporModel)
Calculates the partial pressure of water vapor.