|
HARDT - The Ham Radio DSP Toolkit
|
#include <htranslatebyfour.h>


Public Member Functions | |
| HTranslateByFour (HWriter< T > *writer, size_t blocksize, bool isQ=false, HProbe< T > *probe=NULL) | |
| HTranslateByFour (HWriterConsumer< T > *consumer, size_t blocksize, bool isQ=false, HProbe< T > *probe=NULL) | |
| HTranslateByFour (HReader< T > *reader, size_t blocksize, bool isQ=false, HProbe< T > *probe=NULL) | |
| ~HTranslateByFour () | |
| void | Filter (T *src, T *dest, size_t blocksize) |
| void | SetIsQ (bool isQ) |
Public Member Functions inherited from HFilter< T > | |
| ~HFilter () | |
| int | Write (T *src, size_t blocksize) |
| int | Read (T *dest, size_t blocksize) |
| bool | Start () |
| bool | Stop () |
| bool | Command (HCommand *command) |
| void | Enable () |
| void | Disable () |
| bool | GetEnabled () |
Public Member Functions inherited from HObject | |
| HObject () | |
Public Member Functions inherited from HWriter< T > | |
| virtual | ~HWriter ()=default |
| HWriter< T > * | Writer () |
Public Member Functions inherited from HReader< T > | |
| virtual | ~HReader ()=default |
| HReader< T > * | Reader () |
Public Member Functions inherited from HWriterConsumer< T > | |
| HWriterConsumer< T > * | Consumer () |
Static Public Member Functions | |
| static void | Translate (T *src, std::complex< T > *dest, size_t blocksize) |
| static void | Translate (T *src, std::complex< double > *dest, size_t blocksize) |
Static Public Member Functions inherited from HFilter< T > | |
| static std::vector< float > | ReadCoeffsFromFile (std::string filename) |
| static std::vector< float > | ReadCoeffsFromFile (char *filename) |
Additional Inherited Members | |
Protected Member Functions inherited from HFilter< T > | |
| HFilter (HWriter< T > *writer, size_t blocksize, HProbe< T > *probe=NULL) | |
| HFilter (HWriterConsumer< T > *consumer, size_t blocksize, HProbe< T > *probe=NULL) | |
| HFilter (HReader< T > *reader, size_t blocksize, HProbe< T > *probe=NULL) | |
| void | SetWriter (HWriter< T > *writer) |
Protected Attributes inherited from HFilter< T > | |
| int | _blocksize |
Translating the input samples by four.
This implements the common frequency translation method of translating by four, either cos(PI*n) or sin(PI*n) at fs/4 by multiplying with [1, 0, -1, 0, 1, .... ] or [0, -1, 0, 1, 0, .... ]
The result is either the real or imaginary (I or Q) signal of a quadrature signal decimated by 4 and with the center frequency shifted to 0.
You can think if this as the output being either the I or Q branch of an combined IQ signal. If you look at the branches in a realvalued fft, you will find that
1) The input spectrum [0 - fs/4] will appear shifted up past fs/4 2) The input spectrum [0 - fs/4] will also appear as shifted towards 0 AND inverted.
Components above fs/4 will be shifted towards 0 not-inverted, but you will get an alias centered and to the left of fs/4.
The flag 'isQ' simply signifies if you wants to multiply with cos or sin (isQ)
|
inline |
Construct a new HTranslateByFour object that writes to a writer
|
inline |
Construct a new HTranslateByFour object that registers with an upstream writer
|
inline |
Construct a new HTranslateByFour object that reads from a reader
|
inline |
Default destructor
|
inlinevirtual |
Run a block of samples through the translator
Implements HFilter< T >.
|
inline |
Change direction of the shift
| isQ | shift direction, false=down, true=up |
|
inlinestatic |
Convert the realvalued input signal 'src' to a complex IQ signal
|
inlinestatic |
Convert the realvalued input signal 'src' to a complex IQ signal
1.8.17