26 LOG_WARN(
"Could not parse '{}' into PositionUncertaintyUnits. Consider resaving the flow", j.dump());
29 std::string
str = j.get<std::string>();
49 LOG_WARN(
"Could not parse '{}' into VelocityUncertaintyUnits. Consider resaving the flow", j.dump());
52 std::string
str = j.get<std::string>();
72 LOG_WARN(
"Could not parse '{}' into AttitudeUncertaintyUnits. Consider resaving the flow", j.dump());
75 std::string
str = j.get<std::string>();
95 LOG_WARN(
"Could not parse '{}' into VelocityUnits. Consider resaving the flow", j.dump());
98 std::string
str = j.get<std::string>();
118 LOG_WARN(
"Could not parse '{}' into AttitudeUnits. Consider resaving the flow", j.dump());
121 std::string
str = j.get<std::string>();
142 return std::sqrt(value);
155 return value.array().sqrt();
169 return std::sqrt(value);
182 return value.array().sqrt();
198 return std::sqrt(value);
200 return deg2rad(std::sqrt(value));
215 return value.array().sqrt();
217 return deg2rad(value.array().sqrt());
nlohmann::json json
json namespace
Units used by GNSS positioning.
Utility class for logging to console and file.
#define LOG_WARN
Error occurred, but a fallback option exists and program continues to work normally.
AttitudeUncertaintyUnits
Possible units for the uncertainty of the attitude.
@ rad
Standard deviation [radian].
@ deg
Standard deviation [degree].
@ COUNT
Amount of items in the enum.
@ rad2
Variance [radian^2].
@ deg2
Variance [degree^2].
void to_json(json &j, const PositionUncertaintyUnits &data)
Converts the provided data into a json object.
PositionUncertaintyUnits
Possible units for the uncertainty of the position.
@ meter2
Variance [m^2, m^2, m^2].
@ COUNT
Amount of items in the enum.
@ meter
Standard deviation [m, m, m].
VelocityUncertaintyUnits
Possible units for the uncertainty of the velocity.
@ m_s
Standard deviation [m/s].
@ COUNT
Amount of items in the enum.
@ m2_s2
Variance [m^2/s^2].
void from_json(const json &j, PositionUncertaintyUnits &data)
Converts the provided json object into the data object.
AttitudeUnits
Possible units for the attitude.
@ COUNT
Amount of items in the enum.
VelocityUnits
Possible units for the velocity.
@ COUNT
Amount of items in the enum.
const char * to_string(gui::widgets::PositionWithFrame::ReferenceFrame refFrame)
Converts the enum to a string.
double convertUnit(const double &value, Units::PositionUncertaintyUnits unit)
Converts the value depending on the unit provided.
constexpr auto deg2rad(const T °)
Convert Degree to Radians.