6 #ifndef SWIFT_MISC_AVIATION_HEADING_H
7 #define SWIFT_MISC_AVIATION_HEADING_H
24 namespace swift::misc::aviation
61 QString convertToQString(
bool i18n =
false)
const;
64 CHeading() : CAngle(0, physical_quantities::CAngleUnit::rad()), m_north(True) {}
71 : CAngle(value, unit), m_north(north)
87 void normalizeTo360Degrees();
90 void normalizeToPlusMinus180Degrees();
93 CHeading normalizedToPlusMinus180Degrees()
const;
96 CHeading normalizedTo360Degrees()
const;
102 ReferenceNorth m_north;
Heading as used in aviation, can be true or magnetic heading.
ReferenceNorth getReferenceNorth() const
Get reference north (magnetic or true)
CHeading(double value, const physical_quantities::CAngleUnit &unit)
Constructor.
CHeading()
Default constructor: 0.
CHeading(const CAngle &heading, ReferenceNorth north)
Constructor by CAngle.
bool isMagneticHeading() const
Magnetic heading?
bool isTrueHeading() const
True heading?
CHeading(double value, ReferenceNorth north, const physical_quantities::CAngleUnit &unit)
Constructor.
ReferenceNorth
Enum type to distinguish between true north and magnetic north.
CRTP class template from which a derived class can inherit property indexing functions.
CRTP class template from which a derived class can inherit string streaming operations.
Physical unit angle (radians, degrees)
Specialized class for angles (degrees, radian).
#define SWIFT_MISC_DECLARE_USING_MIXIN_DATASTREAM(DERIVED)
When a derived class and a base class both inherit from mixin::DataStreamByMetaClass,...
#define SWIFT_MISC_DECLARE_USING_MIXIN_DBUS(DERIVED,...)
When a derived class and a base class both inherit from mixin::DBusByTuple, the derived class uses th...
#define SWIFT_MISC_DECLARE_USING_MIXIN_INDEX(DERIVED)
When a derived class and a base class both inherit from mixin::Index, the derived class uses this mac...
#define SWIFT_MISC_DECLARE_USING_MIXIN_JSON(DERIVED)
When a derived class and a base class both inherit from mixin::JsonByTuple, the derived class uses th...
#define SWIFT_MISC_DECLARE_USING_MIXIN_STRING(DERIVED)
When a derived class and a base class both inherit from mixin::String, the derived class uses this ma...
void registerMetadata()
Register all relevant metadata in Misc.
#define SWIFT_MISC_EXPORT
Export a class or function from the library.