NumCpp  2.11.0
A Templatized Header Only C++ Implementation of the Python NumPy Library
AER.hpp
Go to the documentation of this file.
1 
29 #pragma once
30 
31 #include <iostream>
32 
34 
36 {
41  class AER
42  {
43  public:
44  double az{ 0. }; // radians
45  double el{ 0. }; // radians
46  double range{ 0. }; // meters
47 
51  AER() = default;
52 
59  // NOTLINTNEXTLINE(bugprone-easily-swappable-parameters)
60  constexpr AER(double inAz, double inEl, double inRange = 1.) noexcept :
61  az(inAz),
62  el(inEl),
63  range(inRange)
64  {
65  }
66 
73  bool operator==(const AER& other) const noexcept
74  {
75  return utils::essentiallyEqual(az, other.az) && utils::essentiallyEqual(el, other.el) &&
76  utils::essentiallyEqual(range, other.range);
77  }
78 
85  bool operator!=(const AER& other) const noexcept
86  {
87  return !(*this == other);
88  }
89  };
90 
97  inline std::ostream& operator<<(std::ostream& os, const AER& point)
98  {
99  os << "AER(az=" << point.az << ", el=" << point.el << ", range=" << point.range << ")\n";
100  return os;
101  }
102 
103 } // namespace nc::coordinates::reference_frames
Az, El, Range coordinates.
Definition: AER.hpp:42
constexpr AER(double inAz, double inEl, double inRange=1.) noexcept
Constructor.
Definition: AER.hpp:60
double el
Definition: AER.hpp:45
bool operator!=(const AER &other) const noexcept
Non-Equality Operator.
Definition: AER.hpp:85
AER()=default
Default Constructor.
double az
Definition: AER.hpp:44
bool operator==(const AER &other) const noexcept
Non-Equality Operator.
Definition: AER.hpp:73
double range
Definition: AER.hpp:46
Definition: AER.hpp:36
std::ostream & operator<<(std::ostream &os, const AER &point)
Stream operator.
Definition: AER.hpp:97
bool essentiallyEqual(dtype inValue1, dtype inValue2) noexcept
Definition: essentiallyEqual.hpp:48