56 return "Data Processor";
63 if (ImGui::InputDouble(fmt::format(
"Sea-level pressure##{}",
size_t(
id)).c_str(), &
_pressure0, 0.0, 0.0,
"%.3f hPa"))
68 if (ImGui::InputDouble(fmt::format(
"Sea-level temperature##{}",
size_t(
id)).c_str(), &
_temp0, 0.0, 0.0,
"%.3f K"))
73 if (ImGui::InputDouble(fmt::format(
"Temperature lapse rate##{}",
size_t(
id)).c_str(), &
_lapserate, 0.0, 0.0,
"%.6f K / m"))
78 if (ImGui::InputDouble(fmt::format(
"Geoid undulation##{}",
size_t(
id)).c_str(), &
_geoidhgt, 0.0, 0.0,
"%.3f m"))
83 ImGui::SetNextItemWidth(columnWidth);
93 if (ImGui::InputDouble(fmt::format(
"Gravity##{}",
size_t(
id)).c_str(), &
_gravity, 0.0, 0.0,
"%.5f m / s²"))
145 if (j.contains(
"temp0"))
147 j.at(
"temp0").get_to(
_temp0);
149 if (j.contains(
"pressure0"))
153 if (j.contains(
"lapserate"))
157 if (j.contains(
"geoidhgt"))
161 if (j.contains(
"gravity"))
165 if (j.contains(
"initPos"))
169 if (j.contains(
"gravityInput"))
177 auto pressureObs = std::static_pointer_cast<const BaroPressObs>(queue.
extract_front());
179 auto baroheight = std::make_shared<BaroHgt>();
181 baroheight->insTime = pressureObs->insTime;
186 if (pressureObs->baro_pressureStdev.has_value())
188 baroheight->baro_heightStdev = std::fabs(
_temp0 / (
_lapserate *
_exponent * pressureObs->baro_pressure) * std::pow(pressureObs->baro_pressure /
_pressure0, 1.0 /
_exponent - 1.0)) * pressureObs->baro_pressureStdev.value();
Barometric Height Storage Class.
Barometric Pressure Storage Class.
Combo representing an enumeration.
nlohmann::json json
json namespace
Different Gravity Models.
Text Help Marker (?) with Tooltip.
Utility class for logging to console and file.
#define LOG_DATA
All output which occurs repeatedly every time observations are received.
#define LOG_TRACE
Detailled info to trace the execution of the program. Should not be called on functions which receive...
Pressure to height converter.
static std::string type()
Returns the type of the data class.
static std::string type()
Returns the type of the data class.
static constexpr double Rg
Universal gas constant in [J/K/mol].
static constexpr double dMtr
Molar mass of dry air in [kg/mol].
ImVec2 _guiConfigDefaultWindowSize
Node(std::string name)
Constructor.
std::string nameId() const
Node name and id.
std::string name
Name of the Node.
void invokeCallbacks(size_t portIndex, const std::shared_ptr< const NodeData > &data)
Calls all registered callbacks on the specified output port.
bool _hasConfig
Flag if the config window should be shown.
void deinitialize() override
Deinitialize the node.
bool initialize() override
Initialize the node.
double _temp0
Temperature at Sea level in deg K.
double _geoidhgt
Geoid undulation in m.
void guiConfig() override
ImGui config window which is shown on double click.
double _lapserate
Temperature lapse rate in K / m.
std::string type() const override
String representation of the Class Type.
~PressToHgt() override
Destructor.
static constexpr size_t OUTPUT_PORT_INDEX_BAROHEIGHT
Flow.
@ Position
Entry of the position, gravity is then deducted from EGM96.
@ Manual
Manual entry of the gravity's magnitude.
void restore(const json &j) override
Restores the node from a json object.
static std::string category()
String representation of the Class Category.
double _gravity
Gravity in m / s²
static std::string typeStatic()
String representation of the Class Type.
GravityInput _gravityInput
Default gravity input type.
double _exponent
save computations, by storing g * M / R0 / L;
PressToHgt()
Default constructor.
double _pressure0
Pressure at Sea level in hPa.
Eigen::Vector3d _initPos
Initial position in LLA [deg, deg, m] for the calculation of the local gravity through EGM96.
void receiveObs(InputPin::NodeDataQueue &queue, size_t pinIdx)
Converts the RtklibPosObs into PosVel.
json save() const override
Saves the node into a json object.
auto extract_front()
Returns a copy of the first element in the container and removes it from the container.
static float windowFontRatio()
Ratio to multiply for GUI window elements.
bool InputDouble3(const char *label, double v[3], const char *format, ImGuiInputTextFlags flags)
Shows an InputText GUI element for an array of 'double[3]'.
OutputPin * CreateOutputPin(Node *node, const char *name, Pin::Type pinType, const std::vector< std::string > &dataIdentifier, OutputPin::PinData data=static_cast< void * >(nullptr), int idx=-1)
Create an Output Pin object.
InputPin * CreateInputPin(Node *node, const char *name, Pin::Type pinType, const std::vector< std::string > &dataIdentifier={}, InputPin::Callback callback=static_cast< InputPin::FlowFirableCallbackFunc >(nullptr), InputPin::FlowFirableCheckFunc firable=nullptr, int priority=0, int idx=-1)
Create an Input Pin object.
void ApplyChanges()
Signals that there have been changes to the flow.
Eigen::Vector3< typename Derived::Scalar > n_calcGravitation_EGM96(const Eigen::MatrixBase< Derived > &lla_position, size_t ndegree=10)
Calculates the gravitation (acceleration due to mass attraction of the Earth) at the WGS84 reference ...