[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Discuss-gnuradio] grc amplitude demodulation questions
From: |
ematlis |
Subject: |
Re: [Discuss-gnuradio] grc amplitude demodulation questions |
Date: |
Fri, 14 Jan 2011 13:28:36 -0800 (PST) |
--- On Fri, 1/14/11, Josh Blum <address@hidden> wrote:
> From: Josh Blum <address@hidden>
> Subject: Re: [Discuss-gnuradio] grc amplitude demodulation questions
> To: address@hidden
> Date: Friday, January 14, 2011, 2:14 PM
>
> > I believe the code is already doing this. Here
> are code segments for
> > 2 fft guis. The first shows the fft of the raw
> output of the USRP2.
> > This gui responds correctly. Notice the line:
> > "sample_rate=100e6/usrp2_decim", so I assume that as I
> dynamically
> > adjust usrp2_decim, this value is being updated.
> However, with the
> > second fft, while there is a similar line:
> > "sample_rate=100e6/usrp2_decim/sw_decim" that includes
> the software
> > decimation value, this fft gui does not correct the
> position of the
> > fft when I dynamically change sw_decim. The
> x-axis DOES change, but
> > the peaks in the spectrum just stay fixed in their
> relative
> > positions. Any thoughts?
> >
>
> Where else is sw_decim used? Is it used in a parameter that
> can be
> changed at runtime? Look at the generated source code, see
> set_sw_decim
>
> -Josh
Josh-
here are the two definitions generated by GRC, one to set the USRP2 decimation
(via a variable slider), the second to set the "audio decimation" used in the
AM Demod block:
def set_usrp2_decim(self, usrp2_decim):
self.usrp2_decim = usrp2_decim
self.wxgui_fftsink2_0.set_sample_rate(100e6/self.usrp2_decim)
self.wxgui_scopesink2_0.set_sample_rate(100e6/self.usrp2_decim)
self.usrp2_source_xxxx_0.set_decim(self.usrp2_decim)
self._usrp2_decim_slider.set_value(self.usrp2_decim)
self._usrp2_decim_text_box.set_value(self.usrp2_decim)
self.wxgui_scopesink2_0_0.set_sample_rate(100e6/self.usrp2_decim/self.sw_decim)
self.wxgui_fftsink2_1.set_sample_rate(100e6/self.usrp2_decim/self.sw_decim)
self.high_pass_filter_0.set_taps(firdes.high_pass(1,
100e6/self.usrp2_decim/self.sw_decim, 100, 20, firdes.WIN_HAMMING, 6.76))
def set_sw_decim(self, sw_decim):
self.sw_decim = sw_decim
self._sw_decim_slider.set_value(self.sw_decim)
self._sw_decim_text_box.set_value(self.sw_decim)
self.wxgui_scopesink2_0_0.set_sample_rate(100e6/self.usrp2_decim/self.sw_decim)
self.wxgui_fftsink2_1.set_sample_rate(100e6/self.usrp2_decim/self.sw_decim)
self.high_pass_filter_0.set_taps(firdes.high_pass(1,
100e6/self.usrp2_decim/self.sw_decim, 100, 20, firdes.WIN_HAMMING, 6.76))
>
> _______________________________________________
> Discuss-gnuradio mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/discuss-gnuradio
>