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.
Public Member Functions | Protected Member Functions | List of all members
RDSPhaseLock Class Reference

#include <phaselock.h>

+ Inheritance diagram for RDSPhaseLock:
+ Collaboration diagram for RDSPhaseLock:

Public Member Functions

 RDSPhaseLock (Real freq, Real bandwidth, Real minsignal)
 
virtual ~RDSPhaseLock ()
 
- Public Member Functions inherited from PhaseLock
 PhaseLock (Real freq, Real bandwidth, Real minsignal)
 
virtual ~PhaseLock ()
 
void configure (Real freq, Real bandwidth, Real minsignal)
 
void process (const std::vector< Real > &samples_in, std::vector< Real > &samples_out)
 
void process (const Real &sample_in, Real *samples_out)
 
void process (const Real &real_in, const Real &imag_in, Real *samples_out)
 
bool locked () const
 
Real get_pilot_level () const
 

Protected Member Functions

virtual void processPhase (Real *samples_out) const
 

Additional Inherited Members

- Static Public Attributes inherited from PhaseLock
static const int pilot_frequency = 19000
 
- Protected Attributes inherited from PhaseLock
Real m_phase
 
Real m_psin
 
Real m_pcos
 

Detailed Description

Definition at line 161 of file phaselock.h.

Constructor & Destructor Documentation

◆ RDSPhaseLock()

RDSPhaseLock::RDSPhaseLock ( Real  freq,
Real  bandwidth,
Real  minsignal 
)
inline

Definition at line 164 of file phaselock.h.

164  :
165  PhaseLock(freq, bandwidth, minsignal)
166  {}
PhaseLock(Real freq, Real bandwidth, Real minsignal)
Definition: phaselock.cpp:26

◆ ~RDSPhaseLock()

virtual RDSPhaseLock::~RDSPhaseLock ( )
inlinevirtual

Definition at line 168 of file phaselock.h.

169  {}

Member Function Documentation

◆ processPhase()

virtual void RDSPhaseLock::processPhase ( Real samples_out) const
inlineprotectedvirtual

Callback method to produce multiple outputs from the current phase value in m_phase and/or the sin and cos values in m_psin and m_pcos

Reimplemented from PhaseLock.

Definition at line 172 of file phaselock.h.

173  {
174  samples_out[0] = m_psin; // Pilot signal (f)
175  // Generate double-frequency output.
176  // sin(2*x) = 2 * sin(x) * cos(x)
177  samples_out[1] = 2.0 * m_psin * m_pcos; // Pilot signal (2f)
178  // cos(2*x) = 2 * cos(x) * cos(x) - 1
179  samples_out[2] = (2.0 * m_pcos * m_pcos) - 1.0; // 2f Pilot cos
180  samples_out[3] = m_phase; // Pilot phase
181  }
Real m_psin
Definition: phaselock.h:93
Real m_pcos
Definition: phaselock.h:94
Real m_phase
Definition: phaselock.h:92

The documentation for this class was generated from the following file: