NumCpp  2.14.0
A Templatized Header Only C++ Implementation of the Python NumPy Library
All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
NEDtoAER.hpp
Go to the documentation of this file.
1
28#pragma once
29
30#include <cmath>
31
35
37{
47 {
48 const auto hypotXy = std::hypot(target.x, target.y);
49 const auto el = -std::atan2(target.z, hypotXy);
50 const auto az = wrap2Pi(std::atan2(target.y, target.x));
51 const auto r = std::hypot(target.x, target.y);
52 const auto range = std::hypot(r, target.z);
53 return { az, el, range };
54 }
55} // namespace nc::coordinates::transforms
Az, El, Range coordinates.
Definition AER.hpp:42
North east down coordinates.
Definition NED.hpp:40
Definition AERtoECEF.hpp:38
reference_frames::AER NEDtoAER(const reference_frames::NED &target) noexcept
Converts the Cartesian XYZ (NED) coordinates to 2d speherical inertial coordinates....
Definition NEDtoAER.hpp:46
double wrap2Pi(dtype inAngle) noexcept
Wrap the input angle to [0, 2*pi].
Definition wrap2Pi.hpp:43
NdArray< dtype > arange(dtype inStart, dtype inStop, dtype inStep=1)
Definition arange.hpp:59