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.)
 
(One intermediate revision by one other user not shown)
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 ==


Insert description of flowgraph here, then show a screenshot of the flowgraph and the output if there is an interesting GUI.  Currently we have no standard method of uploading the actual flowgraph to the wiki or git repo, unfortunately.  The plan is to have an example flowgraph showing how the block might be used, for every block, and the flowgraphs will live in the git repo.
[[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++ fileshttps://wiki.gnuradio.org/index.php/SISO
; C++ files
 
: [https://github.com/gnuradio/gnuradio/blob/main/gr-blocks/lib/complex_to_arg_impl.cc complex_to_arg_impl.cc]
: [https://github.com/gnuradio/gnuradio TODO]


; Header files
; Header files
: [https://github.com/gnuradio/gnuradio TODO]
: [https://github.com/gnuradio/gnuradio/blob/main/gr-blocks/lib/complex_to_arg_impl.h complex_to_arg_impl.h]


; Public header files
; Public header files
: [https://github.com/gnuradio/gnuradio TODO]
: [https://github.com/gnuradio/gnuradio/blob/main/gr-blocks/include/gnuradio/blocks/complex_to_arg.h complex_to_arg.h]


; Block definition
; Block definition
: [https://github.com/gnuradio/gnuradio TODO]
: [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