diff --git a/CMakeLists.txt b/CMakeLists.txt index 83308dba04ebf89da737631e192b2bfd2417a671..db9516005b5509776b09ccf178d2c9b2f8d78d72 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -55,7 +55,7 @@ SET(SOURCES src/utils/sat_position.cpp src/observations.cpp src/navigation.cpp - src/TDCP.cpp + src/tdcp.cpp src/ublox_raw.cpp) SET(RTKLIB_SRC @@ -96,7 +96,7 @@ SET(HEADERS include/gnss_utils/utils/sat_position.h include/gnss_utils/observations.h include/gnss_utils/navigation.h - include/gnss_utils/TDCP.h + include/gnss_utils/tdcp.h include/gnss_utils/ublox_raw.h ${RTKLIB_SRC_DIR}/rtklib.h) diff --git a/include/gnss_utils/navigation.h b/include/gnss_utils/navigation.h index 20f65a0ffb1e111a5ba68f5a1a4f22693e73b426..2fc13a71c0eb45a88b4570c4be33db1074b12c7b 100644 --- a/include/gnss_utils/navigation.h +++ b/include/gnss_utils/navigation.h @@ -1,5 +1,5 @@ -#ifndef NAVIGATION_H -#define NAVIGATION_H +#ifndef INCLUDE_GNSS_UTILS_NAVIGATION_H_ +#define INCLUDE_GNSS_UTILS_NAVIGATION_H_ #include <vector> #include <iostream> @@ -9,7 +9,7 @@ extern "C" { #include "rtklib.h" } -namespace GNSSUtils +namespace GnssUtils { class Navigation; typedef std::shared_ptr<Navigation> NavigationPtr; @@ -361,5 +361,5 @@ inline void Navigation::freeNavArrays(nav_t& nav) freeFcb(nav); } -} // namespace GNSSUtils -#endif +} // namespace GnssUtils +#endif // INCLUDE_GNSS_UTILS_NAVIGATION_H_ diff --git a/include/gnss_utils/observations.h b/include/gnss_utils/observations.h index 7fb34baa11663cccc738b0a127c63a3b9058203e..fd4a9214460dc1f49a8dde2949e8adffa6aee281 100644 --- a/include/gnss_utils/observations.h +++ b/include/gnss_utils/observations.h @@ -13,7 +13,7 @@ extern "C" { #include "rtklib.h" } -namespace GNSSUtils +namespace GnssUtils { class Observations; typedef std::shared_ptr<Observations> ObservationsPtr; @@ -131,5 +131,5 @@ inline bool Observations::hasSatellite(const unsigned char& i) const return sat_2_idx_.count(i) != 0; } -} // namespace GNSSUtils +} // namespace GnssUtils #endif // INCLUDE_GNSS_UTILS_OBSERVATIONS_H_ diff --git a/include/gnss_utils/TDCP.h b/include/gnss_utils/tdcp.h similarity index 84% rename from include/gnss_utils/TDCP.h rename to include/gnss_utils/tdcp.h index 00f70f065ee7d76372e8f72848051bcca6e8a994..6d64e885bec90541f3fd4f3cc29fcc605576f277 100644 --- a/include/gnss_utils/TDCP.h +++ b/include/gnss_utils/tdcp.h @@ -1,5 +1,5 @@ /* - * TDCP.h + * tdcp.h * * Created on: Dec 4, 2019 * Author: jvallve @@ -16,9 +16,9 @@ #include "gnss_utils/observations.h" #include "gnss_utils/navigation.h" -namespace GNSSUtils +namespace GnssUtils { -struct TDCPParams +struct TdcpParams { int min_common_sats; int raim_n; @@ -36,7 +36,7 @@ struct TDCPParams double time_window; }; -bool TDCP(const Observations& obs_r, +bool Tdcp(const Observations& obs_r, Navigation& nav_r, const Observations& obs_k, const Navigation& nav_k, @@ -44,10 +44,10 @@ bool TDCP(const Observations& obs_r, Eigen::Matrix4d& cov_d, double& residual, std::set<int>& discarded_sats, - const TDCPParams& sd_opt, + const TdcpParams& sd_opt, const prcopt_t& opt); -bool TDCP(const Observations& obs_r, +bool Tdcp(const Observations& obs_r, const Navigation& nav_r, const Eigen::Vector3d& x_r, const Observations& obs_k, @@ -56,10 +56,10 @@ bool TDCP(const Observations& obs_r, Eigen::Matrix4d& cov_d, double& residual, std::set<int>& discarded_sats, - const TDCPParams& sd_opt, + const TdcpParams& sd_opt, const prcopt_t& opt); -bool TDCP(const Observations& common_obs_r, +bool Tdcp(const Observations& common_obs_r, const Navigation& nav_r, const std::map<int, Eigen::Vector3d>& common_sats_pos_r, const Eigen::Vector3d& x_r, @@ -70,7 +70,7 @@ bool TDCP(const Observations& common_obs_r, Eigen::Matrix4d& cov_d, double& residual, std::set<int>& discarded_sats, - const TDCPParams& sd_opt); + const TdcpParams& sd_opt); void filterCommonSatellites(Observations& common_obs_r, std::map<int, Eigen::Vector3d>& common_sats_pos_r, @@ -78,9 +78,9 @@ void filterCommonSatellites(Observations& common_obs_r, std::map<int, Eigen::Vector3d>& common_sats_pos_k, std::set<int>& discarded_sats, const Eigen::Vector3d& x_r, - const TDCPParams& sd_params, + const TdcpParams& sd_params, const prcopt_t& opt); -} // namespace GNSSUtils +} // namespace GnssUtils -#endif /* INCLUDE_GNSS_UTILS_TDCP_H_ */ +#endif /* INCLUDE_GNSS_UTILS_Tdcp_H_ */ diff --git a/include/gnss_utils/ublox_raw.h b/include/gnss_utils/ublox_raw.h index 1c36ba27ab5b7eb107ee976c4c0061c4c04fae16..ecee80c79c836464b482ec686b264e7c4d87235c 100644 --- a/include/gnss_utils/ublox_raw.h +++ b/include/gnss_utils/ublox_raw.h @@ -1,10 +1,10 @@ -#ifndef UBLOX_RAW_H -#define UBLOX_RAW_H +#ifndef INCLUDE_GNSS_UTILS_UBLOX_RAW_H_ +#define INCLUDE_GNSS_UTILS_UBLOX_RAW_H_ #include "gnss_utils/observations.h" #include "gnss_utils/navigation.h" -namespace GNSSUtils +namespace GnssUtils { enum RawDataType : int { @@ -27,9 +27,9 @@ public: ~UBloxRaw(); RawDataType addDataStream(const std::vector<u_int8_t>& data_stream); - + const Observations& getObservations(); - const Navigation& getNavigation(); + const Navigation& getNavigation(); RawDataType getRawDataType() const; @@ -44,12 +44,12 @@ private: void updateObservations(); }; -inline const GNSSUtils::Observations& UBloxRaw::getObservations() +inline const GnssUtils::Observations& UBloxRaw::getObservations() { return obs_; } -inline const GNSSUtils::Navigation& UBloxRaw::getNavigation() +inline const GnssUtils::Navigation& UBloxRaw::getNavigation() { return nav_; } @@ -59,6 +59,6 @@ inline RawDataType UBloxRaw::getRawDataType() const return raw_data_type_; } -} // namespace GNSSUtils +} // namespace GnssUtils -#endif +#endif // INCLUDE_GNSS_UTILS_UBLOX_RAW_H_ diff --git a/include/gnss_utils/utils/rcv_position.h b/include/gnss_utils/utils/rcv_position.h index 55fbd80212233df121e339b21769ccb245597a95..77ec4e77ef3e8d3436601341b3e8868d6018433b 100644 --- a/include/gnss_utils/utils/rcv_position.h +++ b/include/gnss_utils/utils/rcv_position.h @@ -20,7 +20,7 @@ extern "C" { #include "rtklib.h" } -namespace GNSSUtils +namespace GnssUtils { struct ComputePosOutput { @@ -64,5 +64,5 @@ int estposOwn(const obsd_t* obs, int* vsat, double* resp, char* msg); -} // namespace GNSSUtils +} // namespace GnssUtils #endif // INCLUDE_GNSS_UTILS_UTILS_RCV_POSITION_H_ \ No newline at end of file diff --git a/include/gnss_utils/utils/sat_position.h b/include/gnss_utils/utils/sat_position.h index 2edb56c3a751b373a1ed26ddac76fc96250e2648..376d406a2a1f13b32ce7122d293df408e98085d9 100644 --- a/include/gnss_utils/utils/sat_position.h +++ b/include/gnss_utils/utils/sat_position.h @@ -20,7 +20,7 @@ extern "C" { #include "rtklib.h" } -namespace GNSSUtils +namespace GnssUtils { double computeSatElevation(const Eigen::Vector3d& receiver_ecef, const Eigen::Vector3d& sat_ecef); @@ -28,5 +28,5 @@ void computeSatellitesPositions(const Observations& obs, const Navigation& nav, const prcopt_t& opt, std::map<int, Eigen::Vector3d>& sats_pos); -} // namespace GNSSUtils +} // namespace GnssUtils #endif // INCLUDE_GNSS_UTILS_UTILS_SAT_POSITION_H_ \ No newline at end of file diff --git a/include/gnss_utils/utils/transformations.h b/include/gnss_utils/utils/transformations.h index 494d5ece16e83e8c870655e947588f4ceb782ec3..ebed329289ac0d58e6555347a71634565dc108e9 100644 --- a/include/gnss_utils/utils/transformations.h +++ b/include/gnss_utils/utils/transformations.h @@ -16,7 +16,7 @@ extern "C" { #include "rtklib.h" } -namespace GNSSUtils +namespace GnssUtils { Eigen::Vector3d ecefToLatLonAlt(const Eigen::Vector3d& _ecef); Eigen::Vector3d latLonAltToEcef(const Eigen::Vector3d& _latlon); @@ -30,5 +30,5 @@ void computeEnuEcefFromLatLonAlt(const Eigen::Vector3d& _ENU_latlonalt, Eigen::Matrix3d& R_ENU_ECEF, Eigen::Vector3d& t_ENU_ECEF); -} // namespace GNSSUtils +} // namespace GnssUtils #endif // INCLUDE_GNSS_UTILS_UTILS_TRANSFORMATIONS_H_ \ No newline at end of file diff --git a/include/gnss_utils/utils/utils.h b/include/gnss_utils/utils/utils.h index faa390ae290e2281cdab9a37f60633414dae048a..4b73a6ed1a870a03684a51fa4c71503dd3c24147 100644 --- a/include/gnss_utils/utils/utils.h +++ b/include/gnss_utils/utils/utils.h @@ -1,5 +1,5 @@ -#ifndef UTILS_H -#define UTILS_H +#ifndef INCLUDE_GNSS_UTILS_UTILS_UTILS_H_ +#define INCLUDE_GNSS_UTILS_UTILS_UTILS_H_ #include <vector> #include <iostream> @@ -7,13 +7,13 @@ #include <string> #define ARRAY_SIZE(arr) sizeof(arr) / sizeof(arr[0]) -#define GNSSUTILS_MSG "--GNSSUtils--" +#define GNSSUTILS_MSG "--GnssUtils--" extern "C" { #include "rtklib.h" } -namespace GNSSUtils +namespace GnssUtils { void print(std::string& _msg); void printArray(std::string _name, int* _array, int size); @@ -40,6 +40,6 @@ bool equalTime(const gtime_t& time1, const gtime_t& time2); bool equalObservations(const obsd_t& obs1, const obsd_t& obs2); bool equalObservations(const obs_t& obs1, const obs_t& obs2); -} // namespace GNSSUtils +} // namespace GnssUtils -#endif \ No newline at end of file +#endif // INCLUDE_GNSS_UTILS_UTILS_UTILS_H_ \ No newline at end of file diff --git a/src/examples/gnss_utils_test.cpp b/src/examples/gnss_utils_test.cpp index 10520e09738af7396ba748bfea0b75bc6e6771be..1a59e2d85c7b3b41404f808283866c07703ec8a1 100644 --- a/src/examples/gnss_utils_test.cpp +++ b/src/examples/gnss_utils_test.cpp @@ -12,7 +12,7 @@ extern "C" { #include "../deps/RTKLIB/src/rinex.c" } -using namespace GNSSUtils; +using namespace GnssUtils; int main(int argc, char* argv[]) { diff --git a/src/navigation.cpp b/src/navigation.cpp index 398d0a86f275b64f4d469a2bce0ddbdf3dba6172..66b861b71dc5587eb3bbb80b2dee0f43084ad40b 100644 --- a/src/navigation.cpp +++ b/src/navigation.cpp @@ -1,6 +1,6 @@ #include "gnss_utils/navigation.h" -using namespace GNSSUtils; +using namespace GnssUtils; Navigation::Navigation() { diff --git a/src/observations.cpp b/src/observations.cpp index e68fb8d216b9294de2d22232fe92cfb5d4a70ec7..64fa7508b2075720f81234e93b3e8b45d7e5496d 100644 --- a/src/observations.cpp +++ b/src/observations.cpp @@ -1,6 +1,6 @@ #include "gnss_utils/observations.h" -using namespace GNSSUtils; +using namespace GnssUtils; Observations::Observations() { @@ -159,7 +159,7 @@ void Observations::removeObservationBySat(const int& _sat) void Observations::print(obsd_t& _obs) { std::string msg = "Observation of satellite #" + std::to_string(_obs.sat); - GNSSUtils::print(msg); + GnssUtils::print(msg); std::cout << "Time [s]: " << _obs.time.time << " + " << _obs.time.sec << "\n"; printArray("SNR: ", _obs.SNR, ARRAY_SIZE(_obs.SNR)); printArray("LLI: ", _obs.LLI, ARRAY_SIZE(_obs.LLI)); diff --git a/src/TDCP.cpp b/src/tdcp.cpp similarity index 92% rename from src/TDCP.cpp rename to src/tdcp.cpp index 66e5a10997152c4544c7b6d1e5eaefa2cfa6028f..b38f9e26bd0924f693d045437f3477245af4810d 100644 --- a/src/TDCP.cpp +++ b/src/tdcp.cpp @@ -1,15 +1,15 @@ /* - * TDCP.cpp + * tdcp.cpp * * Created on: Dec 4, 2019 * Author: jvallve */ -#include "../include/gnss_utils/TDCP.h" +#include "gnss_utils/tdcp.h" -namespace GNSSUtils +namespace GnssUtils { -bool TDCP(const Observations& obs_r, +bool Tdcp(const Observations& obs_r, Navigation& nav_r, const Observations& obs_k, const Navigation& nav_k, @@ -17,11 +17,11 @@ bool TDCP(const Observations& obs_r, Eigen::Matrix4d& cov_d, double& residual, std::set<int>& discarded_sats, - const TDCPParams& sd_params, + const TdcpParams& sd_params, const prcopt_t& opt) { // COMPUTE SINGLE DIFFERENCES - return TDCP(obs_r, + return Tdcp(obs_r, nav_r, computePos(obs_r, nav_r, opt).pos, obs_k, @@ -34,7 +34,7 @@ bool TDCP(const Observations& obs_r, opt); } -bool TDCP(const Observations& obs_r, +bool Tdcp(const Observations& obs_r, const Navigation& nav_r, const Eigen::Vector3d& x_r, const Observations& obs_k, @@ -43,7 +43,7 @@ bool TDCP(const Observations& obs_r, Eigen::Matrix4d& cov_d, double& residual, std::set<int>& discarded_sats, - const TDCPParams& sd_params, + const TdcpParams& sd_params, const prcopt_t& opt) { // FIND COMMON SATELLITES OBSERVATIONS @@ -61,7 +61,7 @@ bool TDCP(const Observations& obs_r, common_obs_r, common_sats_pos_r, common_obs_k, common_sats_pos_k, discarded_sats, x_r, sd_params, opt); // COMPUTE SINGLE DIFFERENCES - return TDCP(common_obs_r, + return Tdcp(common_obs_r, nav_r, common_sats_pos_r, x_r, @@ -75,7 +75,7 @@ bool TDCP(const Observations& obs_r, sd_params); } -bool TDCP(const Observations& common_obs_r, +bool Tdcp(const Observations& common_obs_r, const Navigation& nav_r, const std::map<int, Eigen::Vector3d>& common_sats_pos_r, const Eigen::Vector3d& x_r, @@ -86,7 +86,7 @@ bool TDCP(const Observations& common_obs_r, Eigen::Matrix4d& cov_d, double& residual, std::set<int>& discarded_sats, - const TDCPParams& sd_params) + const TdcpParams& sd_params) { assert(common_obs_r.size() == common_obs_k.size()); assert(common_obs_r.size() == common_sats_pos_r.size()); @@ -101,8 +101,8 @@ bool TDCP(const Observations& common_obs_r, if (n_common_sats < required_n_sats) { #if GNSS_UTILS_TDCP_DEBUG == 1 - printf("TDCP: NOT ENOUGH COMMON SATS"); - printf("TDCP: %i common sats available, %i sats are REQUIRED. [ SKIPPING TDCP ]", n_common_sats, required_n_sats); + printf("Tdcp: NOT ENOUGH COMMON SATS"); + printf("Tdcp: %i common sats available, %i sats are REQUIRED. [ SKIPPING Tdcp ]", n_common_sats, required_n_sats); #endif return false; } @@ -263,7 +263,7 @@ bool TDCP(const Observations& common_obs_r, // wrong solution if (d.array().isNaN().any()) { - std::cout << "TDCP: LSM DID NOT WORK. NAN values appeared. ABORTING!!" << std::endl; + std::cout << "Tdcp: LSM DID NOT WORK. NAN values appeared. ABORTING!!" << std::endl; return false; } @@ -271,19 +271,19 @@ bool TDCP(const Observations& common_obs_r, // residual = sqrt((r - A * delta_d).squaredNorm() / A.rows()); residual = (r + A * delta_d).norm(); // std::cout << "residual = " << residual << std::endl; - // std::cout << "TDCP2: r-A*delta_d = " << (r + A * delta_d).transpose() << std::endl; + // std::cout << "Tdcp2: r-A*delta_d = " << (r + A * delta_d).transpose() << std::endl; #if GNSS_UTILS_TDCP_DEBUG == 1 std::cout << "Displacement vector =" << d.head<3>().transpose() << std::endl; std::cout << "Displacement update =" << delta_d.head<3>().transpose() << std::endl; printf("Ref distance = %7.3f m\n", d_0.norm()); printf("Computed distance = %7.3f m\n", d.head<3>().norm()); - printf("TDCP: residual = %13.10f\n", residual); - printf("TDCP: row = %i\n", r.rows()); - std::cout << "TDCP: drho = " << r.transpose() << std::endl; - std::cout << "TDCP: drho_m = " << drho_m.transpose() << std::endl; - std::cout << "TDCP: H = \n" << A << std::endl; - printf("TDCP: dT = %8.3f secs\n", d(3)); + printf("Tdcp: residual = %13.10f\n", residual); + printf("Tdcp: row = %i\n", r.rows()); + std::cout << "Tdcp: drho = " << r.transpose() << std::endl; + std::cout << "Tdcp: drho_m = " << drho_m.transpose() << std::endl; + std::cout << "Tdcp: H = \n" << A << std::endl; + printf("Tdcp: dT = %8.3f secs\n", d(3)); #endif // RAIM ====================================== (only at first iteration) RAIM WITH SATELLITES, not ROWS @@ -338,10 +338,10 @@ bool TDCP(const Observations& common_obs_r, std::cout << "Displacement update =" << delta_d_raim.head<3>().transpose() << std::endl; printf("Ref distance = %7.3f m\n", d_0.norm()); printf("Computed distance = %7.3f m\n", d_raim.head<3>().norm()); - printf("TDCP: residual = %13.10f\n", residual); - std::cout << "TDCP: drho = " << r_raim.transpose() << std::endl; - std::cout << "TDCP: H = \n" << A_raim << std::endl; - printf("TDCP: dT = %8.3f secs\n", d_raim(3)); + printf("Tdcp: residual = %13.10f\n", residual); + std::cout << "Tdcp: drho = " << r_raim.transpose() << std::endl; + std::cout << "Tdcp: H = \n" << A_raim << std::endl; + printf("Tdcp: dT = %8.3f secs\n", d_raim(3)); #endif // store if best residual if (residual < best_residual) @@ -363,7 +363,7 @@ bool TDCP(const Observations& common_obs_r, // No successful RAIM solution if (worst_sat_row == -1) { - printf("TDCP: LS after RAIM DID NOT WORK. NAN values appeared. ABORTING!!"); + printf("Tdcp: LS after RAIM DID NOT WORK. NAN values appeared. ABORTING!!"); return false; } @@ -402,7 +402,7 @@ bool TDCP(const Observations& common_obs_r, cov_d = (A.transpose() * A).inverse(); #if GNSS_UTILS_TDCP_DEBUG == 1 - std::cout << "TDCP After RAIM iteration" << std::endl; + std::cout << "Tdcp After RAIM iteration" << std::endl; std::cout << "\tExcluded sats : "; for (auto dsat : discarded_sats) std::cout << (int)dsat << " "; @@ -417,7 +417,7 @@ bool TDCP(const Observations& common_obs_r, } #if GNSS_UTILS_TDCP_DEBUG == 1 - std::cout << "TDCP After RAIM " << std::endl; + std::cout << "Tdcp After RAIM " << std::endl; std::cout << "\tExcluded sats : "; for (auto dsat : discarded_sats) std::cout << (int)dsat << " "; @@ -432,7 +432,7 @@ bool TDCP(const Observations& common_obs_r, } #if GNSS_UTILS_TDCP_DEBUG == 1 - std::cout << "TDCP iteration " << j << std::endl; + std::cout << "Tdcp iteration " << j << std::endl; std::cout << "\tExcluded sats : "; for (auto dsat : discarded_sats) std::cout << (int)dsat << " "; @@ -447,10 +447,10 @@ bool TDCP(const Observations& common_obs_r, } // weight covariance with the measurement noise (proportional to time) - double sq_sigma_TDCP = (tk - tr) * sd_params.sigma_atm * sd_params.sigma_atm + + double sq_sigma_Tdcp = (tk - tr) * sd_params.sigma_atm * sd_params.sigma_atm + 2 * (sd_params.use_carrier_phase ? sd_params.sigma_carrier * sd_params.sigma_carrier : sd_params.sigma_code * sd_params.sigma_code); - cov_d *= sq_sigma_TDCP; + cov_d *= sq_sigma_Tdcp; // residual = (r - A * d).norm() / A.rows(); // Computing error on measurement space @@ -469,7 +469,7 @@ void filterCommonSatellites(Observations& common_obs_r, std::map<int, Eigen::Vector3d>& common_sats_pos_k, std::set<int>& discarded_sats, const Eigen::Vector3d& x_r, - const TDCPParams& sd_params, + const TdcpParams& sd_params, const prcopt_t& opt) { assert(&common_obs_r != &common_obs_k); @@ -576,4 +576,4 @@ void filterCommonSatellites(Observations& common_obs_r, // std::cout << "final size: " << common_obs_k.size() << std::endl; } -} // namespace GNSSUtils +} // namespace GnssUtils diff --git a/src/ublox_raw.cpp b/src/ublox_raw.cpp index 9cc2442d19ddaefe97e7741878a21a565fffbb50..7c12df5f841df9fa312dd20bc02e94af93c80e5e 100644 --- a/src/ublox_raw.cpp +++ b/src/ublox_raw.cpp @@ -1,6 +1,6 @@ #include "gnss_utils/ublox_raw.h" -using namespace GNSSUtils; +using namespace GnssUtils; UBloxRaw::UBloxRaw() : raw_data_type_(NO) { diff --git a/src/utils/rcv_position.cpp b/src/utils/rcv_position.cpp index 32ced1767ae1bf991cc7f92b0f1c21966072d602..590c91d3183a94ba38cd413998c2dbd926c81c22 100644 --- a/src/utils/rcv_position.cpp +++ b/src/utils/rcv_position.cpp @@ -7,12 +7,12 @@ #include "gnss_utils/utils/rcv_position.h" -using namespace GNSSUtils; +using namespace GnssUtils; -namespace GNSSUtils +namespace GnssUtils { -ComputePosOutput computePos(const GNSSUtils::Observations& _observations, - GNSSUtils::Navigation& _navigation, +ComputePosOutput computePos(const GnssUtils::Observations& _observations, + GnssUtils::Navigation& _navigation, const prcopt_t& _prcopt) { // Remove duplicated satellites @@ -24,7 +24,7 @@ ComputePosOutput computePos(const GNSSUtils::Observations& _observations, // Remove duplicated satellites _navigation.uniqueNavigation(); - GNSSUtils::ComputePosOutput output; + GnssUtils::ComputePosOutput output; sol_t sol; sol = { { 0 } }; @@ -59,8 +59,8 @@ ComputePosOutput computePos(const GNSSUtils::Observations& _observations, return output; } -// ComputePosOutput computePosOwn(const GNSSUtils::Observations & _observations, -// GNSSUtils::Navigation & _navigation, +// ComputePosOutput computePosOwn(const GnssUtils::Observations & _observations, +// GnssUtils::Navigation & _navigation, // const prcopt_t & _prcopt) // { @@ -70,7 +70,7 @@ ComputePosOutput computePos(const GNSSUtils::Observations& _observations, // // Define error msg // char msg[128] = ""; -// GNSSUtils::ComputePosOutput output; +// GnssUtils::ComputePosOutput output; // sol_t sol; // sol = {{0}}; @@ -261,4 +261,4 @@ int estposOwn(const obsd_t* obs, return 0; } -} // namespace GNSSUtils \ No newline at end of file +} // namespace GnssUtils \ No newline at end of file diff --git a/src/utils/sat_position.cpp b/src/utils/sat_position.cpp index 287fcdfc1a6a27785a4e0a3955704314c4d802db..750441eb04f8e94d998664dda1c121985248a678 100644 --- a/src/utils/sat_position.cpp +++ b/src/utils/sat_position.cpp @@ -7,9 +7,9 @@ #include "gnss_utils/utils/sat_position.h" -using namespace GNSSUtils; +using namespace GnssUtils; -namespace GNSSUtils +namespace GnssUtils { double computeSatElevation(const Eigen::Vector3d& receiver_ecef, const Eigen::Vector3d& sat_ecef) { @@ -60,4 +60,4 @@ void computeSatellitesPositions(const Observations& obs, // sats_pos[obs.getObservationByIdx(i).sat].transpose() << std::endl; } } -} // namespace GNSSUtils \ No newline at end of file +} // namespace GnssUtils \ No newline at end of file diff --git a/src/utils/transformations.cpp b/src/utils/transformations.cpp index c12f2db6219acdb3ac40013abd636edaead189f8..38097f55678579cb819ccf01ab0fc1a0cbbd6bfe 100644 --- a/src/utils/transformations.cpp +++ b/src/utils/transformations.cpp @@ -1,8 +1,8 @@ #include "gnss_utils/utils/transformations.h" -using namespace GNSSUtils; +using namespace GnssUtils; -namespace GNSSUtils +namespace GnssUtils { Eigen::Vector3d ecefToLatLonAlt(const Eigen::Vector3d& _ecef) @@ -101,7 +101,7 @@ void computeEnuEcefFromEcef(const Eigen::Vector3d& _t_ECEF_ENU, // // t_ENU_ECEF = -R_ENU_ECEF*_t_ECEF_ENU; - Eigen::Vector3d ENU_lat_lon_alt = GNSSUtils::ecefToLatLonAlt(_t_ECEF_ENU); + Eigen::Vector3d ENU_lat_lon_alt = GnssUtils::ecefToLatLonAlt(_t_ECEF_ENU); double sLat = sin(ENU_lat_lon_alt(0)); double cLat = cos(ENU_lat_lon_alt(0)); @@ -149,4 +149,4 @@ void computeEnuEcefFromLatLonAlt(const Eigen::Vector3d& _ENU_latlonalt, t_ENU_ECEF = -R_ENU_ECEF * t_ECEF_ENU; } -} // namespace GNSSUtils \ No newline at end of file +} // namespace GnssUtils \ No newline at end of file diff --git a/src/utils/utils.cpp b/src/utils/utils.cpp index 5336b047d0b0901ac502de3f4d443e5868bc5168..48fca36152aec213fdc87756f423d8293374a6e8 100644 --- a/src/utils/utils.cpp +++ b/src/utils/utils.cpp @@ -1,6 +1,6 @@ #include "gnss_utils/utils/utils.h" -namespace GNSSUtils +namespace GnssUtils { void print(std::string& _msg) { @@ -117,4 +117,4 @@ bool equalObservations(const obs_t& obs1, const obs_t& obs2) return true; } -} // namespace GNSSUtils +} // namespace GnssUtils diff --git a/test/gtest_observations.cpp b/test/gtest_observations.cpp index 80158905aba3f9ec890a6fb2d4acd8829e806245..2726322b5c7bb4b63e7186a68ded8feb0f541922 100644 --- a/test/gtest_observations.cpp +++ b/test/gtest_observations.cpp @@ -1,7 +1,7 @@ #include "gtest/utils_gtest.h" #include "gnss_utils/observations.h" -using namespace GNSSUtils; +using namespace GnssUtils; std::string rnx_file; obs_t obs; @@ -46,7 +46,7 @@ TEST(ObservationsTest, AddClearObservation) TEST(ObservationsTest, LoadFromRinex) { - // GNSSUtils utilities + // GnssUtils utilities Observations observations; observations.loadFromRinex(rnx_file.c_str(), t_start, t_end, dt, opt); observations.print(); diff --git a/test/gtest_transformations.cpp b/test/gtest_transformations.cpp index 8984b1009d368b9160ae5c43b88b99d00e1b00ca..22f7831647c1b7ebd043de0e737459556f60a284 100644 --- a/test/gtest_transformations.cpp +++ b/test/gtest_transformations.cpp @@ -7,7 +7,7 @@ static double kSemiminorAxis = 6356752.3142; static double kFirstEccentricitySquared = 6.69437999014 * 0.001; static double kSecondEccentricitySquared = 6.73949674228 * 0.001; -using namespace GNSSUtils; +using namespace GnssUtils; TEST(TransformationsTest, ecefToLatLonAlt) {