mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2025-04-11 22:08:32 -04:00
Replace the required calculation of m_xavg, needed for pointing measurements.
This commit is contained in:
parent
9e0425ef40
commit
bb4564f734
@ -314,12 +314,15 @@ void MainWindow::dataSink(int k)
|
||||
static int ntrz=0;
|
||||
static int nkhz;
|
||||
static int nfsample=96000;
|
||||
static int nsec0=0;
|
||||
static int nsum=0;
|
||||
static int ndiskdat;
|
||||
static int nb;
|
||||
static int k0=0;
|
||||
static float px=0.0;
|
||||
static uchar lstrong[1024];
|
||||
static float slimit;
|
||||
static double xsum=0.0;
|
||||
|
||||
if(m_diskData) {
|
||||
ndiskdat=1;
|
||||
@ -339,6 +342,18 @@ void MainWindow::dataSink(int k)
|
||||
symspec_(&k, &ndiskdat, &nb, &m_NBslider, &nfsample,
|
||||
&px, s, &nkhz, &ihsym, &nzap, &slimit, lstrong);
|
||||
|
||||
int nsec=QDateTime::currentSecsSinceEpoch();
|
||||
if(nsec==nsec0) {
|
||||
xsum+=pow(10.0,0.1*px);
|
||||
nsum+=1;
|
||||
} else {
|
||||
m_xavg=0.0;
|
||||
if(nsum>0) m_xavg=xsum/nsum;
|
||||
xsum=pow(10.0,0.1*px);
|
||||
nsum=1;
|
||||
}
|
||||
nsec0=nsec;
|
||||
|
||||
if(m_bWTransmitting) px=0.0;
|
||||
QString t;
|
||||
m_pctZap=nzap/178.3;
|
||||
|
Loading…
Reference in New Issue
Block a user