mirror of
				https://github.com/saitohirga/WSJT-X.git
				synced 2025-11-03 21:40:52 -05: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 ntrz=0;
 | 
				
			||||||
  static int nkhz;
 | 
					  static int nkhz;
 | 
				
			||||||
  static int nfsample=96000;
 | 
					  static int nfsample=96000;
 | 
				
			||||||
 | 
					  static int nsec0=0;
 | 
				
			||||||
 | 
					  static int nsum=0;
 | 
				
			||||||
  static int ndiskdat;
 | 
					  static int ndiskdat;
 | 
				
			||||||
  static int nb;
 | 
					  static int nb;
 | 
				
			||||||
  static int k0=0;
 | 
					  static int k0=0;
 | 
				
			||||||
  static float px=0.0;
 | 
					  static float px=0.0;
 | 
				
			||||||
  static uchar lstrong[1024];
 | 
					  static uchar lstrong[1024];
 | 
				
			||||||
  static float slimit;
 | 
					  static float slimit;
 | 
				
			||||||
 | 
					  static double xsum=0.0;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  if(m_diskData) {
 | 
					  if(m_diskData) {
 | 
				
			||||||
    ndiskdat=1;
 | 
					    ndiskdat=1;
 | 
				
			||||||
@ -339,6 +342,18 @@ void MainWindow::dataSink(int k)
 | 
				
			|||||||
  symspec_(&k, &ndiskdat, &nb, &m_NBslider, &nfsample,
 | 
					  symspec_(&k, &ndiskdat, &nb, &m_NBslider, &nfsample,
 | 
				
			||||||
           &px, s, &nkhz, &ihsym, &nzap, &slimit, lstrong);
 | 
					           &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;
 | 
					  if(m_bWTransmitting) px=0.0;
 | 
				
			||||||
  QString t;
 | 
					  QString t;
 | 
				
			||||||
  m_pctZap=nzap/178.3;
 | 
					  m_pctZap=nzap/178.3;
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user