When I run AM radio GRC, I got this error
terminate called after throwing an instance of ‘std::invalid_argument’
what(): buffer_add_reader: nzero_preload must be >= 0
I google this error, and it says this is bug 693. but I cannot fix it.
Thank
you!
You need to specify taps for the filter in the Frequency Xlating FIR
Filter
block. It’s a flaw in the validation step of GRC that it doesn’t
properly
check that a vector is empty. But the filter won’t work without you
defining it.
that depens on the bandwidth you want to let through your filter, but
typically, use something like
firdes.low_pass(1.0, samp_rate, 25e3, 25e3)
which will build a tap vector for you; the arguments (in this order)
are:
gain in passband
sampling rate
cutoff frequency of pass band in Hz
transition with between pass- and stop band
Generally, you should have a bit of fun with the tool that you as
“gr_filter_design”; it gives you a good feeling for what kind of filters
make sense (e.g. when you try to filter out 25kHz out of a 10MHz input
stream with a single FIR filter using the method described above, you’d
get a ~1000 taps filter. And no noone should expect their CPU to compute
that in real time.), and where you can allow your filter to have a bit
more of “slack”.