mirror of
https://github.com/gnss-sdr/gnss-sdr
synced 2024-12-15 04:30:33 +00:00
Merge branch 'next' of https://github.com/carlesfernandez/gnss-sdr into next
This commit is contained in:
commit
7f0b11ce3d
@ -18,6 +18,7 @@ Checks: '-*,
|
||||
misc-static-assert,
|
||||
misc-throw-by-value-catch-by-reference,
|
||||
misc-uniqueptr-reset-release,
|
||||
misc-unused-using-decls,
|
||||
modernize-loop-convert,
|
||||
modernize-pass-by-value,
|
||||
modernize-raw-string-literal,
|
||||
|
@ -51,6 +51,8 @@ target_link_libraries(input_filter_adapters
|
||||
input_filter_gr_blocks
|
||||
algorithms_libs
|
||||
PRIVATE
|
||||
Gflags::gflags
|
||||
Glog::glog
|
||||
Volk::volk
|
||||
)
|
||||
|
||||
|
@ -46,8 +46,6 @@ target_link_libraries(input_filter_gr_blocks
|
||||
Gnuradio::filter
|
||||
Volkgnsssdr::volkgnsssdr
|
||||
PRIVATE
|
||||
Gflags::gflags
|
||||
Glog::glog
|
||||
Log4cpp::log4cpp
|
||||
)
|
||||
|
||||
|
@ -30,13 +30,11 @@
|
||||
|
||||
#include "notch_cc.h"
|
||||
#include <boost/math/distributions/chi_squared.hpp>
|
||||
#include <glog/logging.h>
|
||||
#include <gnuradio/io_signature.h>
|
||||
#include <volk/volk.h>
|
||||
#include <cmath>
|
||||
#include <cstring>
|
||||
|
||||
using google::LogMessage;
|
||||
|
||||
notch_sptr make_notch_filter(float pfa, float p_c_factor,
|
||||
int32_t length_, int32_t n_segments_est, int32_t n_segments_reset)
|
||||
|
@ -30,13 +30,11 @@
|
||||
|
||||
#include "notch_lite_cc.h"
|
||||
#include <boost/math/distributions/chi_squared.hpp>
|
||||
#include <glog/logging.h>
|
||||
#include <gnuradio/io_signature.h>
|
||||
#include <volk/volk.h>
|
||||
#include <cmath>
|
||||
#include <cstring>
|
||||
|
||||
using google::LogMessage;
|
||||
|
||||
notch_lite_sptr make_notch_filter_lite(float p_c_factor, float pfa, int32_t length_, int32_t n_segments_est, int32_t n_segments_reset, int32_t n_segments_coeff)
|
||||
{
|
||||
|
@ -30,12 +30,10 @@
|
||||
|
||||
#include "pulse_blanking_cc.h"
|
||||
#include <boost/math/distributions/chi_squared.hpp>
|
||||
#include <glog/logging.h>
|
||||
#include <gnuradio/io_signature.h>
|
||||
#include <volk/volk.h>
|
||||
#include <cmath>
|
||||
|
||||
using google::LogMessage;
|
||||
|
||||
pulse_blanking_cc_sptr make_pulse_blanking_cc(float pfa, int32_t length_,
|
||||
int32_t n_segments_est, int32_t n_segments_reset)
|
||||
|
@ -119,7 +119,7 @@ void gps_l2c_m_code_gen_complex_sampled(std::complex<float>* _dest, uint32_t _pr
|
||||
|
||||
//--- Make index array to read L2C code values -------------------------
|
||||
//TODO: Check this formula! Seems to start with an extra sample
|
||||
_codeValueIndex = ceil((_ts * (static_cast<float>(i) + 1)) / _tc) - 1;
|
||||
_codeValueIndex = std::ceil((_ts * (static_cast<float>(i) + 1)) / _tc) - 1;
|
||||
//aux = (_ts * (i + 1)) / _tc;
|
||||
//_codeValueIndex = static_cast<int32_t>(static_cast<long>(aux)) - 1;
|
||||
|
||||
|
@ -240,7 +240,7 @@ void gps_l5i_code_gen_complex_sampled(std::complex<float>* _dest, uint32_t _prn,
|
||||
|
||||
//--- Make index array to read L5 code values -------------------------
|
||||
//TODO: Check this formula! Seems to start with an extra sample
|
||||
_codeValueIndex = ceil((_ts * (static_cast<float>(i) + 1)) / _tc) - 1;
|
||||
_codeValueIndex = std::ceil((_ts * (static_cast<float>(i) + 1)) / _tc) - 1;
|
||||
//aux = (_ts * (i + 1)) / _tc;
|
||||
//_codeValueIndex = static_cast<int32_t> (static_cast<long>(aux)) - 1;
|
||||
|
||||
@ -325,7 +325,7 @@ void gps_l5q_code_gen_complex_sampled(std::complex<float>* _dest, uint32_t _prn,
|
||||
|
||||
//--- Make index array to read L5 code values -------------------------
|
||||
//TODO: Check this formula! Seems to start with an extra sample
|
||||
_codeValueIndex = ceil((_ts * (static_cast<float>(i) + 1)) / _tc) - 1;
|
||||
_codeValueIndex = std::ceil((_ts * (static_cast<float>(i) + 1)) / _tc) - 1;
|
||||
//aux = (_ts * (i + 1)) / _tc;
|
||||
//_codeValueIndex = static_cast<int32_t> (static_cast<long>(aux)) - 1;
|
||||
|
||||
|
@ -43,9 +43,6 @@ target_link_libraries(resampler_gr_blocks
|
||||
PUBLIC
|
||||
Gnuradio::runtime
|
||||
Volk::volk
|
||||
PRIVATE
|
||||
Gflags::gflags
|
||||
Glog::glog
|
||||
)
|
||||
|
||||
if(ENABLE_CLANG_TIDY)
|
||||
|
@ -33,12 +33,9 @@
|
||||
|
||||
|
||||
#include "direct_resampler_conditioner_cb.h"
|
||||
#include <glog/logging.h>
|
||||
#include <gnuradio/io_signature.h>
|
||||
|
||||
|
||||
using google::LogMessage;
|
||||
|
||||
direct_resampler_conditioner_cb_sptr direct_resampler_make_conditioner_cb(
|
||||
double sample_freq_in, double sample_freq_out)
|
||||
{
|
||||
|
@ -37,8 +37,6 @@
|
||||
#include <gnuradio/io_signature.h>
|
||||
|
||||
|
||||
using google::LogMessage;
|
||||
|
||||
direct_resampler_conditioner_cc_sptr direct_resampler_make_conditioner_cc(
|
||||
double sample_freq_in, double sample_freq_out)
|
||||
{
|
||||
|
@ -33,10 +33,8 @@
|
||||
|
||||
|
||||
#include "direct_resampler_conditioner_cs.h"
|
||||
#include <glog/logging.h>
|
||||
#include <gnuradio/io_signature.h>
|
||||
|
||||
using google::LogMessage;
|
||||
|
||||
direct_resampler_conditioner_cs_sptr direct_resampler_make_conditioner_cs(
|
||||
double sample_freq_in, double sample_freq_out)
|
||||
@ -49,7 +47,9 @@ direct_resampler_conditioner_cs_sptr direct_resampler_make_conditioner_cs(
|
||||
|
||||
direct_resampler_conditioner_cs::direct_resampler_conditioner_cs(
|
||||
double sample_freq_in,
|
||||
double sample_freq_out) : gr::block("direct_resampler_make_conditioner_cs", gr::io_signature::make(1, 1, sizeof(lv_16sc_t)), gr::io_signature::make(1, 1, sizeof(lv_16sc_t))),
|
||||
double sample_freq_out) : gr::block("direct_resampler_make_conditioner_cs",
|
||||
gr::io_signature::make(1, 1, sizeof(lv_16sc_t)),
|
||||
gr::io_signature::make(1, 1, sizeof(lv_16sc_t))),
|
||||
d_sample_freq_in(sample_freq_in),
|
||||
d_sample_freq_out(sample_freq_out),
|
||||
d_phase(0),
|
||||
|
@ -321,8 +321,8 @@ int Galileo_E1_Tcp_Connector_Tracking_cc::general_work(int noutput_items __attri
|
||||
float acq_trk_shif_correction_samples;
|
||||
int32_t acq_to_trk_delay_samples;
|
||||
acq_to_trk_delay_samples = d_sample_counter - d_acq_sample_stamp;
|
||||
acq_trk_shif_correction_samples = d_current_prn_length_samples - fmod(static_cast<float>(acq_to_trk_delay_samples), static_cast<float>(d_current_prn_length_samples));
|
||||
samples_offset = round(d_acq_code_phase_samples + acq_trk_shif_correction_samples);
|
||||
acq_trk_shif_correction_samples = d_current_prn_length_samples - std::fmod(static_cast<float>(acq_to_trk_delay_samples), static_cast<float>(d_current_prn_length_samples));
|
||||
samples_offset = std::round(d_acq_code_phase_samples + acq_trk_shif_correction_samples);
|
||||
current_synchro_data.Tracking_sample_counter = d_sample_counter + static_cast<uint64_t>(samples_offset);
|
||||
current_synchro_data.fs = d_fs_in;
|
||||
*out[0] = current_synchro_data;
|
||||
|
@ -574,7 +574,7 @@ int Glonass_L1_Ca_Dll_Pll_Tracking_cc::general_work(int noutput_items __attribut
|
||||
double acq_trk_shif_correction_samples;
|
||||
int32_t acq_to_trk_delay_samples;
|
||||
acq_to_trk_delay_samples = d_sample_counter - d_acq_sample_stamp;
|
||||
acq_trk_shif_correction_samples = d_current_prn_length_samples - fmod(static_cast<float>(acq_to_trk_delay_samples), static_cast<float>(d_current_prn_length_samples));
|
||||
acq_trk_shif_correction_samples = d_current_prn_length_samples - std::fmod(static_cast<float>(acq_to_trk_delay_samples), static_cast<float>(d_current_prn_length_samples));
|
||||
samples_offset = round(d_acq_code_phase_samples + acq_trk_shif_correction_samples);
|
||||
current_synchro_data.Tracking_sample_counter = d_sample_counter + static_cast<uint64_t>(samples_offset);
|
||||
d_sample_counter = d_sample_counter + static_cast<uint64_t>(samples_offset); // count for the processed samples
|
||||
|
@ -574,7 +574,7 @@ int Glonass_L2_Ca_Dll_Pll_Tracking_cc::general_work(int noutput_items __attribut
|
||||
double acq_trk_shif_correction_samples;
|
||||
int32_t acq_to_trk_delay_samples;
|
||||
acq_to_trk_delay_samples = d_sample_counter - d_acq_sample_stamp;
|
||||
acq_trk_shif_correction_samples = d_current_prn_length_samples - fmod(static_cast<float>(acq_to_trk_delay_samples), static_cast<float>(d_current_prn_length_samples));
|
||||
acq_trk_shif_correction_samples = d_current_prn_length_samples - std::fmod(static_cast<float>(acq_to_trk_delay_samples), static_cast<float>(d_current_prn_length_samples));
|
||||
samples_offset = round(d_acq_code_phase_samples + acq_trk_shif_correction_samples);
|
||||
current_synchro_data.Tracking_sample_counter = d_sample_counter + static_cast<uint64_t>(samples_offset);
|
||||
d_sample_counter = d_sample_counter + static_cast<uint64_t>(samples_offset); // count for the processed samples
|
||||
|
@ -204,7 +204,7 @@ void Gps_L1_Ca_Tcp_Connector_Tracking_cc::start_tracking()
|
||||
T_prn_mod_seconds = T_chip_mod_seconds * GPS_L1_CA_CODE_LENGTH_CHIPS;
|
||||
T_prn_mod_samples = T_prn_mod_seconds * static_cast<float>(d_fs_in);
|
||||
|
||||
d_next_prn_length_samples = round(T_prn_mod_samples);
|
||||
d_next_prn_length_samples = std::round(T_prn_mod_samples);
|
||||
|
||||
float T_prn_true_seconds = GPS_L1_CA_CODE_LENGTH_CHIPS / GPS_L1_CA_CODE_RATE_HZ;
|
||||
float T_prn_true_samples = T_prn_true_seconds * static_cast<float>(d_fs_in);
|
||||
@ -213,7 +213,7 @@ void Gps_L1_Ca_Tcp_Connector_Tracking_cc::start_tracking()
|
||||
float N_prn_diff;
|
||||
N_prn_diff = acq_trk_diff_seconds / T_prn_true_seconds;
|
||||
float corrected_acq_phase_samples, delay_correction_samples;
|
||||
corrected_acq_phase_samples = fmod((d_acq_code_phase_samples + T_prn_diff_seconds * N_prn_diff * static_cast<float>(d_fs_in)), T_prn_true_samples);
|
||||
corrected_acq_phase_samples = std::fmod((d_acq_code_phase_samples + T_prn_diff_seconds * N_prn_diff * static_cast<float>(d_fs_in)), T_prn_true_samples);
|
||||
if (corrected_acq_phase_samples < 0)
|
||||
{
|
||||
corrected_acq_phase_samples = T_prn_mod_samples + corrected_acq_phase_samples;
|
||||
@ -357,8 +357,8 @@ int Gps_L1_Ca_Tcp_Connector_Tracking_cc::general_work(int noutput_items __attrib
|
||||
float acq_trk_shif_correction_samples;
|
||||
int32_t acq_to_trk_delay_samples;
|
||||
acq_to_trk_delay_samples = d_sample_counter - d_acq_sample_stamp;
|
||||
acq_trk_shif_correction_samples = d_next_prn_length_samples - fmod(static_cast<float>(acq_to_trk_delay_samples), static_cast<float>(d_next_prn_length_samples));
|
||||
samples_offset = round(d_acq_code_phase_samples + acq_trk_shif_correction_samples);
|
||||
acq_trk_shif_correction_samples = d_next_prn_length_samples - std::fmod(static_cast<float>(acq_to_trk_delay_samples), static_cast<float>(d_next_prn_length_samples));
|
||||
samples_offset = std::round(d_acq_code_phase_samples + acq_trk_shif_correction_samples);
|
||||
current_synchro_data.Tracking_sample_counter = d_sample_counter + static_cast<uint64_t>(samples_offset);
|
||||
current_synchro_data.fs = d_fs_in;
|
||||
*out[0] = current_synchro_data;
|
||||
|
@ -64,7 +64,7 @@ double fll_four_quadrant_atan(gr_complex prompt_s1, gr_complex prompt_s2, double
|
||||
*/
|
||||
double pll_four_quadrant_atan(gr_complex prompt_s1)
|
||||
{
|
||||
return atan2(prompt_s1.imag(), prompt_s1.real());
|
||||
return static_cast<double>(std::atan2(prompt_s1.imag(), prompt_s1.real()));
|
||||
}
|
||||
|
||||
|
||||
@ -79,7 +79,7 @@ double pll_cloop_two_quadrant_atan(gr_complex prompt_s1)
|
||||
{
|
||||
if (prompt_s1.real() != 0.0)
|
||||
{
|
||||
return atan(prompt_s1.imag() / prompt_s1.real());
|
||||
return static_cast<double>(std::atan(prompt_s1.imag() / prompt_s1.real()));
|
||||
}
|
||||
return 0.0;
|
||||
}
|
||||
|
@ -241,7 +241,7 @@ if(ENABLE_UNIT_TESTING_EXTRA OR ENABLE_SYSTEM_TESTING_EXTRA OR ENABLE_FPGA)
|
||||
################################################################################
|
||||
find_package(GPSTK)
|
||||
if(NOT GPSTK_FOUND OR ENABLE_OWN_GPSTK)
|
||||
message(STATUS "GPSTk v${GNSSSDR_GPSTK_LOCAL_VERSION} will be automatically downloaded and built when doing 'make'.")
|
||||
message(STATUS " GPSTk v${GNSSSDR_GPSTK_LOCAL_VERSION} will be automatically downloaded and built when doing 'make'.")
|
||||
if("${TOOLCHAIN_ARG}" STREQUAL "")
|
||||
set(TOOLCHAIN_ARG "-DCMAKE_CXX_FLAGS=\"-Wno-deprecated\"")
|
||||
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wno-deprecated")
|
||||
@ -404,6 +404,14 @@ if(ENABLE_UNIT_TESTING)
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
if(ENABLE_CLANG_TIDY)
|
||||
if(CLANG_TIDY_EXE)
|
||||
set_target_properties(run_tests
|
||||
PROPERTIES
|
||||
CXX_CLANG_TIDY "${DO_CLANG_TIDY}"
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
if(ENABLE_CUDA)
|
||||
target_link_libraries(run_tests
|
||||
PUBLIC
|
||||
@ -476,6 +484,14 @@ function(add_system_test executable)
|
||||
COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:${executable}>
|
||||
${CMAKE_SOURCE_DIR}/install/$<TARGET_FILE_NAME:${executable}>)
|
||||
endif()
|
||||
if(ENABLE_CLANG_TIDY)
|
||||
if(CLANG_TIDY_EXE)
|
||||
set_target_properties(${executable}
|
||||
PROPERTIES
|
||||
CXX_CLANG_TIDY "${DO_CLANG_TIDY}"
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
endfunction()
|
||||
|
||||
|
||||
|
@ -2003,7 +2003,7 @@ void Gnuplot::init()
|
||||
// whose name is specified as argument. If the requested variable is not
|
||||
// part of the environment list, the function returns a NULL pointer.
|
||||
#if (defined(unix) || defined(__unix) || defined(__unix__)) && !defined(__APPLE__)
|
||||
if (std::getenv("DISPLAY") == NULL)
|
||||
if (std::getenv("DISPLAY") == nullptr)
|
||||
{
|
||||
valid = false;
|
||||
throw GnuplotException("Can't find DISPLAY variable");
|
||||
|
@ -41,6 +41,15 @@ target_link_libraries(system_testing_lib
|
||||
Matio::matio
|
||||
)
|
||||
|
||||
if(ENABLE_CLANG_TIDY)
|
||||
if(CLANG_TIDY_EXE)
|
||||
set_target_properties(system_testing_lib
|
||||
PROPERTIES
|
||||
CXX_CLANG_TIDY "${DO_CLANG_TIDY}"
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set_property(TARGET system_testing_lib
|
||||
APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
|
||||
|
@ -48,6 +48,15 @@ target_link_libraries(signal_processing_testing_lib
|
||||
Glog::glog
|
||||
)
|
||||
|
||||
if(ENABLE_CLANG_TIDY)
|
||||
if(CLANG_TIDY_EXE)
|
||||
set_target_properties(signal_processing_testing_lib
|
||||
PROPERTIES
|
||||
CXX_CLANG_TIDY "${DO_CLANG_TIDY}"
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
set_property(TARGET signal_processing_testing_lib
|
||||
APPEND PROPERTY INTERFACE_INCLUDE_DIRECTORIES
|
||||
$<BUILD_INTERFACE:${CMAKE_CURRENT_SOURCE_DIR}>
|
||||
|
@ -46,6 +46,15 @@ target_link_libraries(front_end_cal_lib
|
||||
Boost::thread
|
||||
)
|
||||
|
||||
if(ENABLE_CLANG_TIDY)
|
||||
if(CLANG_TIDY_EXE)
|
||||
set_target_properties(front_end_cal_lib
|
||||
PROPERTIES
|
||||
CXX_CLANG_TIDY "${DO_CLANG_TIDY}"
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
add_executable(front-end-cal ${CMAKE_CURRENT_SOURCE_DIR}/main.cc)
|
||||
|
||||
target_link_libraries(front-end-cal
|
||||
@ -65,6 +74,15 @@ target_compile_definitions(front-end-cal
|
||||
PUBLIC -DGNSSSDR_INSTALL_DIR="${CMAKE_INSTALL_PREFIX}"
|
||||
)
|
||||
|
||||
if(ENABLE_CLANG_TIDY)
|
||||
if(CLANG_TIDY_EXE)
|
||||
set_target_properties(front-end-cal
|
||||
PROPERTIES
|
||||
CXX_CLANG_TIDY "${DO_CLANG_TIDY}"
|
||||
)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
add_custom_command(TARGET front-end-cal POST_BUILD
|
||||
COMMAND ${CMAKE_COMMAND} -E copy $<TARGET_FILE:front-end-cal>
|
||||
${CMAKE_SOURCE_DIR}/install/$<TARGET_FILE_NAME:front-end-cal>)
|
||||
|
Loading…
Reference in New Issue
Block a user