Complex to Arg: Difference between revisions

From GNU Radio
Jump to navigation Jump to search
(Created page with "Category:Block Docs Category:Stub Docs This is the template for the "Page-per-block Docs". This first section should describe what the block...")
 
(Added a mathematical description section, an example flowgraph, and the source files.)
 
(2 intermediate revisions 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.
[[Category:Stub Docs]]
This is the template for the [[:Category:Block_Docs|"Page-per-block Docs"]].  This first section should describe what the block does and how to use it, using however many paragraphs necessary.  Note that the title of the wiki page should match the block's name in GRC, i.e. the one defined in the block's .grc file. Look at the [[FFT]] Block for a good example.
 
As this is a basic template, it's also in the [[:Category:Stub_Docs|"Stub Docs category"]]. Please improve it.


== Parameters ==
== Parameters ==
(''R''): <span class="plainlinks">[https://wiki.gnuradio.org/index.php/GNURadioCompanion#Variable_Controls ''Run-time adjustable'']</span>
None


; Param 1 (''R'')
== Mathematical Description ==
: Description of parameter, provide any tips or recommended values.  Note that the name of the parameter above should match the param's label that shows up in grc (e.g. Sample Rate).


; Param 2
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>.
: blah blah blah


== 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