Complex to Arg: Difference between revisions

From GNU Radio
Jump to navigation Jump to search
No edit summary
(Added a mathematical description section, an example flowgraph, and the source files.)
 
Line 1: Line 1:
[[Category:Block Docs]]
This block takes in a complex stream and outputs each complex value's arg (a.k.a. arctan, see [https://en.wikipedia.org/wiki/Argument_(complex_analysis)#Computing_from_the_real_and_imaginary_part]).  The output is a float.
This block takes in a complex stream and outputs each complex value's arg (a.k.a. arctan, see [https://en.wikipedia.org/wiki/Argument_(complex_analysis)#Computing_from_the_real_and_imaginary_part]).  The output is a float.


== Parameters ==
== Parameters ==
None
None
== Mathematical Description ==
Assuming an input of <math>c[n] = r[n] + i[n]j</math>, then the output of this block corresponds to <math>arctan(i[n]/r[n])</math>.


== Example Flowgraph ==
== Example Flowgraph ==
[[File:Complex2ArgDemo.jpg|800px]]
This is a frequency demodulator. The blocks from the output of the [[FFT Low Pass Filter]] to the output of the [[Multiply Const]] block is equal to the [[Quadrature Demod]] block.


== Source Files ==
== Source Files ==
; C++ files
: [https://github.com/gnuradio/gnuradio/blob/main/gr-blocks/lib/complex_to_arg_impl.cc complex_to_arg_impl.cc]
; Header files
: [https://github.com/gnuradio/gnuradio/blob/main/gr-blocks/lib/complex_to_arg_impl.h complex_to_arg_impl.h]
; Public header files
: [https://github.com/gnuradio/gnuradio/blob/main/gr-blocks/include/gnuradio/blocks/complex_to_arg.h complex_to_arg.h]
; Block definition
: [https://github.com/gnuradio/gnuradio/blob/main/gr-blocks/grc/blocks_complex_to_arg.block.yml blocks_complex_to_arg.block.yml]
[[Category:Block Docs]]

Latest revision as of 18:56, 13 April 2024

This block takes in a complex stream and outputs each complex value's arg (a.k.a. arctan, see [1]). The output is a float.

Parameters

None

Mathematical Description

Assuming an input of , then the output of this block corresponds to .

Example Flowgraph

Complex2ArgDemo.jpg

This is a frequency demodulator. The blocks from the output of the FFT Low Pass Filter to the output of the Multiply Const block is equal to the Quadrature Demod block.

Source Files

C++ files
complex_to_arg_impl.cc
Header files
complex_to_arg_impl.h
Public header files
complex_to_arg.h
Block definition
blocks_complex_to_arg.block.yml