Re: Are there firls and kaiser filter methods for C++ OOT?

2022-02-23 Thread GNU Radio, the Free & Open-Source Toolkit for Software Radio
Hi George, You are welcome. > Q1. If I write a line of code to extract the remez taps, say: >lpfilter = > gr::filter::pm_remez ( int order, > const std::vector< double > & bands, > const std::vector< double > & ampl, > const std::vector< double > & error_weight, > const std::string

Re: Are there firls and kaiser filter methods for C++ OOT?

2022-02-23 Thread George Edwards
Hi Marcin, Thank you very much! I found my error, I forgot the "gain" which is the first parameter to the filter. The first parameter I wrote in the filter method was the "sample_rate" (which was a large number), hence the filter function could not converge. It is all good now, thank you. I have

Re: Are there firls and kaiser filter methods for C++ OOT?

2022-02-23 Thread GNU Radio, the Free & Open-Source Toolkit for Software Radio
George, Running the below code: *#include #include using namespace std;int main() { cout << "!!!Hello World!!!" << endl; // prints !!!Hello World!!! std::vector taps = gr::filter::firdes::low_pass(1, 1, 0.3, 0.1); for(int i = 0; i < taps.size(); i++) cout << "tap " << i << ":" << "\t"

Re: Are there firls and kaiser filter methods for C++ OOT?

2022-02-22 Thread George Edwards
Hi Marcin and Vasil, Thank you guys very much! Marcin: I did as you suggested and left out win_type and beta. Vasil: Based on the conversation exchanges between you Marcin, I followed your suggestion to link in the gnuradio-filter library - in lib/CMakeLists.txt in target_link_libraries() by

Re: Are there firls and kaiser filter methods for C++ OOT?

2022-02-22 Thread GNU Radio, the Free & Open-Source Toolkit for Software Radio
Geroge, I posted the working code a few messages ago. Try to check this out. BTW as far as I can see those two arguments are optional (window type and beta). Try to run your code without them and check if it works. wt., 22 lut 2022 o 19:25 George Edwards napisał(a): > Hello Vasil and Marcin, >

Re: Are there firls and kaiser filter methods for C++ OOT?

2022-02-22 Thread George Edwards
Hello Vasil and Marcin, Thanks very much for your help. I have all the relevant #include header files and invoke the low_pass filter as follows: lpfilter = gr::filter::firdes::low_pass(gain, sampling_freq, cutoff_freq, transition_bandwidth, fft::window::win_type::WIN_HAMMING, beta);

Re: Are there firls and kaiser filter methods for C++ OOT?

2022-02-22 Thread GNU Radio, the Free & Open-Source Toolkit for Software Radio
That's strange, in this order it doesn't work for me. Thank you anyways :) Marcin wt., 22 lut 2022 o 14:47 Vasil Velichkov napisał(a): > On 22/02/2022 15.39, Marcin Puchlik wrote: > > So while running: *g++ -gnuradio-filter main.cpp* I get: > > You are missing an l between - and gnuradio > >

Re: Are there firls and kaiser filter methods for C++ OOT?

