[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Discuss-gnuradio] Magnitude of complex vector
From: |
Eric Blossom |
Subject: |
Re: [Discuss-gnuradio] Magnitude of complex vector |
Date: |
Tue, 10 Aug 2004 21:59:14 -0700 |
User-agent: |
Mutt/1.4.1i |
On Tue, Aug 10, 2004 at 10:49:18PM -0500, David Carr wrote:
> Hi all,
>
> I'm trying to implement an AM demodulator. I was planning to send the
> real samples through an IQ demodulator and then take the magnitude of
> I+Q to get the demodulated audio. I can't figure out how to implement
> the magitude(I+Q) operation though. Is there a provided magnitude
> processing block or even a square root one? This must be really easy
> but I can't find what I want in the docs.
There is a whole list of missing signal processing blocks. This is
one of them. Below is a list of related blocks. Please feel free to
write one or more of them along with test code send them to me. I'll
add them to the gnuradio-core tree. gr_float_to_complex is a great
example. For examples of test code, see qa_add_and_friends.py
Also, please take a look at README.hacking for coding conventions.
Ask questions as they come up. And yes, I know we're stilling missing
the "Introduction to the GNU Radio 2.x Architecture". Generally
speaking each block requires 3 files: gr_<foo>.h, the header;
gr_<foo>.cc, the implementation; and gr_<foo>.i, the SWIG header
that's used to generate the glue to python.
Missing blocks related to your question:
gr_complex_to_real 1 complex in; 1 float out
gr_complex_to_imag 1 complex in; 1 float out
gr_complex_to_mag 1 complex in; 1 float out
gr_complex_to_arg 1 complex in; 1 float out
gr_complex_to_float 1 complex in; 1 or 2 floats out
Other simple to implement missing blocks:
gr_float_to_short
gr_short_to_float
gr_tcp_sink look at 0.9 code plus 2.x gr_file_sink/source
gr_tcp_source
If anyone's familiar with ALSA, or wants to be, we could use a native
ALSA audio sink and source. See the gr-audio-oss tarball for a
starting point. This would allows us to transparently take advantage
of 24 bit audio cards. The alsa module should end up in a separate
loadable module just like gr-audio-oss does. [If you're thinking
about doing this, drop me a line, I've got some ideas.]
Eric