0.3.0
Loading...
Searching...
No Matches
Units.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 <cstddef>
17#include <string>
18
19#include "util/Json.hpp"
20
21namespace NAV
22{
23
24namespace Units
25{
26
28enum class CovarianceAccelUnits : uint8_t
29{
30 m2_s3,
31 m_sqrts3,
32 COUNT,
33};
34
36enum class CovarianceClkPhaseDriftUnits : uint8_t
37{
38 m2_s,
39 m_sqrts,
40 COUNT,
41};
42
45{
46 m2_s3,
47 m_sqrts3,
48 COUNT,
49};
50
54void to_json(json& j, const CovarianceAccelUnits& data);
58void from_json(const json& j, CovarianceAccelUnits& data);
59
63void to_json(json& j, const CovarianceClkPhaseDriftUnits& data);
67void from_json(const json& j, CovarianceClkPhaseDriftUnits& data);
68
72void to_json(json& j, const CovarianceClkFrequencyDriftUnits& data);
76void from_json(const json& j, CovarianceClkFrequencyDriftUnits& data);
77
78} // namespace Units
79
84[[nodiscard]] double convertUnit(const double& value, Units::CovarianceAccelUnits unit);
85
90[[nodiscard]] double convertUnit(const double& value, Units::CovarianceClkPhaseDriftUnits unit);
91
96[[nodiscard]] double convertUnit(const double& value, Units::CovarianceClkFrequencyDriftUnits unit);
97
100[[nodiscard]] std::string to_string(Units::CovarianceAccelUnits unit);
103[[nodiscard]] std::string to_string(Units::CovarianceClkPhaseDriftUnits unit);
107
108} // namespace NAV
nlohmann::json json
json namespace
Definition FlowManager.hpp:21
CovarianceClkPhaseDriftUnits
Possible Units for the Standard deviation of the clock phase drift.
Definition Units.hpp:37
double convertUnit(const double &value, Units::CovarianceAccelUnits unit)
Converts the value depending on the unit provided.
CovarianceAccelUnits
Possible Units for the Standard deviation of the acceleration due to user motion.
Definition Units.hpp:29
CovarianceClkFrequencyDriftUnits
Possible Units for the Standard deviation of the clock frequency drift.
Definition Units.hpp:45
@ COUNT
Amount of items in the enum.
Defines how to save certain datatypes to json.
const char * to_string(gui::widgets::PositionWithFrame::ReferenceFrame refFrame)
Converts the enum to a string.