2022-02-22 Thread Vasil Velichkov
On 22/02/2022 15.39, Marcin Puchlik wrote: > So while running: *g++ -gnuradio-filter main.cpp* I get: You are missing an l between - and gnuradio > */bin/ld: /tmp/ccChkcfC.o: in function `main':main.cpp:(.text+0x8d): > undefined reference to `gr::filter::firdes::low_pass(double, double, >

Re: Are there firls and kaiser filter methods for C++ OOT?

2022-02-22 Thread Vasil Velichkov
On 22/02/2022 15.31, Marcin Puchlik wrote: > You are right, it helped thank you. You are welcome. > One more question, do you know why the command: *g++ main.cpp > -lgnuradio-filter *works correctly but in different order: *g++ > -lgnuradio-filter main.cpp* crashes? No idea. Give me the full

Re: Are there firls and kaiser filter methods for C++ OOT?

2022-02-22 Thread GNU Radio, the Free & Open-Source Toolkit for Software Radio
So while running: *g++ -gnuradio-filter main.cpp* I get: */bin/ld: /tmp/ccChkcfC.o: in function `main':main.cpp:(.text+0x8d): undefined reference to `gr::filter::firdes::low_pass(double, double, double, double, gr::fft::window::win_type, double)'collect2: error: ld returned 1 exit status*

Re: Are there firls and kaiser filter methods for C++ OOT?

2022-02-22 Thread GNU Radio, the Free & Open-Source Toolkit for Software Radio
Hi Vasil, You are right, it helped thank you. One more question, do you know why the command: *g++ main.cpp -lgnuradio-filter *works correctly but in different order: *g++ -lgnuradio-filter main.cpp* crashes? wt., 22 lut 2022 o 14:19 Vasil Velichkov napisał(a): > Hi Marcin, > > On 22/02/2022

Re: Are there firls and kaiser filter methods for C++ OOT?

2022-02-22 Thread Vasil Velichkov
Hi Marcin, On 22/02/2022 14.32, Marcin Puchlik wrote: > But I am not creating the OOT module, I want to get filter taps using > *low_pass()* function in simple C++ program (Hello World). It does not really matter what you are building, if you want to use this function then you need to link

Re: Are there firls and kaiser filter methods for C++ OOT?

2022-02-22 Thread GNU Radio, the Free & Open-Source Toolkit for Software Radio
Hi Vasil, But I am not creating the OOT module, I want to get filter taps using *low_pass()* function in simple C++ program (Hello World). I just want to link gnuradio library and use its function in custom C++ program, here is the code of main.cpp: #include #include #include #include using

Re: Are there firls and kaiser filter methods for C++ OOT?

2022-02-22 Thread Vasil Velichkov
Hi Marcin, On 22/02/2022 13.09, Marcin Puchlik via GNU Radio, the Free & Open-Source Toolkit for Software Radio wrote: > I also tried to use *low_pass() *function in my C++ program but with no > luck. My linker shouts that there is undefined reference to this function > but headers where

Re: Are there firls and kaiser filter methods for C++ OOT?

2022-02-22 Thread Vasil Velichkov
Hi George, On 21/02/2022 18.31, George Edwards wrote: > lpfilter = gr::filter::firdes::low_pass(gain, sampling_freq, cutoff_freq, > transition_bandwidth, > fft::window::win_type > window > =

Re: Are there firls and kaiser filter methods for C++ OOT?

2022-02-22 Thread GNU Radio, the Free & Open-Source Toolkit for Software Radio
Hi George, I also tried to use *low_pass() *function in my C++ program but with no luck. My linker shouts that there is undefined reference to this function but headers where recognized. How did you install the GNU Radio? Was it installation from PPA or building from source? Marcin pon., 21 lut

Re: Are there firls and kaiser filter methods for C++ OOT?

2022-02-21 Thread George Edwards
Hi Marcin, Thanks again for your help! I was a little busy and finally got around to looking at the two C++ fir filter documents you sent me. I tried to design an OOT C++ FIR lowpass filter block based on my understanding of these documents but my code shows error (squidly). In the OOT C++ code,

Re: Are there firls and kaiser filter methods for C++ OOT?

2022-02-14 Thread George Edwards
Thank you very much Marcin! George On Sun, Feb 13, 2022, 11:05 PM Marcin Puchlik wrote: > Hello George, > Yes, there is. Check this out: > https://www.gnuradio.org/doc/doxygen/firdes_8h_source.html > https://www.gnuradio.org/doc/doxygen/pm__remez_8h.html > BR, > Marcin > > pon., 14 lut 2022 o

Re: Are there firls and kaiser filter methods for C++ OOT?

2022-02-13 Thread GNU Radio, the Free & Open-Source Toolkit for Software Radio
Hello George, Yes, there is. Check this out: https://www.gnuradio.org/doc/doxygen/firdes_8h_source.html https://www.gnuradio.org/doc/doxygen/pm__remez_8h.html BR, Marcin pon., 14 lut 2022 o 00:07 George Edwards napisał(a): > Hello GNURadio Community, > > I am designing a Gnuradio OOT block in

Are there firls and kaiser filter methods for C++ OOT?

2022-02-13 Thread George Edwards
Hello GNURadio Community, I am designing a Gnuradio OOT block in C++. Are there firls and kaiser filter methods (analogous to the scipy package methods that one would use in Python OOT) that I can call to generate coefficients. Thank you! Regards, George