52 const auto sinLat =
std::sin(referencePoint.latitude);
53 const auto cosLat =
std::cos(referencePoint.latitude);
54 const auto sinLon =
std::sin(referencePoint.longitude);
55 const auto cosLon =
std::cos(referencePoint.longitude);
57 const auto referencePointECEF =
LLAtoECEF(referencePoint);
59 const auto x = target.x - referencePointECEF.x;
60 const auto y = target.y - referencePointECEF.y;
61 const auto z = target.z - referencePointECEF.z;
63 return { -sinLon * x + cosLon * y,
64 -sinLat * cosLon * x - sinLat * sinLon * y + cosLat * z,
65 cosLat * cosLon * x + cosLat * sinLon * y + sinLat * z };
ECEF coordinates.
Definition: ECEF.hpp:40
East North Up coordinates.
Definition: ENU.hpp:40
Geodetic coordinates.
Definition: LLA.hpp:40
auto sin(dtype inValue) noexcept
Definition: sin.hpp:49
auto cos(dtype inValue) noexcept
Definition: cos.hpp:49