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::FreeDVStats Struct Reference

Public Member Functions

 FreeDVStats ()
 
void init ()
 
void collect (struct freedv *freedv)
 

Public Attributes

bool m_sync
 
float m_snrEst
 
float m_clockOffset
 
float m_freqOffset
 
float m_syncMetric
 
int m_totalBitErrors
 
int m_lastTotalBitErrors
 
int m_ber
 estimated BER (b/s) More...
 
uint32_t m_frameCount
 
uint32_t m_berFrameCount
 count of frames for BER estimation More...
 
uint32_t m_fps
 frames per second More...
 

Detailed Description

Definition at line 219 of file freedvdemod.h.

Constructor & Destructor Documentation

◆ FreeDVStats()

FreeDVDemod::FreeDVStats::FreeDVStats ( )

Definition at line 52 of file freedvdemod.cpp.

References init().

53 {
54  init();
55 }
+ Here is the call graph for this function:

Member Function Documentation

◆ collect()

void FreeDVDemod::FreeDVStats::collect ( struct freedv *  freedv)

Definition at line 72 of file freedvdemod.cpp.

References m_ber, m_berFrameCount, m_clockOffset, m_fps, m_frameCount, m_freqOffset, m_lastTotalBitErrors, m_snrEst, m_sync, m_syncMetric, and m_totalBitErrors.

Referenced by FreeDVDemod::pushSampleToDV().

73 {
74  struct MODEM_STATS stats;
75 
76  freedv_get_modem_extended_stats(freeDV, &stats);
77  m_totalBitErrors = freedv_get_total_bit_errors(freeDV);
78  m_clockOffset = stats.clock_offset;
79  m_freqOffset = stats.foff;
80  m_syncMetric = stats.sync_metric;
81  m_sync = stats.sync != 0;
82  m_snrEst = stats.snr_est;
83 
84  if (m_berFrameCount >= m_fps)
85  {
87  m_ber = m_ber < 0 ? 0 : m_ber;
88  m_berFrameCount = 0;
89  m_lastTotalBitErrors = m_totalBitErrors;
90 // qDebug("FreeDVStats::collect: demod sync: %s sync metric: %f demod snr: %3.2f dB BER: %d clock offset: %f freq offset: %f",
91 // m_sync ? "ok" : "ko", m_syncMetric, m_snrEst, m_ber, m_clockOffset, m_freqOffset);
92  }
93 
95  m_frameCount++;
96 }
int m_ber
estimated BER (b/s)
Definition: freedvdemod.h:232
uint32_t m_berFrameCount
count of frames for BER estimation
Definition: freedvdemod.h:234
uint32_t m_fps
frames per second
Definition: freedvdemod.h:235
+ Here is the caller graph for this function:

◆ init()

void FreeDVDemod::FreeDVStats::init ( )

Definition at line 57 of file freedvdemod.cpp.

References m_ber, m_berFrameCount, m_clockOffset, m_fps, m_frameCount, m_freqOffset, m_lastTotalBitErrors, m_snrEst, m_sync, m_syncMetric, and m_totalBitErrors.

Referenced by FreeDVDemod::applyFreeDVMode(), and FreeDVStats().

58 {
59  m_sync = false;
60  m_snrEst = -20;
61  m_clockOffset = 0;
62  m_freqOffset = 0;
63  m_syncMetric = 0;
64  m_totalBitErrors = 0;
66  m_ber = 0;
67  m_frameCount = 0;
68  m_berFrameCount = 0;
69  m_fps = 1;
70 }
int m_ber
estimated BER (b/s)
Definition: freedvdemod.h:232
uint32_t m_berFrameCount
count of frames for BER estimation
Definition: freedvdemod.h:234
uint32_t m_fps
frames per second
Definition: freedvdemod.h:235
+ Here is the caller graph for this function:

Member Data Documentation

◆ m_ber

int FreeDVDemod::FreeDVStats::m_ber

estimated BER (b/s)

Definition at line 232 of file freedvdemod.h.

Referenced by collect(), FreeDVDemod::getBER(), and init().

◆ m_berFrameCount

uint32_t FreeDVDemod::FreeDVStats::m_berFrameCount

count of frames for BER estimation

Definition at line 234 of file freedvdemod.h.

Referenced by collect(), and init().

◆ m_clockOffset

float FreeDVDemod::FreeDVStats::m_clockOffset

Definition at line 227 of file freedvdemod.h.

Referenced by collect(), and init().

◆ m_fps

uint32_t FreeDVDemod::FreeDVStats::m_fps

frames per second

Definition at line 235 of file freedvdemod.h.

Referenced by FreeDVDemod::applyFreeDVMode(), collect(), and init().

◆ m_frameCount

uint32_t FreeDVDemod::FreeDVStats::m_frameCount

Definition at line 233 of file freedvdemod.h.

Referenced by collect(), and init().

◆ m_freqOffset

float FreeDVDemod::FreeDVStats::m_freqOffset

Definition at line 228 of file freedvdemod.h.

Referenced by collect(), FreeDVDemod::getFrequencyOffset(), and init().

◆ m_lastTotalBitErrors

int FreeDVDemod::FreeDVStats::m_lastTotalBitErrors

Definition at line 231 of file freedvdemod.h.

Referenced by collect(), and init().

◆ m_snrEst

float FreeDVDemod::FreeDVStats::m_snrEst

Definition at line 226 of file freedvdemod.h.

Referenced by collect(), init(), and FreeDVDemod::pushSampleToDV().

◆ m_sync

bool FreeDVDemod::FreeDVStats::m_sync

Definition at line 225 of file freedvdemod.h.

Referenced by collect(), init(), and FreeDVDemod::isSync().

◆ m_syncMetric

float FreeDVDemod::FreeDVStats::m_syncMetric

Definition at line 229 of file freedvdemod.h.

Referenced by collect(), and init().

◆ m_totalBitErrors

int FreeDVDemod::FreeDVStats::m_totalBitErrors

Definition at line 230 of file freedvdemod.h.

Referenced by collect(), and init().


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