From f9b11f8681b038b12b00dd591752c3a219c46d4c Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Sat, 2 Nov 2019 12:22:32 +0100 Subject: [PATCH 1/7] Update changelog --- docs/changelog | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/changelog b/docs/changelog index 2d89e4f62..6332a3ed1 100644 --- a/docs/changelog +++ b/docs/changelog @@ -39,7 +39,8 @@ - The CMake scripts now find dependencies in Debian's riscv64 architecture. - Enable AVX2 kernels of the volk_gnsssdr library when using the Clang compiler. -- Added a CMake toolchain for building volk_gnsssdr in a Raspberry Pi. +- Fixed building in some ARM-based devices. Now Clang and ARMClang can be used for native building. +- Added toolchain files for building gnss-sdr and the volk_gnsssdr library in several ARM processor architectures, including those in Raspberry Pi 3 and 4. ### Improvements in Reliability: From b17e58ed5afddb6ef233918bf40c0f18cb313b6d Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Sat, 2 Nov 2019 12:23:28 +0100 Subject: [PATCH 2/7] Cosmetic changes --- .../PVT/gnuradio_blocks/rtklib_pvt_gs.cc | 36 +++++++++---------- 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/src/algorithms/PVT/gnuradio_blocks/rtklib_pvt_gs.cc b/src/algorithms/PVT/gnuradio_blocks/rtklib_pvt_gs.cc index fdc135c48..1e83da190 100644 --- a/src/algorithms/PVT/gnuradio_blocks/rtklib_pvt_gs.cc +++ b/src/algorithms/PVT/gnuradio_blocks/rtklib_pvt_gs.cc @@ -1101,7 +1101,7 @@ void rtklib_pvt_gs::msg_handler_telemetry(const pmt::pmt_t& msg) rp->log_rinex_nav(rp->navFile, new_glo_eph); } break; - case 29: // GPS L1 C/A + GLONASS L2 C/A + case 29: // GPS L1 C/A + GLONASS L2 C/A if (d_rinex_version == 3) { rp->log_rinex_nav(rp->navMixFile, new_eph, new_glo_eph); @@ -1196,13 +1196,13 @@ void rtklib_pvt_gs::msg_handler_telemetry(const pmt::pmt_t& msg) case 7: // GPS L1 C/A + GPS L2C rp->log_rinex_nav(rp->navFile, new_cnav_eph); break; - case 13: // L5+E5a + case 13: // L5+E5a rp->log_rinex_nav(rp->navMixFile, new_cnav_eph, new_gal_eph); break; - case 28: // GPS L2C + GLONASS L1 C/A + case 28: // GPS L2C + GLONASS L1 C/A rp->log_rinex_nav(rp->navMixFile, new_cnav_eph, new_glo_eph); break; - case 31: // GPS L2C + GLONASS L2 C/A + case 31: // GPS L2C + GLONASS L2 C/A rp->log_rinex_nav(rp->navMixFile, new_cnav_eph, new_glo_eph); break; default: @@ -1458,7 +1458,7 @@ void rtklib_pvt_gs::msg_handler_telemetry(const pmt::pmt_t& msg) case 25: // GLONASS L1 C/A + GLONASS L2 C/A rp->log_rinex_nav(rp->navGloFile, new_glo_eph); break; - case 26: // GPS L1 C/A + GLONASS L1 C/A + case 26: // GPS L1 C/A + GLONASS L1 C/A if (d_rinex_version == 3) { rp->log_rinex_nav(rp->navMixFile, new_eph, new_glo_eph); @@ -1468,13 +1468,13 @@ void rtklib_pvt_gs::msg_handler_telemetry(const pmt::pmt_t& msg) rp->log_rinex_nav(rp->navGloFile, new_glo_eph); } break; - case 27: // Galileo E1B + GLONASS L1 C/A + case 27: // Galileo E1B + GLONASS L1 C/A rp->log_rinex_nav(rp->navMixFile, new_gal_eph, new_glo_eph); break; - case 28: // GPS L2C + GLONASS L1 C/A + case 28: // GPS L2C + GLONASS L1 C/A rp->log_rinex_nav(rp->navMixFile, new_cnav_eph, new_glo_eph); break; - case 29: // GPS L1 C/A + GLONASS L2 C/A + case 29: // GPS L1 C/A + GLONASS L2 C/A if (d_rinex_version == 3) { rp->log_rinex_nav(rp->navMixFile, new_eph, new_glo_eph); @@ -1484,10 +1484,10 @@ void rtklib_pvt_gs::msg_handler_telemetry(const pmt::pmt_t& msg) rp->log_rinex_nav(rp->navGloFile, new_glo_eph); } break; - case 30: // Galileo E1B + GLONASS L2 C/A + case 30: // Galileo E1B + GLONASS L2 C/A rp->log_rinex_nav(rp->navMixFile, new_gal_eph, new_glo_eph); break; - case 31: // GPS L2C + GLONASS L2 C/A + case 31: // GPS L2C + GLONASS L2 C/A rp->log_rinex_nav(rp->navMixFile, new_cnav_eph, new_glo_eph); break; default: @@ -1688,7 +1688,7 @@ bool rtklib_pvt_gs::send_sys_v_ttff_msg(ttff_msgbuf ttff) ttff_msgbuf msg; msg.ttff = ttff.ttff; msgsend_size = sizeof(msg.ttff); - msg.mtype = 1; // default message ID + msg.mtype = 1; // default message ID // SEND SOLUTION OVER A MESSAGE QUEUE // non-blocking Sys V message send @@ -2287,7 +2287,7 @@ int rtklib_pvt_gs::work(int noutput_items, gr_vector_const_void_star& input_item std::map::const_iterator gps_cnav_ephemeris_iter; std::map::const_iterator glonass_gnav_ephemeris_iter; std::map::const_iterator beidou_dnav_ephemeris_iter; - if (!b_rinex_header_written) // & we have utc data in nav message! + if (!b_rinex_header_written) // & we have utc data in nav message! { galileo_ephemeris_iter = d_user_pvt_solver->galileo_ephemeris_map.cbegin(); gps_ephemeris_iter = d_user_pvt_solver->gps_ephemeris_map.cbegin(); @@ -2384,7 +2384,7 @@ int rtklib_pvt_gs::work(int noutput_items, gr_vector_const_void_star& input_item b_rinex_header_written = true; // do not write header anymore } break; - case 10: // GPS L1 C/A + Galileo E5a + case 10: // GPS L1 C/A + Galileo E5a if ((galileo_ephemeris_iter != d_user_pvt_solver->galileo_ephemeris_map.cend()) and (gps_ephemeris_iter != d_user_pvt_solver->gps_ephemeris_map.cend())) { std::string gal_signal("5X"); @@ -2394,7 +2394,7 @@ int rtklib_pvt_gs::work(int noutput_items, gr_vector_const_void_star& input_item b_rinex_header_written = true; // do not write header anymore } break; - case 11: // GPS L1 C/A + Galileo E5b + case 11: // GPS L1 C/A + Galileo E5b if ((galileo_ephemeris_iter != d_user_pvt_solver->galileo_ephemeris_map.cend()) and (gps_ephemeris_iter != d_user_pvt_solver->gps_ephemeris_map.cend())) { std::string gal_signal("7X"); @@ -2415,7 +2415,7 @@ int rtklib_pvt_gs::work(int noutput_items, gr_vector_const_void_star& input_item b_rinex_header_written = true; // do not write header anymore } break; - case 14: // Galileo E1B + Galileo E5a + case 14: // Galileo E1B + Galileo E5a if ((galileo_ephemeris_iter != d_user_pvt_solver->galileo_ephemeris_map.cend())) { std::string gal_signal("1B 5X"); @@ -2425,7 +2425,7 @@ int rtklib_pvt_gs::work(int noutput_items, gr_vector_const_void_star& input_item b_rinex_header_written = true; // do not write header anymore } break; - case 15: // Galileo E1B + Galileo E5b + case 15: // Galileo E1B + Galileo E5b if ((galileo_ephemeris_iter != d_user_pvt_solver->galileo_ephemeris_map.cend())) { std::string gal_signal("1B 7X"); @@ -2485,7 +2485,7 @@ int rtklib_pvt_gs::work(int noutput_items, gr_vector_const_void_star& input_item b_rinex_header_written = true; // do not write header anymore } break; - case 27: // Galileo E1B + GLONASS L1 C/A + case 27: // Galileo E1B + GLONASS L1 C/A if ((glonass_gnav_ephemeris_iter != d_user_pvt_solver->glonass_gnav_ephemeris_map.cend()) and (galileo_ephemeris_iter != d_user_pvt_solver->galileo_ephemeris_map.cend())) { std::string glo_signal("1G"); @@ -2526,7 +2526,7 @@ int rtklib_pvt_gs::work(int noutput_items, gr_vector_const_void_star& input_item b_rinex_header_written = true; // do not write header anymore } break; - case 30: // Galileo E1B + GLONASS L2 C/A + case 30: // Galileo E1B + GLONASS L2 C/A if ((glonass_gnav_ephemeris_iter != d_user_pvt_solver->glonass_gnav_ephemeris_map.cend()) and (galileo_ephemeris_iter != d_user_pvt_solver->galileo_ephemeris_map.cend())) { std::string glo_signal("2G"); From fe4319dadca9653ce0bf282ce8f692fa6777756f Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Sun, 3 Nov 2019 00:55:48 +0100 Subject: [PATCH 3/7] Improve comments --- cmake/Modules/FindGPSTK.cmake | 4 ++++ cmake/Modules/FindGRDBFCTTC.cmake | 5 +++++ cmake/Modules/FindGRGN3S.cmake | 5 +++++ cmake/Modules/FindLIBAD9361.cmake | 8 +++----- cmake/Modules/FindTELEORBIT.cmake | 5 +++++ cmake/Modules/FindUHD.cmake | 2 +- 6 files changed, 23 insertions(+), 6 deletions(-) diff --git a/cmake/Modules/FindGPSTK.cmake b/cmake/Modules/FindGPSTK.cmake index abf26ebdb..029278b87 100644 --- a/cmake/Modules/FindGPSTK.cmake +++ b/cmake/Modules/FindGPSTK.cmake @@ -21,6 +21,10 @@ # GPSTK_INCLUDE_DIR, where to find Rinex3ObsBase.hpp, etc. # GPSTK_FOUND, If false, do not try to use GPSTK. # GPSTK_LIBRARY, where to find the GPSTK library. +# +# Provides the following imported target: +# Gpstk::gpstk +# if(NOT COMMAND feature_summary) include(FeatureSummary) diff --git a/cmake/Modules/FindGRDBFCTTC.cmake b/cmake/Modules/FindGRDBFCTTC.cmake index ba0da622d..f27bc5a31 100644 --- a/cmake/Modules/FindGRDBFCTTC.cmake +++ b/cmake/Modules/FindGRDBFCTTC.cmake @@ -19,6 +19,11 @@ # Find GR-DBFCTTC Module ######################################################################## +# +# Provides the following imported target: +# Gnuradio::dbfcttc +# + set(PKG_CONFIG_USE_CMAKE_PREFIX_PATH TRUE) include(FindPkgConfig) pkg_check_modules(PC_GR_DBFCTTC gr-dbfcttc) diff --git a/cmake/Modules/FindGRGN3S.cmake b/cmake/Modules/FindGRGN3S.cmake index de716638c..8fa5a16fa 100644 --- a/cmake/Modules/FindGRGN3S.cmake +++ b/cmake/Modules/FindGRGN3S.cmake @@ -19,6 +19,11 @@ # Find GR-GN3S Module ######################################################################## +# +# Provides the following imported target: +# Gnuradio::gn3s +# + set(PKG_CONFIG_USE_CMAKE_PREFIX_PATH TRUE) include(FindPkgConfig) pkg_check_modules(PC_GR_GN3S gr-gn3s) diff --git a/cmake/Modules/FindLIBAD9361.cmake b/cmake/Modules/FindLIBAD9361.cmake index 3daf9c8b0..39a992ca7 100644 --- a/cmake/Modules/FindLIBAD9361.cmake +++ b/cmake/Modules/FindLIBAD9361.cmake @@ -17,7 +17,7 @@ # # Provides the following imported target: -# Iio::iio +# Iio::ad9361 # if(NOT COMMAND feature_summary) @@ -28,8 +28,7 @@ set(PKG_CONFIG_USE_CMAKE_PREFIX_PATH TRUE) include(FindPkgConfig) pkg_check_modules(PC_LIBAD9361 libad9361) -find_path( - LIBAD9361_INCLUDE_DIRS +find_path(LIBAD9361_INCLUDE_DIRS NAMES ad9361.h HINTS ${PC_LIBAD9361_INCLUDEDIR} PATHS /usr/include @@ -41,8 +40,7 @@ find_path( $ENV{LIBAD9361_DIR}/include ) -find_library( - LIBAD9361_LIBRARIES +find_library(LIBAD9361_LIBRARIES NAMES ad9361 HINTS ${PC_LIBAD9361_LIBDIR} PATHS /usr/lib diff --git a/cmake/Modules/FindTELEORBIT.cmake b/cmake/Modules/FindTELEORBIT.cmake index 5440753a9..e59d7b79c 100644 --- a/cmake/Modules/FindTELEORBIT.cmake +++ b/cmake/Modules/FindTELEORBIT.cmake @@ -15,6 +15,11 @@ # You should have received a copy of the GNU General Public License # along with GNSS-SDR. If not, see . +# +# Provides the following imported target: +# Gnuradio::teleorbit +# + if(NOT COMMAND feature_summary) include(FeatureSummary) endif() diff --git a/cmake/Modules/FindUHD.cmake b/cmake/Modules/FindUHD.cmake index eb3cb437a..b61db4714 100644 --- a/cmake/Modules/FindUHD.cmake +++ b/cmake/Modules/FindUHD.cmake @@ -17,7 +17,7 @@ # # Provides the following imported target: -# Iio::iio +# Uhd::uhd # ######################################################################## From 4e5a8885b198e8db2746a66a38873170b2de3cd7 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Sun, 3 Nov 2019 13:13:47 +0100 Subject: [PATCH 4/7] Document triple-band modes in comments --- src/algorithms/PVT/adapters/rtklib_pvt.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/algorithms/PVT/adapters/rtklib_pvt.cc b/src/algorithms/PVT/adapters/rtklib_pvt.cc index 58d9b6a09..beb609c31 100644 --- a/src/algorithms/PVT/adapters/rtklib_pvt.cc +++ b/src/algorithms/PVT/adapters/rtklib_pvt.cc @@ -202,6 +202,9 @@ Rtklib_Pvt::Rtklib_Pvt(ConfigurationInterface* configuration, * 608 | BeiDou B3I + GPS L1 C/A + Galileo E1B + BeiDou B1I * 609 | BeiDou B3I + GPS L1 C/A + Galileo E1B + GLONASS L1 C/A * 610 | BeiDou B3I + GPS L1 C/A + Galileo E1B + GLONASS L1 C/A + BeiDou B1I + * + * 1000 | GPS L1 C/A + GPS L2C + GPS L5 + * 1001 | GPS L1 C/A + Galileo E1B + GPS L2C + GPS L5 + Galileo E5a */ int gps_1C_count = configuration->property("Channels_1C.count", 0); int gps_2S_count = configuration->property("Channels_2S.count", 0); @@ -396,7 +399,7 @@ Rtklib_Pvt::Rtklib_Pvt(ConfigurationInterface* configuration, // Settings 1 int positioning_mode = -1; std::string default_pos_mode("Single"); - std::string positioning_mode_str = configuration->property(role + ".positioning_mode", default_pos_mode); // (PMODE_XXX) see src/algorithms/libs/rtklib/rtklib.h + std::string positioning_mode_str = configuration->property(role + ".positioning_mode", default_pos_mode); // (PMODE_XXX) see src/algorithms/libs/rtklib/rtklib.h if (positioning_mode_str == "Single") { positioning_mode = PMODE_SINGLE; From cc3c4e4de7f5f9a94918c1eb32c9ba0184158707 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Sun, 3 Nov 2019 21:27:33 +0100 Subject: [PATCH 5/7] Update Armadillo version in README.md file --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 710f17e3b..89ad37e84 100644 --- a/README.md +++ b/README.md @@ -220,9 +220,9 @@ $ sudo apt-get install libblas-dev liblapack-dev # For Debian/Ubuntu/Linux $ sudo yum install lapack-devel blas-devel # For Fedora/CentOS/RHEL $ sudo zypper install lapack-devel blas-devel # For OpenSUSE $ sudo pacman -S blas lapack # For Arch Linux -$ wget https://sourceforge.net/projects/arma/files/armadillo-9.700.3.tar.xz -$ tar xvfz armadillo-9.700.3.tar.xz -$ cd armadillo-9.700.3 +$ wget https://sourceforge.net/projects/arma/files/armadillo-9.800.2.tar.xz +$ tar xvfz armadillo-9.800.2.tar.xz +$ cd armadillo-9.800.2 $ cmake . $ make $ sudo make install From 8f12cbc466c1ba2ad0e456a247890c529a1ce20f Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Mon, 4 Nov 2019 21:09:11 +0100 Subject: [PATCH 6/7] Include Visual Studio 14 --- .../volk_gnsssdr_module/volk_gnsssdr/lib/CMakeLists.txt | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/lib/CMakeLists.txt b/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/lib/CMakeLists.txt index 7af889751..80a3d6511 100644 --- a/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/lib/CMakeLists.txt +++ b/src/algorithms/libs/volk_gnsssdr_module/volk_gnsssdr/lib/CMakeLists.txt @@ -405,6 +405,8 @@ if(MSVC) set(cmake_c_compiler_version "Microsoft Visual Studio 11.0") elseif(MSVC12) #Visual Studio 12 set(cmake_c_compiler_version "Microsoft Visual Studio 12.0") + elseif(MSVC14) #Visual Studio 14 + set(cmake_c_compiler_version "Microsoft Visual Studio 14.0") endif() else() execute_process(COMMAND ${CMAKE_C_COMPILER} --version @@ -625,12 +627,12 @@ if(ENABLE_STATIC_LIBS) PRIVATE ${CMAKE_CURRENT_SOURCE_DIR} ) + set_target_properties(volk_gnsssdr_static PROPERTIES OUTPUT_NAME volk_gnsssdr) + install(TARGETS volk_gnsssdr_static EXPORT VOLK_GNSSSDR-export ARCHIVE DESTINATION lib${LIB_SUFFIX} COMPONENT "volk_gnsssdr_devel" ) - - set_target_properties(volk_gnsssdr_static PROPERTIES OUTPUT_NAME volk_gnsssdr) endif() ######################################################################## From 34d203a1383a144b0f8a71d2b54a1c32c5db56e8 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Mon, 4 Nov 2019 21:10:27 +0100 Subject: [PATCH 7/7] Fix Galileo date --- src/algorithms/libs/rtklib/rtklib_conversions.cc | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/algorithms/libs/rtklib/rtklib_conversions.cc b/src/algorithms/libs/rtklib/rtklib_conversions.cc index 039593462..45acb5492 100644 --- a/src/algorithms/libs/rtklib/rtklib_conversions.cc +++ b/src/algorithms/libs/rtklib/rtklib_conversions.cc @@ -118,7 +118,14 @@ obsd_t insert_obs_to_rtklib(obsd_t& rtklib_obs, const Gnss_Synchro& gnss_synchro // rtklib_obs.time = gpst2time(adjgpsweek(week), gnss_synchro.RX_time); // } // - rtklib_obs.time = gpst2time(adjgpsweek(week, pre_2009_file), gnss_synchro.RX_time); + if (gnss_synchro.System == 'E') + { + rtklib_obs.time = gst2time(week, gnss_synchro.RX_time); + } + else + { + rtklib_obs.time = gpst2time(adjgpsweek(week, pre_2009_file), gnss_synchro.RX_time); + } // account for the TOW crossover transitory in the first 18 seconds where the week is not yet updated! if (gnss_synchro.RX_time < 18.0) { @@ -188,7 +195,7 @@ eph_t eph_to_rtklib(const Galileo_Ephemeris& gal_eph) rtklib_sat.Adot = 0; // only in CNAV; rtklib_sat.ndot = 0; // only in CNAV; - rtklib_sat.week = adjgpsweek(gal_eph.WN_5); /* week of tow */ + rtklib_sat.week = gal_eph.WN_5 + 1024; /* week of tow in GPS (not mod-1024) week scale */ rtklib_sat.cic = gal_eph.C_ic_4; rtklib_sat.cis = gal_eph.C_is_4; rtklib_sat.cuc = gal_eph.C_uc_3;