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
NEDtoECEF.hpp
Go to the documentation of this file.
1
28#pragma once
29
30#include <cmath>
31
39#include "NumCpp/NdArray.hpp"
40
42{
55 {
57
58 const auto sinLat = std::sin(referencePointLLA.latitude);
59 const auto cosLat = std::cos(referencePointLLA.latitude);
60 const auto sinLon = std::sin(referencePointLLA.longitude);
61 const auto cosLon = std::cos(referencePointLLA.longitude);
62
64 rotationMatrix(0, 0) = -sinLat * cosLon;
65 rotationMatrix(1, 0) = -sinLat * sinLon;
66 rotationMatrix(2, 0) = cosLat;
67 rotationMatrix(0, 1) = -sinLon;
68 rotationMatrix(1, 1) = cosLon;
69 rotationMatrix(2, 1) = 0.;
70 rotationMatrix(0, 2) = -cosLat * cosLon;
71 rotationMatrix(1, 2) = -cosLat * sinLon;
72 rotationMatrix(2, 2) = -sinLat;
73
74 auto targetVec = NdArray<double>(3, 1);
75 targetVec[0] = target.north();
76 targetVec[1] = target.east();
77 targetVec[2] = target.down();
78
83
85 return { targetECEFVec[0], targetECEFVec[1], targetECEFVec[2] };
86 }
87
103} // namespace nc::coordinates::transforms
Holds 1D and 2D arrays, the main work horse of the NumCpp library.
Definition NdArrayCore.hpp:139
ECEF coordinates.
Definition ECEF.hpp:40
Geodetic coordinates.
Definition LLA.hpp:40
North east down coordinates.
Definition NED.hpp:40
Definition AERtoECEF.hpp:38
reference_frames::ECEF LLAtoECEF(const reference_frames::LLA &point) noexcept
Converts the LLA coordinates to ECEF https://en.wikipedia.org/wiki/Geographic_coordinate_conversion#F...
Definition LLAtoECEF.hpp:46
reference_frames::ECEF NEDtoECEF(const reference_frames::NED &target, const reference_frames::ECEF &referencePoint) noexcept
Converts the NED coordinates to ECEF https://apps.dtic.mil/sti/pdfs/AD1170763.pdf Figure 11 https://a...
Definition NEDtoECEF.hpp:53
reference_frames::LLA ECEFtoLLA(const reference_frames::ECEF &ecef, double tol=1e-8) noexcept
Converts ECEF coordinates to LLA https://en.wikipedia.org/wiki/Geographic_coordinate_conversion#From_...
Definition ECEFtoLLA.hpp:49
NdArray< dtype > dot(const NdArray< dtype > &inArray1, const NdArray< dtype > &inArray2)
Definition dot.hpp:47
NdArray< dtype > arange(dtype inStart, dtype inStop, dtype inStep=1)
Definition arange.hpp:59