1
0
mirror of https://github.com/gnss-sdr/gnss-sdr synced 2026-04-23 07:11:25 +00:00

Handle change in GNU Radio FFT API

This commit is contained in:
Carles Fernandez
2020-11-04 09:32:00 +01:00
parent e192feba3a
commit 0880b04649
26 changed files with 172 additions and 34 deletions

View File

@@ -63,6 +63,13 @@ if(GNURADIO_USES_STD_POINTERS)
)
endif()
if(GNURADIO_FFT_USES_TEMPLATES)
target_compile_definitions(input_filter_gr_blocks
PUBLIC -DGNURADIO_FFT_USES_TEMPLATES=1
)
endif()
if(ENABLE_CLANG_TIDY)
if(CLANG_TIDY_EXE)
set_target_properties(input_filter_gr_blocks

View File

@@ -60,7 +60,11 @@ Notch::Notch(float pfa,
angle_ = volk_gnsssdr::vector<float>(length_);
power_spect_ = volk_gnsssdr::vector<float>(length_);
last_out_ = gr_complex(0.0, 0.0);
#if GNURADIO_FFT_USES_TEMPLATES
d_fft_ = std::make_unique<gr::fft::fft_complex_fwd>(length_);
#else
d_fft_ = std::make_unique<gr::fft::fft_complex>(length_, true);
#endif
}

View File

@@ -59,7 +59,11 @@ public:
private:
friend notch_sptr make_notch_filter(float pfa, float p_c_factor, int32_t length, int32_t n_segments_est, int32_t n_segments_reset);
Notch(float pfa, float p_c_factor, int32_t length, int32_t n_segments_est, int32_t n_segments_reset);
#if GNURADIO_FFT_USES_TEMPLATES
std::unique_ptr<gr::fft::fft_complex_fwd> d_fft_;
#else
std::unique_ptr<gr::fft::fft_complex> d_fft_;
#endif
volk_gnsssdr::vector<gr_complex> c_samples_;
volk_gnsssdr::vector<float> angle_;
volk_gnsssdr::vector<float> power_spect_;

View File

@@ -65,7 +65,11 @@ NotchLite::NotchLite(float p_c_factor,
angle1_ = 0.0;
angle2_ = 0.0;
power_spect_ = volk_gnsssdr::vector<float>(length_);
#if GNURADIO_FFT_USES_TEMPLATES
d_fft_ = std::make_unique<gr::fft::fft_complex_fwd>(length_);
#else
d_fft_ = std::make_unique<gr::fft::fft_complex>(length_, true);
#endif
}

View File

@@ -60,7 +60,11 @@ public:
private:
friend 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);
NotchLite(float p_c_factor, float pfa, int32_t length, int32_t n_segments_est, int32_t n_segments_reset, int32_t n_segments_coeff);
#if GNURADIO_FFT_USES_TEMPLATES
std::unique_ptr<gr::fft::fft_complex_fwd> d_fft_;
#else
std::unique_ptr<gr::fft::fft_complex> d_fft_;
#endif
volk_gnsssdr::vector<float> power_spect_;
gr_complex last_out_;
gr_complex z_0_;