From bcd073e8ffb250fde3c2bf3a164d4a5e5e6e8304 Mon Sep 17 00:00:00 2001 From: PepMS <jmarti@iri.upc.edu> Date: Fri, 3 Apr 2020 14:34:30 +0200 Subject: [PATCH] [utils] transformations --- src/utils/transformations.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/src/utils/transformations.cpp b/src/utils/transformations.cpp index fa8c0e2..c12f2db 100644 --- a/src/utils/transformations.cpp +++ b/src/utils/transformations.cpp @@ -2,6 +2,9 @@ using namespace GNSSUtils; +namespace GNSSUtils +{ + Eigen::Vector3d ecefToLatLonAlt(const Eigen::Vector3d& _ecef) { Eigen::Vector3d pos; @@ -10,10 +13,10 @@ Eigen::Vector3d ecefToLatLonAlt(const Eigen::Vector3d& _ecef) return pos; } -Eigen::Vector3d latLonAltToEcef(const Eigen::Vector3d& _pos) +Eigen::Vector3d latLonAltToEcef(const Eigen::Vector3d& _latlon) { Eigen::Vector3d ecef; - pos2ecef(_pos.data(), ecef.data()); + pos2ecef(_latlon.data(), ecef.data()); return ecef; } @@ -144,4 +147,6 @@ void computeEnuEcefFromLatLonAlt(const Eigen::Vector3d& _ENU_latlonalt, Eigen::Vector3d t_ECEF_ENU = latLonAltToEcef(_ENU_latlonalt); t_ENU_ECEF = -R_ENU_ECEF * t_ECEF_ENU; -} \ No newline at end of file +} + +} // namespace GNSSUtils \ No newline at end of file -- GitLab