6#ifndef ACTIVE_MEASURE_ANGLE_UNIT
7#define ACTIVE_MEASURE_ANGLE_UNIT
9#include "Active/Setting/Values/Measurement/Units/Unit.h"
40 static AngleUnit radians(uint8_t prec = 4,
bool suffixes =
true) {
return AngleUnit{radian, prec,
true, suffixes}; }
42 static AngleUnit degreesDec(uint8_t prec = 4,
bool suffixes =
true) {
return AngleUnit{degree, prec,
true, suffixes}; }
44 static AngleUnit degrees(
bool suffixes =
true) {
return AngleUnit{degree, 0,
true, suffixes}; }
48 static AngleUnit degreesMinutesSeconds() {
return AngleUnit{degree, minute, second, 0}; }
52 result.isSurveyBearing =
true;
111 friend typename Unit;
119 constexpr static int lengthCount =
static_cast<int>(gradian) + 1;
121 static std::array<const char*, lengthCount> tags;
122 static std::array<const char*, lengthCount> abbreviations;
123 static std::array<double, lengthCount> conversions;
124 static std::array<bool, lengthCount> metric;
Definition AngleUnit.cpp:14
AngleType
Enumeration of known angle measurement units.
Definition AngleUnit.h:16
Definition AngleUnit.h:29
double zeroOffset
Offset to 0° (from the positive x axis)) e.g. zeroOffset = pi / 2 if 0° points North....
Definition AngleUnit.h:98
AngleUnit(AngleType first, AngleType second, AngleType third, uint8_t prec, bool isDecimal=true)
Definition AngleUnit.h:88
bool isClockwisePositive
True if s clockwise sweep angle is positive. Ignored when isSurveyBearing = true.
Definition AngleUnit.h:96
AngleUnit()
Definition AngleUnit.h:61
bool isConventionalAngle() const
Definition AngleUnit.h:106
AngleUnit(AngleType first, AngleType second, uint8_t prec, bool isDecimal=true)
Definition AngleUnit.h:78
bool isSurveyBearing
True if convention for survey bearings is used, e.g. N 25° W.
Definition AngleUnit.h:94
AngleUnit(AngleType type, uint8_t prec, bool isDecimal=true, bool suffixes=true)
Definition AngleUnit.h:69
bool isDecimal() const
Definition Unit.h:102