NumCpp  2.11.0
A Templatized Header Only C++ Implementation of the Python NumPy Library
ENU.hpp
Go to the documentation of this file.
1 #pragma once
29 
30 #include <iostream>
31 
33 
35 {
39  class ENU final : public Cartesian
40  {
41  public:
43 
48  constexpr ENU(const Cartesian& cartesian) noexcept :
49  Cartesian(cartesian)
50  {
51  }
52 
59  // NOTLINTNEXTLINE(bugprone-easily-swappable-parameters)
60  constexpr ENU(double east, double north, double up) noexcept :
62  {
63  }
64 
70  [[nodiscard]] double east() const noexcept
71  {
72  return x;
73  }
74 
80  void setEast(double east) noexcept
81  {
82  x = east;
83  }
84 
90  [[nodiscard]] double north() const noexcept
91  {
92  return y;
93  }
94 
100  void setNorth(double north) noexcept
101  {
102  y = north;
103  }
104 
110  [[nodiscard]] double up() const noexcept
111  {
112  return z;
113  }
114 
120  void setUp(double up) noexcept
121  {
122  z = up;
123  }
124  };
125 
132  inline std::ostream& operator<<(std::ostream& os, const ENU& point)
133  {
134  os << "ENU(east=" << point.east() << ", north=" << point.north() << ", up=" << point.up() << ")\n";
135  return os;
136  }
137 } // namespace nc::coordinates::reference_frames
Cartensian coordinates.
Definition: Cartesian.hpp:45
double z
Definition: Cartesian.hpp:49
double y
Definition: Cartesian.hpp:48
Cartesian() noexcept=default
Default Constructor.
double x
Definition: Cartesian.hpp:47
East North Up coordinates.
Definition: ENU.hpp:40
double north() const noexcept
north getter
Definition: ENU.hpp:90
double up() const noexcept
up getter
Definition: ENU.hpp:110
double east() const noexcept
east getter
Definition: ENU.hpp:70
void setUp(double up) noexcept
up setter
Definition: ENU.hpp:120
void setEast(double east) noexcept
east setter
Definition: ENU.hpp:80
constexpr ENU(const Cartesian &cartesian) noexcept
Constructor.
Definition: ENU.hpp:48
Cartesian() noexcept=default
Default Constructor.
constexpr ENU(double east, double north, double up) noexcept
Constructor.
Definition: ENU.hpp:60
void setNorth(double north) noexcept
north setter
Definition: ENU.hpp:100
Definition: AER.hpp:36
std::ostream & operator<<(std::ostream &os, const AER &point)
Stream operator.
Definition: AER.hpp:97