52 const auto targetENU =
ECEFtoENU(target, referencePoint);
53 const auto targetENUnormalizedCart =
55 const auto& east = targetENUnormalizedCart.
x;
56 const auto& north = targetENUnormalizedCart.y;
57 const auto& up = targetENUnormalizedCart.z;
59 const auto referencePointECEF =
LLAtoECEF(referencePoint);
60 const auto range =
norm(target - referencePointECEF);
62 return {
wrap2Pi(std::atan2(east, north)), std::asin(up), range };
Cartensian coordinates.
Definition: Cartesian.hpp:45
double x
Definition: Cartesian.hpp:47
Az, El, Range coordinates.
Definition: AER.hpp:42
ECEF coordinates.
Definition: ECEF.hpp:40
Geodetic coordinates.
Definition: LLA.hpp:40
double norm(const Cartesian &vec) noexcept
Vector norm.
Definition: Cartesian.hpp:295
Cartesian normalize(const Cartesian &vec) noexcept
normalize the input vector
Definition: Cartesian.hpp:306
double wrap2Pi(dtype inAngle) noexcept
Wrap the input angle to [0, 2*pi].
Definition: wrap2Pi.hpp:43