Go to the documentation of this file.
25 #include "spdlog/fmt/ostr.h"
26 #include "spdlog/spdlog.h"
45 #define AD_MAP_POINT_ENUHEADING_THROWS_EXCEPTION 1
47 #if SAFE_DATATYPES_EXPLICIT_CONVERSION
51 #define _AD_MAP_POINT_ENUHEADING_EXPLICIT_CONVERSION_ explicit
56 #define _AD_MAP_POINT_ENUHEADING_EXPLICIT_CONVERSION_
91 : mENUHeading(std::numeric_limits<double>::quiet_NaN())
101 : mENUHeading(iENUHeading)
172 return (mENUHeading > other.mENUHeading) &&
operator!=(other);
188 return (mENUHeading < other.mENUHeading) &&
operator!=(other);
204 return ((mENUHeading > other.mENUHeading) ||
operator==(other));
220 return ((mENUHeading < other.mENUHeading) ||
operator==(other));
237 ENUHeading const result(mENUHeading + other.mENUHeading);
256 mENUHeading += other.mENUHeading;
275 ENUHeading const result(mENUHeading - other.mENUHeading);
294 mENUHeading -= other.mENUHeading;
312 ENUHeading const result(mENUHeading * scalar);
330 ENUHeading const result(
operator/(scalarENUHeading));
350 double const result = mENUHeading / other.mENUHeading;
390 auto const valueClass = std::fpclassify(mENUHeading);
391 return ((valueClass == FP_NORMAL) || (valueClass == FP_ZERO)) && (
cMinValue <= mENUHeading)
405 spdlog::info(
"ensureValid(::ad::map::point::ENUHeading)>> {} value out of range", *
this);
406 #if (AD_MAP_POINT_ENUHEADING_THROWS_EXCEPTION == 1)
407 throw std::out_of_range(
"ENUHeading value out of range");
423 spdlog::info(
"ensureValid(::ad::map::point::ENUHeading)>> {} value is zero", *
this);
424 #if (AD_MAP_POINT_ENUHEADING_THROWS_EXCEPTION == 1)
425 throw std::out_of_range(
"ENUHeading value is zero");
477 return value.operator*(other);
488 inline ::ad::map::point::ENUHeading
fabs(const ::ad::map::point::ENUHeading other)
508 static inline ::ad::map::point::ENUHeading
lowest()
510 return ::ad::map::point::ENUHeading::getMin();
515 static inline ::ad::map::point::ENUHeading
max()
517 return ::ad::map::point::ENUHeading::getMax();
523 static inline ::ad::map::point::ENUHeading
epsilon()
525 return ::ad::map::point::ENUHeading::getPrecision();
534 #ifndef GEN_GUARD_AD_MAP_POINT_ENUHEADING
535 #define GEN_GUARD_AD_MAP_POINT_ENUHEADING
562 return os << double(_value);
575 return to_string(
static_cast<double>(value));
578 #endif // GEN_GUARD_AD_MAP_POINT_ENUHEADING
namespace ad
Definition: GeometryStoreItem.hpp:28
static ENUHeading getMax()
get maximum valid ENUHeading (i.e. cMaxValue)
Definition: ENUHeading.hpp:441
static const double cMinValue
constant defining the minimum valid ENUHeading value (used in isValid())
Definition: ENUHeading.hpp:71
static ENUHeading getMin()
get minimum valid ENUHeading (i.e. cMinValue)
Definition: ENUHeading.hpp:433
std::ostream & operator<<(std::ostream &os, Altitude const &_value)
standard ostream operator
Definition: Altitude.hpp:562
bool operator>(const ENUHeading &other) const
standard comparison operator
Definition: ENUHeading.hpp:168
inline ::ad::map::point::ENUHeading operator*(const double &other, ::ad::map::point::ENUHeading const &value)
standard arithmetic operator
Definition: ENUHeading.hpp:475
static inline ::ad::map::point::ENUHeading epsilon()
Definition: ENUHeading.hpp:523
double operator/(const ENUHeading &other) const
standard arithmetic operator
Definition: ENUHeading.hpp:346
ENUHeading & operator+=(const ENUHeading &other)
standard arithmetic operator
Definition: ENUHeading.hpp:252
static const double cMaxValue
constant defining the maximum valid ENUHeading value (used in isValid())
Definition: ENUHeading.hpp:76
inline ::ad::map::point::Longitude fabs(const ::ad::map::point::Longitude other)
overload of the std::fabs for Longitude
Definition: Longitude.hpp:488
std::string to_string(::ad::map::access::GeometryStoreItem const &value)
overload of the std::to_string for GeometryStoreItem
Definition: GeometryStoreItem.hpp:183
ENUHeading & operator=(const ENUHeading &other)=default
standard assignment operator
DataType ENUHeading.
Definition: ENUHeading.hpp:65
ENUHeading()
default constructor
Definition: ENUHeading.hpp:90
bool operator<=(const ENUHeading &other) const
standard comparison operator
Definition: ENUHeading.hpp:216
ENUHeading operator/(const double &scalar) const
standard arithmetic operator
Definition: ENUHeading.hpp:327
static inline ::ad::map::point::ENUHeading lowest()
Definition: ENUHeading.hpp:508
ENUHeading operator-=(const ENUHeading &other)
standard arithmetic operator
Definition: ENUHeading.hpp:290
ENUHeading operator*(const double &scalar) const
standard arithmetic operator
Definition: ENUHeading.hpp:309
bool isValid() const
Definition: ENUHeading.hpp:388
#define _AD_MAP_POINT_ENUHEADING_EXPLICIT_CONVERSION_
Enable/Disable explicit conversion. Currently set to "implicit conversion allowed".
Definition: ENUHeading.hpp:56
ENUHeading operator-(const ENUHeading &other) const
standard arithmetic operator
Definition: ENUHeading.hpp:271
static const double cPrecisionValue
constant defining the assumed ENUHeading value accuracy (used in comparison operator==(),...
Definition: ENUHeading.hpp:82
static inline ::ad::map::point::ENUHeading max()
Definition: ENUHeading.hpp:515
bool operator>=(const ENUHeading &other) const
standard comparison operator
Definition: ENUHeading.hpp:200
bool operator==(const ENUHeading &other) const
standard comparison operator
Definition: ENUHeading.hpp:140
ENUHeading operator+(const ENUHeading &other) const
standard arithmetic operator
Definition: ENUHeading.hpp:233
void ensureValidNonZero() const
ensure that the ENUHeading is valid and non zero
Definition: ENUHeading.hpp:418
static ENUHeading getPrecision()
get assumed accuracy of ENUHeading (i.e. cPrecisionValue)
Definition: ENUHeading.hpp:449
void ensureValid() const
ensure that the ENUHeading is valid
Definition: ENUHeading.hpp:401
bool operator<(const ENUHeading &other) const
standard comparison operator
Definition: ENUHeading.hpp:184
_AD_MAP_POINT_ENUHEADING_EXPLICIT_CONVERSION_ ENUHeading(double const iENUHeading)
standard constructor
Definition: ENUHeading.hpp:100
ENUHeading operator-() const
standard arithmetic operator
Definition: ENUHeading.hpp:362
inline ::ad::map::point::Altitude fabs(const ::ad::map::point::Altitude other)
overload of the std::fabs for Altitude
Definition: Altitude.hpp:490
bool operator!=(const ENUHeading &other) const
standard comparison operator
Definition: ENUHeading.hpp:154