SDRAngel
4.11.5
Developer docs for <a href="https://github.com/f4exb/sdrangel">SDRangel<\a>, an Open Source Qt5 / OpenGL 3.0+ SDR and signal analyzer frontend to various hardware.
sdrbase
dsp
freqlockcomplex.h
Go to the documentation of this file.
1
// Copyright (C) 2018 F4EXB //
3
// written by Edouard Griffiths //
4
// //
5
// See: http://liquidsdr.org/blog/pll-howto/ //
6
// Fixed filter registers saturation //
7
// Added order for PSK locking. This brilliant idea actually comes from this //
8
// post: https://www.dsprelated.com/showthread/comp.dsp/36356-1.php //
9
// //
10
// This program is free software; you can redistribute it and/or modify //
11
// it under the terms of the GNU General Public License as published by //
12
// the Free Software Foundation as version 3 of the License, or //
13
// (at your option) any later version. //
14
// //
15
// This program is distributed in the hope that it will be useful, //
16
// but WITHOUT ANY WARRANTY; without even the implied warranty of //
17
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the //
18
// GNU General Public License V3 for more details. //
19
// //
20
// You should have received a copy of the GNU General Public License //
21
// along with this program. If not, see <http://www.gnu.org/licenses/>. //
23
24
#ifndef SDRBASE_DSP_FREQLOCKCOMPLEX_H_
25
#define SDRBASE_DSP_FREQLOCKCOMPLEX_H_
26
27
#include "
dsp/dsptypes.h
"
28
#include "
export.h
"
29
31
class
SDRBASE_API
FreqLockComplex
32
{
33
public
:
34
FreqLockComplex
();
35
~
FreqLockComplex
();
36
37
void
reset();
38
void
setSampleRate(
unsigned
int
sampleRate);
40
void
feed(
float
re,
float
im);
41
const
std::complex<float>&
getComplex
()
const
{
return
m_y; }
42
float
getReal
()
const
{
return
m_yRe; }
43
float
getImag
()
const
{
return
m_yIm; }
44
float
getFreq
()
const
{
return
m_freq; }
45
46
private
:
48
static
float
normalizeAngle(
float
angle);
49
50
float
m_a0
;
51
float
m_a1
;
52
std::complex<float>
m_y
;
53
float
m_yRe
;
54
float
m_yIm
;
55
float
m_freq
;
56
float
m_phi
;
57
float
m_phiX0
;
58
float
m_phiX1
;
59
float
m_y1
;
60
};
61
62
63
#endif
/* SDRBASE_DSP_FREQLOCKCOMPLEX_H_ */
FreqLockComplex::m_phiX1
float m_phiX1
Definition:
freqlockcomplex.h:58
FreqLockComplex::m_phiX0
float m_phiX0
Definition:
freqlockcomplex.h:57
export.h
FreqLockComplex::m_a1
float m_a1
Definition:
freqlockcomplex.h:51
FreqLockComplex::m_y1
float m_y1
Definition:
freqlockcomplex.h:59
FreqLockComplex::m_a0
float m_a0
Definition:
freqlockcomplex.h:50
FreqLockComplex::m_y
std::complex< float > m_y
Definition:
freqlockcomplex.h:52
FreqLockComplex::m_yRe
float m_yRe
Definition:
freqlockcomplex.h:53
dsptypes.h
FreqLockComplex::m_yIm
float m_yIm
Definition:
freqlockcomplex.h:54
FreqLockComplex::getComplex
const std::complex< float > & getComplex() const
Definition:
freqlockcomplex.h:41
FreqLockComplex::getFreq
float getFreq() const
Definition:
freqlockcomplex.h:44
FreqLockComplex
Definition:
freqlockcomplex.h:31
FreqLockComplex::getReal
float getReal() const
Definition:
freqlockcomplex.h:42
FreqLockComplex::m_phi
float m_phi
Definition:
freqlockcomplex.h:56
FreqLockComplex::getImag
float getImag() const
Definition:
freqlockcomplex.h:43
SDRBASE_API
#define SDRBASE_API
Definition:
export.h:40
FreqLockComplex::m_freq
float m_freq
Definition:
freqlockcomplex.h:55
Generated on Fri Aug 2 2019 17:56:33 for SDRAngel by
1.8.13