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 | Public Attributes | List of all members
FreeDVDemod::FreeDVSNR Struct Reference

Public Member Functions

 FreeDVSNR ()
 
void accumulate (float snrdB)
 

Public Attributes

double m_sum
 
float m_peak
 
int m_n
 
bool m_reset
 

Detailed Description

Definition at line 238 of file freedvdemod.h.

Constructor & Destructor Documentation

◆ FreeDVSNR()

FreeDVDemod::FreeDVSNR::FreeDVSNR ( )

Definition at line 98 of file freedvdemod.cpp.

References FreeDVDemod::m_sum.

99 {
100  m_sum = 0.0f;
101  m_peak = 0.0f;
102  m_n = 0;
103  m_reset = true;
104 }

Member Function Documentation

◆ accumulate()

void FreeDVDemod::FreeDVSNR::accumulate ( float  snrdB)

Definition at line 106 of file freedvdemod.cpp.

References FreeDVDemod::m_sum, leansdr::max(), and CalcDb::powerFromdB().

Referenced by FreeDVDemod::pushSampleToDV().

107 {
108  if (m_reset)
109  {
110  m_sum = CalcDb::powerFromdB(snrdB);
111  m_peak = snrdB;
112  m_n = 1;
113  m_reset = false;
114  }
115  else
116  {
117  m_sum += CalcDb::powerFromdB(snrdB);
118  m_peak = std::max(m_peak, snrdB);
119  m_n++;
120  }
121 }
static double powerFromdB(double powerdB)
Definition: db.cpp:36
T max(const T &x, const T &y)
Definition: framework.h:446
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ m_n

int FreeDVDemod::FreeDVSNR::m_n

Definition at line 245 of file freedvdemod.h.

Referenced by FreeDVDemod::getSNRLevels().

◆ m_peak

float FreeDVDemod::FreeDVSNR::m_peak

Definition at line 244 of file freedvdemod.h.

Referenced by FreeDVDemod::getSNRLevels().

◆ m_reset

bool FreeDVDemod::FreeDVSNR::m_reset

Definition at line 246 of file freedvdemod.h.

Referenced by FreeDVDemod::getSNRLevels().

◆ m_sum

double FreeDVDemod::FreeDVSNR::m_sum

Definition at line 243 of file freedvdemod.h.

Referenced by FreeDVDemod::getSNRLevels().


The documentation for this struct was generated from the following files: