Global configuration file for the project.
double RealType
Type for real numbers.
RotationAngleUnit
Defines the units used at external rotation-path boundaries.
@ Degrees
Compass azimuth and elevation expressed in degrees.
std::vector< std::string > take_captured_warnings()
Returns and clears the thread-local captured rotation warnings.
Confidence
Confidence level for an inferred rotation unit.
@ Low
Weak evidence for the inferred unit.
@ High
Strong evidence for the inferred unit.
@ None
No useful inference could be made.
@ Medium
Moderate evidence for the inferred unit.
InferenceResult infer_unit_from_value(const RealType value, const ValueKind kind) noexcept
Infers the likely unit of a rotation value.
void maybe_warn_about_rotation_value(const RealType value, const params::RotationAngleUnit declared_unit, const ValueKind kind, const std::string_view source, const std::string_view owner, const std::string_view field)
Emits or captures a warning when a rotation value likely uses the wrong unit.
WarningSensitivity
Minimum confidence threshold for emitting rotation-unit warnings.
@ HighConfidence
Warn only on high-confidence mismatches.
@ Aggressive
Warn on any non-low mismatch.
@ MediumOrHigh
Warn on medium or high-confidence mismatches.
bool should_warn(const Confidence confidence, const WarningSensitivity sensitivity) noexcept
Returns true when a warning should be emitted for the confidence and sensitivity.
ValueKind
Kind of rotation value being inspected for unit mistakes.
@ Angle
Absolute rotation angle.
void clear_captured_warnings() noexcept
Clears the thread-local captured rotation warnings.
constexpr WarningSensitivity kWarningSensitivity
Default warning sensitivity used by parser and serializer warnings.
Defines the Parameters struct and provides methods for managing simulation parameters.
Result of inferring likely units from a rotation value.
int degree_score
Heuristic score for degree-like values.
params::RotationAngleUnit inferred_unit
Likely unit for the value.
Confidence confidence
Confidence for the inferred unit.
int radian_score
Heuristic score for radian-like values.