NumCpp
2.18.0
A Templatized Header Only C++ Implementation of the Python NumPy Library
Loading...
Searching...
No Matches
sph2cart.hpp
Go to the documentation of this file.
1
28
#pragma once
29
30
#include "
NumCpp/Coordinates/Cartesian.hpp
"
31
#include "
NumCpp/Coordinates/ReferenceFrames/AER.hpp
"
32
33
namespace
nc::coordinates::transforms
34
{
41
[[nodiscard]]
inline
Cartesian
sph2cart
(
const
reference_frames::AER
& aer)
noexcept
42
{
43
const
auto
rCosEl = aer.range * std::cos(aer.el);
44
const
auto
x = rCosEl * std::cos(aer.az);
45
const
auto
y = rCosEl * std::sin(aer.az);
46
const
auto
z = aer.range * std::sin(aer.el);
47
return
Cartesian
{ x, y, z };
48
}
49
}
// namespace nc::coordinates::transforms
AER.hpp
Cartesian.hpp
nc::coordinates::Cartesian
Cartensian coordinates.
Definition
Cartesian.hpp:44
nc::coordinates::reference_frames::AER
Az, El, Range coordinates.
Definition
AER.hpp:43
nc::coordinates::transforms
Definition
AERtoECEF.hpp:38
nc::coordinates::transforms::sph2cart
Cartesian sph2cart(const reference_frames::AER &aer) noexcept
Converts spherical coordinates to cartesian coordinates.
Definition
sph2cart.hpp:41
include
NumCpp
Coordinates
Transforms
sph2cart.hpp
Generated by
1.15.0