0.4.1
Loading...
Searching...
No Matches
NAV::TemperatureModel Class Reference

Temperature Model parameters. More...

Public Types

enum  Model : uint8_t {
  None ,
  Const ,
  ISA ,
  GPT2 ,
  GPT3 ,
  COUNT
}
 Available temperature Models. More...
 

Public Member Functions

double calcAbsoluteTemperature (double altitudeMSL) const
 Calculates the absolute temperature.
 
 TemperatureModel (Model model)
 Constructor.
 

Private Attributes

double _constantTemperature
 Temperature for the constant temperature model [K].
 
Model _model
 Selected model.
 

Friends

bool ComboTemperatureModel (const char *label, TemperatureModel &temperatureModel)
 Shows a ComboBox to select the temperature model.
 
bool ComboTemperatureModel (const char *label, TemperatureModel &temperatureModel)
 Shows a ComboBox to select the temperature model.
 
void from_json (const json &j, TemperatureModel &obj)
 Converts the provided json object into a node object.
 
constexpr bool operator== (const TemperatureModel &lhs, const TemperatureModel &rhs)
 Equal compares Pin::Kind values.
 
constexpr bool operator== (const TemperatureModel &lhs, const TemperatureModel::Model &rhs)
 Equal compares Pin::Kind values.
 
constexpr bool operator== (const TemperatureModel::Model &lhs, const TemperatureModel &rhs)
 Equal compares Pin::Kind values.
 
void to_json (json &j, const TemperatureModel &obj)
 Converts the provided object into json.
 
const char * to_string (const TemperatureModel &temperatureModel)
 Converts the enum to a string.
 

Detailed Description

Temperature Model parameters.

Definition at line 25 of file Temperature.hpp.

Member Enumeration Documentation

◆ Model

Available temperature Models.

Enumerator
None 

No temperature model.

Const 

Constant value.

ISA 

ICAO Standard Atmosphere.

GPT2 

GPT2.

GPT3 

GPT3.

COUNT 

Amount of items in the enum.

Definition at line 29 of file Temperature.hpp.

Constructor & Destructor Documentation

◆ TemperatureModel()

NAV::TemperatureModel::TemperatureModel ( Model model)
inline

Constructor.

Parameters
modelModel to use

Definition at line 41 of file Temperature.hpp.

Member Function Documentation

◆ calcAbsoluteTemperature()

double NAV::TemperatureModel::calcAbsoluteTemperature ( double altitudeMSL) const
nodiscard

Calculates the absolute temperature.

Parameters
[in]altitudeMSLGeodetic height above MSL (mean sea level) [m]
Returns
The absolute temperature in [K]

Definition at line 38 of file Temperature.cpp.

Friends And Related Symbol Documentation

◆ ComboTemperatureModel [1/2]

bool ComboTemperatureModel ( const char * label,
TemperatureModel & temperatureModel )
friend

Shows a ComboBox to select the temperature model.

Parameters
[in]labelLabel to show beside the combo box. This has to be a unique id for ImGui.
[in]temperatureModelReference to the temperature model to select

Definition at line 22 of file Temperature.cpp.

◆ ComboTemperatureModel [2/2]

bool ComboTemperatureModel ( const char * label,
TemperatureModel & temperatureModel )
friend

Shows a ComboBox to select the temperature model.

Parameters
[in]labelLabel to show beside the combo box. This has to be a unique id for ImGui.
[in]temperatureModelReference to the temperature model to select

Definition at line 22 of file Temperature.cpp.

◆ from_json

void from_json ( const json & j,
TemperatureModel & obj )
friend

Converts the provided json object into a node object.

Parameters
[in]jJson object with the needed values
[out]objObject to fill from the json

Definition at line 91 of file Temperature.cpp.

◆ operator== [1/3]

bool operator== ( const TemperatureModel & lhs,
const TemperatureModel & rhs )
friend

Equal compares Pin::Kind values.

Parameters
[in]lhsLeft-hand side of the operator
[in]rhsRight-hand side of the operator
Returns
Whether the comparison was successful

Definition at line 73 of file Temperature.hpp.

◆ operator== [2/3]

bool operator== ( const TemperatureModel & lhs,
const TemperatureModel::Model & rhs )
friend

Equal compares Pin::Kind values.

Parameters
[in]lhsLeft-hand side of the operator
[in]rhsRight-hand side of the operator
Returns
Whether the comparison was successful

Definition at line 87 of file Temperature.hpp.

◆ operator== [3/3]

bool operator== ( const TemperatureModel::Model & lhs,
const TemperatureModel & rhs )
friend

Equal compares Pin::Kind values.

Parameters
[in]lhsLeft-hand side of the operator
[in]rhsRight-hand side of the operator
Returns
Whether the comparison was successful

Definition at line 92 of file Temperature.hpp.

◆ to_json

void to_json ( json & j,
const TemperatureModel & obj )
friend

Converts the provided object into json.

Parameters
[out]jJson object which gets filled with the info
[in]objObject to convert into json

Definition at line 83 of file Temperature.cpp.

◆ to_string

const char * to_string ( const TemperatureModel & temperatureModel)
friend

Converts the enum to a string.

Parameters
[in]temperatureModelEnum value to convert into text
Returns
String representation of the enum

Definition at line 58 of file Temperature.cpp.

Field Documentation

◆ _constantTemperature

double NAV::TemperatureModel::_constantTemperature
private

Temperature for the constant temperature model [K].

Definition at line 58 of file Temperature.hpp.

◆ _model

Model NAV::TemperatureModel::_model
private

Selected model.

Definition at line 55 of file Temperature.hpp.


The documentation for this class was generated from the following files: