From a1f77607c3baacf1c4c5d5019289613dc29195dc Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Thu, 16 May 2019 20:49:10 +0200 Subject: [PATCH 1/6] Fix building in some macOS configurations --- src/algorithms/PVT/libs/CMakeLists.txt | 2 +- src/algorithms/signal_source/gnuradio_blocks/CMakeLists.txt | 2 +- src/algorithms/tracking/libs/CMakeLists.txt | 2 +- src/core/monitor/CMakeLists.txt | 2 +- src/core/receiver/CMakeLists.txt | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/algorithms/PVT/libs/CMakeLists.txt b/src/algorithms/PVT/libs/CMakeLists.txt index d4df48600..23eacf787 100644 --- a/src/algorithms/PVT/libs/CMakeLists.txt +++ b/src/algorithms/PVT/libs/CMakeLists.txt @@ -95,7 +95,7 @@ if(Boost_VERSION VERSION_GREATER "106599") endif() if(OS_IS_MACOSX) - if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang") # not AppleClang + if(CMAKE_CXX_COMPILER_ID MATCHES "Clang") target_compile_definitions(pvt_libs PUBLIC -DBOOST_ASIO_HAS_STD_STRING_VIEW diff --git a/src/algorithms/signal_source/gnuradio_blocks/CMakeLists.txt b/src/algorithms/signal_source/gnuradio_blocks/CMakeLists.txt index b32774dd9..ca38c48a7 100644 --- a/src/algorithms/signal_source/gnuradio_blocks/CMakeLists.txt +++ b/src/algorithms/signal_source/gnuradio_blocks/CMakeLists.txt @@ -77,7 +77,7 @@ if(ENABLE_RAW_UDP AND PCAP_FOUND) endif() if(OS_IS_MACOSX) - if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang") # not AppleClang + if(CMAKE_CXX_COMPILER_ID MATCHES "Clang") target_compile_definitions(signal_source_gr_blocks PUBLIC -DBOOST_ASIO_HAS_STD_STRING_VIEW diff --git a/src/algorithms/tracking/libs/CMakeLists.txt b/src/algorithms/tracking/libs/CMakeLists.txt index 63de5d9a7..d30feeaa5 100644 --- a/src/algorithms/tracking/libs/CMakeLists.txt +++ b/src/algorithms/tracking/libs/CMakeLists.txt @@ -101,7 +101,7 @@ if(Boost_VERSION VERSION_GREATER "106599") endif() if(OS_IS_MACOSX) - if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang") # not AppleClang + if(CMAKE_CXX_COMPILER_ID MATCHES "Clang") target_compile_definitions(tracking_libs PUBLIC -DBOOST_ASIO_HAS_STD_STRING_VIEW diff --git a/src/core/monitor/CMakeLists.txt b/src/core/monitor/CMakeLists.txt index aa8ee4daa..0982685ad 100644 --- a/src/core/monitor/CMakeLists.txt +++ b/src/core/monitor/CMakeLists.txt @@ -69,7 +69,7 @@ endif() if(OS_IS_MACOSX) - if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang") # not AppleClang + if(CMAKE_CXX_COMPILER_ID MATCHES "Clang") target_compile_definitions(core_monitor PUBLIC -DBOOST_ASIO_HAS_STD_STRING_VIEW diff --git a/src/core/receiver/CMakeLists.txt b/src/core/receiver/CMakeLists.txt index 4cfca1f29..af0c4a2f2 100644 --- a/src/core/receiver/CMakeLists.txt +++ b/src/core/receiver/CMakeLists.txt @@ -163,7 +163,7 @@ target_link_libraries(core_receiver ) if(OS_IS_MACOSX) - if(CMAKE_CXX_COMPILER_ID STREQUAL "Clang") # not AppleClang + if(CMAKE_CXX_COMPILER_ID MATCHES "Clang") target_compile_definitions(core_receiver PUBLIC -DBOOST_ASIO_HAS_STD_STRING_VIEW From 40b7377c318ceeb72983069e23a1ba4e8908b526 Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Fri, 17 May 2019 00:57:40 +0200 Subject: [PATCH 2/6] Fix test --- ..._l1_ca_pcps_opencl_acquisition_gsoc2013_test.cc | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/tests/unit-tests/signal-processing-blocks/acquisition/gps_l1_ca_pcps_opencl_acquisition_gsoc2013_test.cc b/src/tests/unit-tests/signal-processing-blocks/acquisition/gps_l1_ca_pcps_opencl_acquisition_gsoc2013_test.cc index 2eecb0e53..b28e72aec 100644 --- a/src/tests/unit-tests/signal-processing-blocks/acquisition/gps_l1_ca_pcps_opencl_acquisition_gsoc2013_test.cc +++ b/src/tests/unit-tests/signal-processing-blocks/acquisition/gps_l1_ca_pcps_opencl_acquisition_gsoc2013_test.cc @@ -60,16 +60,16 @@ class GpsL1CaPcpsOpenClAcquisitionGSoC2013Test_msg_rx; typedef boost::shared_ptr GpsL1CaPcpsOpenClAcquisitionGSoC2013Test_msg_rx_sptr; -GpsL1CaPcpsOpenClAcquisitionGSoC2013Test_msg_rx_sptr GpsL1CaPcpsOpenClAcquisitionGSoC2013Test_msg_rx_make(concurrent_queue& queue); +GpsL1CaPcpsOpenClAcquisitionGSoC2013Test_msg_rx_sptr GpsL1CaPcpsOpenClAcquisitionGSoC2013Test_msg_rx_make(Concurrent_Queue& queue); class GpsL1CaPcpsOpenClAcquisitionGSoC2013Test_msg_rx : public gr::block { private: - friend GpsL1CaPcpsOpenClAcquisitionGSoC2013Test_msg_rx_sptr GpsL1CaPcpsOpenClAcquisitionGSoC2013Test_msg_rx_make(concurrent_queue& queue); + friend GpsL1CaPcpsOpenClAcquisitionGSoC2013Test_msg_rx_sptr GpsL1CaPcpsOpenClAcquisitionGSoC2013Test_msg_rx_make(Concurrent_Queue& queue); void msg_handler_events(pmt::pmt_t msg); - GpsL1CaPcpsOpenClAcquisitionGSoC2013Test_msg_rx(concurrent_queue& queue); - concurrent_queue& channel_internal_queue; + GpsL1CaPcpsOpenClAcquisitionGSoC2013Test_msg_rx(Concurrent_Queue& queue); + Concurrent_Queue& channel_internal_queue; public: int rx_message; @@ -77,7 +77,7 @@ public: }; -GpsL1CaPcpsOpenClAcquisitionGSoC2013Test_msg_rx_sptr GpsL1CaPcpsOpenClAcquisitionGSoC2013Test_msg_rx_make(concurrent_queue& queue) +GpsL1CaPcpsOpenClAcquisitionGSoC2013Test_msg_rx_sptr GpsL1CaPcpsOpenClAcquisitionGSoC2013Test_msg_rx_make(Concurrent_Queue& queue) { return GpsL1CaPcpsOpenClAcquisitionGSoC2013Test_msg_rx_sptr(new GpsL1CaPcpsOpenClAcquisitionGSoC2013Test_msg_rx(queue)); } @@ -99,7 +99,7 @@ void GpsL1CaPcpsOpenClAcquisitionGSoC2013Test_msg_rx::msg_handler_events(pmt::pm } -GpsL1CaPcpsOpenClAcquisitionGSoC2013Test_msg_rx::GpsL1CaPcpsOpenClAcquisitionGSoC2013Test_msg_rx(concurrent_queue& queue) : gr::block("GpsL1CaPcpsOpenClAcquisitionGSoC2013Test_msg_rx", gr::io_signature::make(0, 0, 0), gr::io_signature::make(0, 0, 0)), channel_internal_queue(queue) +GpsL1CaPcpsOpenClAcquisitionGSoC2013Test_msg_rx::GpsL1CaPcpsOpenClAcquisitionGSoC2013Test_msg_rx(Concurrent_Queue& queue) : gr::block("GpsL1CaPcpsOpenClAcquisitionGSoC2013Test_msg_rx", gr::io_signature::make(0, 0, 0), gr::io_signature::make(0, 0, 0)), channel_internal_queue(queue) { this->message_port_register_in(pmt::mp("events")); this->set_msg_handler(pmt::mp("events"), boost::bind(&GpsL1CaPcpsOpenClAcquisitionGSoC2013Test_msg_rx::msg_handler_events, this, _1)); @@ -139,7 +139,7 @@ protected: void process_message(); void stop_queue(); - concurrent_queue channel_internal_queue; + Concurrent_Queue channel_internal_queue; gr::msg_queue::sptr queue; gr::top_block_sptr top_block; std::shared_ptr acquisition; From dddf6dedb37ce3d15ad579bb0521eda478953117 Mon Sep 17 00:00:00 2001 From: Gerald LaMountain Date: Mon, 20 May 2019 12:42:43 -0400 Subject: [PATCH 3/6] Add refs to tracking lib for bayesian estimation --- src/algorithms/tracking/libs/bayesian_estimation.cc | 7 ++++++- src/algorithms/tracking/libs/bayesian_estimation.h | 7 ++++++- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/src/algorithms/tracking/libs/bayesian_estimation.cc b/src/algorithms/tracking/libs/bayesian_estimation.cc index 227cd6321..73ab4cd3e 100644 --- a/src/algorithms/tracking/libs/bayesian_estimation.cc +++ b/src/algorithms/tracking/libs/bayesian_estimation.cc @@ -6,7 +6,12 @@ * the properties of a stochastic process based on a sequence of * discrete samples of the sequence. * - * [1] TODO: Refs + * [1]: LaMountain, Gerald, Vilà-Valls, Jordi, Closas, Pau, "Bayesian + * Covariance Estimation for Kalman Filter based Digital Carrier + * Synchronization," Proceedings of the 31st International Technical Meeting + * of the Satellite Division of The Institute of Navigation + * (ION GNSS+ 2018), Miami, Florida, September 2018, pp. 3575-3586. + * https://doi.org/10.33012/2018.15911 * * \authors
    *
  • Gerald LaMountain, 2018. gerald(at)ece.neu.edu diff --git a/src/algorithms/tracking/libs/bayesian_estimation.h b/src/algorithms/tracking/libs/bayesian_estimation.h index 02f54143e..001b19fcd 100644 --- a/src/algorithms/tracking/libs/bayesian_estimation.h +++ b/src/algorithms/tracking/libs/bayesian_estimation.h @@ -6,7 +6,12 @@ * the properties of a stochastic process based on a sequence of * discrete samples of the sequence. * - * [1] TODO: Refs + * [1]: LaMountain, Gerald, Vilà-Valls, Jordi, Closas, Pau, "Bayesian + * Covariance Estimation for Kalman Filter based Digital Carrier + * Synchronization," Proceedings of the 31st International Technical Meeting + * of the Satellite Division of The Institute of Navigation + * (ION GNSS+ 2018), Miami, Florida, September 2018, pp. 3575-3586. + * https://doi.org/10.33012/2018.15911 * * \authors
      *
    • Gerald LaMountain, 2018. gerald(at)ece.neu.edu From 8b77576166c8aca8c74a112a5eef8409c3bf2527 Mon Sep 17 00:00:00 2001 From: Javier Arribas Date: Tue, 21 May 2019 12:10:22 +0200 Subject: [PATCH 4/6] Adding missing factor in CN0 estimator --- src/algorithms/tracking/libs/lock_detectors.cc | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/algorithms/tracking/libs/lock_detectors.cc b/src/algorithms/tracking/libs/lock_detectors.cc index 6633b893a..c4c941bdf 100644 --- a/src/algorithms/tracking/libs/lock_detectors.cc +++ b/src/algorithms/tracking/libs/lock_detectors.cc @@ -60,11 +60,12 @@ * * The SNR value is converted to CN0 [dB-Hz], taking to account the coherent integration time, using the following formula: * \f{equation} - * CN0_{dB}=10*log(\hat{\rho})-10*log(T_{int}), + * CN0_{dB}=10*log(\hat{\rho})-10*log(2*T_{int}), * \f} * where \f$T_{int}\f$ is the coherent integration time, in seconds. * */ + float cn0_svn_estimator(const gr_complex* Prompt_buffer, int length, float coh_integration_time_s) { float SNR = 0.0; @@ -80,7 +81,7 @@ float cn0_svn_estimator(const gr_complex* Prompt_buffer, int length, float coh_i Psig = Psig * Psig; Ptot /= static_cast(length); SNR = Psig / (Ptot - Psig); - SNR_dB_Hz = 10.0 * std::log10(SNR) - 10.0 * std::log10(coh_integration_time_s); + SNR_dB_Hz = 10.0 * std::log10(SNR) - 10.0 * std::log10(2.0 * coh_integration_time_s); return SNR_dB_Hz; } From 5c9bb663794fc2fdbaa9c9f1d9101b0484884dbd Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Wed, 22 May 2019 13:23:21 +0200 Subject: [PATCH 5/6] Revert "Adding missing factor in CN0 estimator" This reverts commit 8b77576166c8aca8c74a112a5eef8409c3bf2527. --- src/algorithms/tracking/libs/lock_detectors.cc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/algorithms/tracking/libs/lock_detectors.cc b/src/algorithms/tracking/libs/lock_detectors.cc index c4c941bdf..6633b893a 100644 --- a/src/algorithms/tracking/libs/lock_detectors.cc +++ b/src/algorithms/tracking/libs/lock_detectors.cc @@ -60,12 +60,11 @@ * * The SNR value is converted to CN0 [dB-Hz], taking to account the coherent integration time, using the following formula: * \f{equation} - * CN0_{dB}=10*log(\hat{\rho})-10*log(2*T_{int}), + * CN0_{dB}=10*log(\hat{\rho})-10*log(T_{int}), * \f} * where \f$T_{int}\f$ is the coherent integration time, in seconds. * */ - float cn0_svn_estimator(const gr_complex* Prompt_buffer, int length, float coh_integration_time_s) { float SNR = 0.0; @@ -81,7 +80,7 @@ float cn0_svn_estimator(const gr_complex* Prompt_buffer, int length, float coh_i Psig = Psig * Psig; Ptot /= static_cast(length); SNR = Psig / (Ptot - Psig); - SNR_dB_Hz = 10.0 * std::log10(SNR) - 10.0 * std::log10(2.0 * coh_integration_time_s); + SNR_dB_Hz = 10.0 * std::log10(SNR) - 10.0 * std::log10(coh_integration_time_s); return SNR_dB_Hz; } From d13e00ba502462e4b498b7fcc0dc9f965df48edf Mon Sep 17 00:00:00 2001 From: Carles Fernandez Date: Wed, 22 May 2019 13:24:41 +0200 Subject: [PATCH 6/6] Fix documentation --- src/algorithms/tracking/libs/lock_detectors.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/algorithms/tracking/libs/lock_detectors.h b/src/algorithms/tracking/libs/lock_detectors.h index 81d54b651..3f1750e15 100644 --- a/src/algorithms/tracking/libs/lock_detectors.h +++ b/src/algorithms/tracking/libs/lock_detectors.h @@ -64,7 +64,7 @@ * * The SNR value is converted to CN0 [dB-Hz], taking to account the coherent integration time, using the following formula: * \f{equation} - * CN0_{dB}=10*log(\hat{\rho})-10*log(2 * T_{int}), + * CN0_{dB}=10*log(\hat{\rho})-10*log(T_{int}), * \f} * where \f$T_{int}\f$ is the coherent integration time, in seconds. * Ref: Marco Pini, Emanuela Falletti and Maurizio Fantino, "Performance