From 268dbbc61f959d70df2549d6574d0f264f585521 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Fri, 26 Aug 2022 09:14:58 +0200 Subject: [PATCH 1/4] Add iomanip include --- src/algorithms/PVT/libs/kml_printer.cc | 1 + src/tests/system-tests/position_test.cc | 1 + .../observables/hybrid_observables_test.cc | 1 + .../observables/hybrid_observables_test_fpga.cc | 1 + .../telemetry_decoder/gps_l1_ca_telemetry_decoder_test.cc | 1 + .../tracking/gps_l1_ca_dll_pll_tracking_test.cc | 1 + .../tracking/gps_l1_ca_dll_pll_tracking_test_fpga.cc | 1 + .../tracking/gps_l1_ca_kf_tracking_test.cc | 1 + 8 files changed, 8 insertions(+) diff --git a/src/algorithms/PVT/libs/kml_printer.cc b/src/algorithms/PVT/libs/kml_printer.cc index dee5d6c7a..ad7ccb0e3 100644 --- a/src/algorithms/PVT/libs/kml_printer.cc +++ b/src/algorithms/PVT/libs/kml_printer.cc @@ -24,6 +24,7 @@ #include // for mkstemp #include // for tm #include // for exception +#include // for std::setprecision #include // for cout, cerr #include #include // for S_IXUSR | S_IRWXG | S_IRWXO diff --git a/src/tests/system-tests/position_test.cc b/src/tests/system-tests/position_test.cc index f3f96c0da..a2bb5181d 100644 --- a/src/tests/system-tests/position_test.cc +++ b/src/tests/system-tests/position_test.cc @@ -46,6 +46,7 @@ #include #include #include +#include #include #include diff --git a/src/tests/unit-tests/signal-processing-blocks/observables/hybrid_observables_test.cc b/src/tests/unit-tests/signal-processing-blocks/observables/hybrid_observables_test.cc index 43388e8b2..9cb2337d4 100644 --- a/src/tests/unit-tests/signal-processing-blocks/observables/hybrid_observables_test.cc +++ b/src/tests/unit-tests/signal-processing-blocks/observables/hybrid_observables_test.cc @@ -63,6 +63,7 @@ #include #include #include +#include #include #include #if GNSSTK_USES_GPSTK_NAMESPACE diff --git a/src/tests/unit-tests/signal-processing-blocks/observables/hybrid_observables_test_fpga.cc b/src/tests/unit-tests/signal-processing-blocks/observables/hybrid_observables_test_fpga.cc index b34f52d86..37264bf4b 100644 --- a/src/tests/unit-tests/signal-processing-blocks/observables/hybrid_observables_test_fpga.cc +++ b/src/tests/unit-tests/signal-processing-blocks/observables/hybrid_observables_test_fpga.cc @@ -62,6 +62,7 @@ #include #include #include +#include #include #include #include diff --git a/src/tests/unit-tests/signal-processing-blocks/telemetry_decoder/gps_l1_ca_telemetry_decoder_test.cc b/src/tests/unit-tests/signal-processing-blocks/telemetry_decoder/gps_l1_ca_telemetry_decoder_test.cc index bc56d4cd2..3155a3ab8 100644 --- a/src/tests/unit-tests/signal-processing-blocks/telemetry_decoder/gps_l1_ca_telemetry_decoder_test.cc +++ b/src/tests/unit-tests/signal-processing-blocks/telemetry_decoder/gps_l1_ca_telemetry_decoder_test.cc @@ -22,6 +22,7 @@ #include #include #include +#include #include #include #include diff --git a/src/tests/unit-tests/signal-processing-blocks/tracking/gps_l1_ca_dll_pll_tracking_test.cc b/src/tests/unit-tests/signal-processing-blocks/tracking/gps_l1_ca_dll_pll_tracking_test.cc index fb3a63cef..87af5fe45 100644 --- a/src/tests/unit-tests/signal-processing-blocks/tracking/gps_l1_ca_dll_pll_tracking_test.cc +++ b/src/tests/unit-tests/signal-processing-blocks/tracking/gps_l1_ca_dll_pll_tracking_test.cc @@ -39,6 +39,7 @@ #include #include #include +#include #include #include #include diff --git a/src/tests/unit-tests/signal-processing-blocks/tracking/gps_l1_ca_dll_pll_tracking_test_fpga.cc b/src/tests/unit-tests/signal-processing-blocks/tracking/gps_l1_ca_dll_pll_tracking_test_fpga.cc index 85d54d1a1..0fa07a93a 100644 --- a/src/tests/unit-tests/signal-processing-blocks/tracking/gps_l1_ca_dll_pll_tracking_test_fpga.cc +++ b/src/tests/unit-tests/signal-processing-blocks/tracking/gps_l1_ca_dll_pll_tracking_test_fpga.cc @@ -42,6 +42,7 @@ #include #include // FPGA read input file #include +#include #include #include #include diff --git a/src/tests/unit-tests/signal-processing-blocks/tracking/gps_l1_ca_kf_tracking_test.cc b/src/tests/unit-tests/signal-processing-blocks/tracking/gps_l1_ca_kf_tracking_test.cc index ea3bd765d..ae94e744a 100644 --- a/src/tests/unit-tests/signal-processing-blocks/tracking/gps_l1_ca_kf_tracking_test.cc +++ b/src/tests/unit-tests/signal-processing-blocks/tracking/gps_l1_ca_kf_tracking_test.cc @@ -38,6 +38,7 @@ #include #include #include +#include #include #include #include From 182b87c0228ab95c2930e4dd6a4c84980e966099 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Fri, 26 Aug 2022 09:43:11 +0200 Subject: [PATCH 2/4] Make use of std::lcm instead of Boost when possible --- src/algorithms/PVT/adapters/CMakeLists.txt | 11 +++++++++-- src/algorithms/PVT/adapters/rtklib_pvt.cc | 5 +++++ src/algorithms/PVT/gnuradio_blocks/CMakeLists.txt | 11 +++++++++-- src/algorithms/PVT/gnuradio_blocks/rtklib_pvt_gs.cc | 5 +++++ 4 files changed, 28 insertions(+), 4 deletions(-) diff --git a/src/algorithms/PVT/adapters/CMakeLists.txt b/src/algorithms/PVT/adapters/CMakeLists.txt index 6b9ff33e6..658e493ac 100644 --- a/src/algorithms/PVT/adapters/CMakeLists.txt +++ b/src/algorithms/PVT/adapters/CMakeLists.txt @@ -32,11 +32,18 @@ target_include_directories(pvt_adapters ${GNSSSDR_SOURCE_DIR}/src/core/interfaces ) -if(USE_OLD_BOOST_MATH_COMMON_FACTOR) +if((NOT (CMAKE_VERSION VERSION_LESS "3.1")) AND NOT (CMAKE_CXX_STANDARD VERSION_LESS 17)) target_compile_definitions(pvt_adapters PRIVATE - -DUSE_OLD_BOOST_MATH_COMMON_FACTOR=1 + -DUSE_STD_COMMON_FACTOR=1 ) +else() + if(USE_OLD_BOOST_MATH_COMMON_FACTOR) + target_compile_definitions(pvt_adapters + PRIVATE + -DUSE_OLD_BOOST_MATH_COMMON_FACTOR=1 + ) + endif() endif() if(ENABLE_CLANG_TIDY) diff --git a/src/algorithms/PVT/adapters/rtklib_pvt.cc b/src/algorithms/PVT/adapters/rtklib_pvt.cc index aef8a6e58..ccc6bcfac 100644 --- a/src/algorithms/PVT/adapters/rtklib_pvt.cc +++ b/src/algorithms/PVT/adapters/rtklib_pvt.cc @@ -28,6 +28,10 @@ #include "rtklib_rtkpos.h" // for rtkfree, rtkinit #include // for LOG #include // for std::cout +#if USE_STD_COMMON_FACTOR +#include +namespace bc = std; +#else #if USE_OLD_BOOST_MATH_COMMON_FACTOR #include namespace bc = boost::math; @@ -35,6 +39,7 @@ namespace bc = boost::math; #include namespace bc = boost::integer; #endif +#endif using namespace std::string_literals; diff --git a/src/algorithms/PVT/gnuradio_blocks/CMakeLists.txt b/src/algorithms/PVT/gnuradio_blocks/CMakeLists.txt index 3cfae32f6..ae1b728bf 100644 --- a/src/algorithms/PVT/gnuradio_blocks/CMakeLists.txt +++ b/src/algorithms/PVT/gnuradio_blocks/CMakeLists.txt @@ -74,11 +74,18 @@ if(ENABLE_CLANG_TIDY) endif() endif() -if(USE_OLD_BOOST_MATH_COMMON_FACTOR) +if((NOT (CMAKE_VERSION VERSION_LESS "3.1")) AND NOT (CMAKE_CXX_STANDARD VERSION_LESS 17)) target_compile_definitions(pvt_gr_blocks PRIVATE - -DUSE_OLD_BOOST_MATH_COMMON_FACTOR=1 + -DUSE_STD_COMMON_FACTOR=1 ) +else() + if(USE_OLD_BOOST_MATH_COMMON_FACTOR) + target_compile_definitions(pvt_gr_blocks + PRIVATE + -DUSE_OLD_BOOST_MATH_COMMON_FACTOR=1 + ) + endif() endif() if(USE_BOOST_BIND_PLACEHOLDERS) diff --git a/src/algorithms/PVT/gnuradio_blocks/rtklib_pvt_gs.cc b/src/algorithms/PVT/gnuradio_blocks/rtklib_pvt_gs.cc index a12949e0f..b4c87afd9 100644 --- a/src/algorithms/PVT/gnuradio_blocks/rtklib_pvt_gs.cc +++ b/src/algorithms/PVT/gnuradio_blocks/rtklib_pvt_gs.cc @@ -86,6 +86,10 @@ #include #endif +#if USE_STD_COMMON_FACTOR +#include +namespace bc = std; +#else #if USE_OLD_BOOST_MATH_COMMON_FACTOR #include namespace bc = boost::math; @@ -93,6 +97,7 @@ namespace bc = boost::math; #include namespace bc = boost::integer; #endif +#endif #if PMT_USES_BOOST_ANY #include From e161545155a0fd23e0bff5e902d1597bbbb303dd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Into=20P=C3=A4=C3=A4kk=C3=B6nen?= Date: Wed, 24 Aug 2022 18:25:06 +0300 Subject: [PATCH 3/4] add options for changing usrp device arguments MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Into Pääkkönen --- .../signal_source/adapters/uhd_signal_source.cc | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/algorithms/signal_source/adapters/uhd_signal_source.cc b/src/algorithms/signal_source/adapters/uhd_signal_source.cc index 9b222bdb5..efaae370b 100644 --- a/src/algorithms/signal_source/adapters/uhd_signal_source.cc +++ b/src/algorithms/signal_source/adapters/uhd_signal_source.cc @@ -65,6 +65,20 @@ UhdSignalSource::UhdSignalSource(const ConfigurationInterface* configuration, sample_rate_ = configuration->property(role + ".sampling_frequency", 4.0e6); item_type_ = configuration->property(role + ".item_type", default_item_type); + // UHD TRANSPORT PARAMETERS + // option to manually set device "num_recv_frames" + std::string device_num_recv_frames = configuration->property(role + ".device_num_recv_frames", empty); + if (empty != device_num_recv_frames) // if not empty + { + dev_addr["num_recv_frames"] = device_num_recv_frames; + } + // option to manually set device "recv_frame_size" + std::string device_recv_frame_size = configuration->property(role + ".device_recv_frame_size", empty); + if (empty != device_recv_frame_size) // if not empty + { + dev_addr["recv_frame_size"] = device_recv_frame_size; + } + if (RF_channels_ == 1) { // Single RF channel UHD operation (backward compatible config file format) From 62c4a10f03e4272676dce541efbe1a79afaf1de7 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Fri, 26 Aug 2022 23:15:24 +0200 Subject: [PATCH 4/4] Document new parameters for UHD_Signal_Source --- docs/CHANGELOG.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index 512b55ccc..e93a5309e 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -78,6 +78,9 @@ All notable changes to GNSS-SDR will be documented in this file. `Osmosdr_Signal_Source` implementation of a `SignalSource`. - The `Osmosdr_Signal_Source` implementation learned a new parameter `if_bw` to manually set the bandwidth of the bandpass filter on the radio frontend. +- The `UHD_Signal_Source` learned two new optional parameters + `device_recv_frame_size` and `device_num_recv_frames` for overriding + [transport layer defaults](https://files.ettus.com/manual/page_transport.html). - The new configuration parameter `Channels_XX.RF_channel_ID` allows to specify the signal source per channel group. - Allowed the CMake project to be a sub-project.