Code cleanup following level meter changes. New screen shot for main-left controls.

git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@7597 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
Joe Taylor 2017-03-06 15:52:09 +00:00
parent 0e87c974e9
commit 5ff7b9ac79
5 changed files with 15 additions and 25 deletions

Binary file not shown.

Before

Width:  |  Height:  |  Size: 6.2 KiB

After

Width:  |  Height:  |  Size: 6.1 KiB

View File

@ -1,6 +1,6 @@
subroutine hspec(id2,k,nutc0,ntrpdepth,nrxfreq,ntol,bmsk144,bcontest, &
btrain,pcoeffs,ingain,mycall,hiscall,bshmsg,bswl,datadir,green,s,jh,pxmax,rmsNoGain,line1, &
mygrid)
btrain,pcoeffs,ingain,mycall,hiscall,bshmsg,bswl,datadir,green,s, &
jh,pxmax,dbNoGain,line1,mygrid)
! Input:
! k pointer to the most recent new data
@ -72,7 +72,7 @@ subroutine hspec(id2,k,nutc0,ntrpdepth,nrxfreq,ntol,bmsk144,bcontest, &
green(jh)=0.
if(rms.gt.0.0) then
green(jh)=20.0*log10(rms)
rmsNoGain=20.0*log10(rms2);
dbNoGain=20.0*log10(rms2);
endif
call four2a(x,nfft,1,-1,0) !Real-to-complex FFT
df=12000.0/nfft

View File

@ -1,5 +1,5 @@
subroutine symspec(shared_data,k,ntrperiod,nsps,ingain,nminw,pxdb,s, &
df3,ihsym,npts8, rmsnogain, pxdbmax)
df3,ihsym,npts8,pxdbmax)
! Input:
! k pointer to the most recent new data
@ -10,7 +10,7 @@ subroutine symspec(shared_data,k,ntrperiod,nsps,ingain,nminw,pxdb,s, &
! nbslider NB setting, 0-100
! Output:
! pxdb power (0-60 dB)
! pxdb raw power (0-90 dB)
! s() current spectrum for waterfall display
! ihsym index number of this half-symbol (1-184) for 60 s modes
@ -27,12 +27,11 @@ subroutine symspec(shared_data,k,ntrperiod,nsps,ingain,nminw,pxdb,s, &
real*4 ssum(NSMAX)
real*4 xc(0:MAXFFT3-1)
real*4 tmp(NSMAX)
real*4 rmsnogain
complex cx(0:MAXFFT3/2)
integer nch(7)
common/spectra/syellow(NSMAX),ref(0:3456),filter(0:3456)
data rms/999.0/,k0/99999999/,nfft3z/0/
data k0/99999999/,nfft3z/0/
data nch/1,2,4,9,18,36,72/
equivalence (xc,cx)
save
@ -71,14 +70,10 @@ subroutine symspec(shared_data,k,ntrperiod,nsps,ingain,nminw,pxdb,s, &
if (abs(x1).gt.pxmax) pxmax = abs(x1);
sq=sq + x1*x1
enddo
rmsnogain = 0.
if (sq.gt.0.0) rmsnogain=20*log10(sqrt(sq/(k-k0)))
sq=sq * gain
rms=sqrt(sq/(k-k0))
pxdb=0.
pxdbmax = 20*log10(pxmax)
if(rms.gt.0.0) pxdb=20.0*log10(rms)
if(pxdb.gt.90.0) pxdb=90.0
pxdb = 0.
if(sq.gt.0.0) pxdb=10*log10(sq/(k-k0))
pxdbmax=0.
if(pxmax.gt.0) pxdbmax = 20*log10(pxmax)
k0=k
ja=ja+jstep !Index of first sample

View File

@ -66,7 +66,8 @@
extern "C" {
//----------------------------------------------------- C and Fortran routines
void symspec_(struct dec_data *, int* k, int* ntrperiod, int* nsps, int* ingain,
int* minw, float* px, float s[], float* df3, int* nhsym, int* npts8, float *rmsnogain, float *m_pxmax);
int* minw, float* px, float s[], float* df3, int* nhsym, int* npts8,
float *m_pxmax);
void hspec_(short int d2[], int* k, int* nutc0, int* ntrperiod, int* nrxfreq, int* ntol,
bool* bmsk144, bool* bcontest, bool* btrain, double const pcoeffs[], int* ingain,
@ -266,7 +267,6 @@ MainWindow::MainWindow(QDir const& temp_directory, bool multiple,
m_ihsym {0},
m_nzap {0},
m_px {0.0},
m_rmsNoGain {0.0},
m_iptt0 {0},
m_btxok0 {false},
m_nsendingsh {0},
@ -1162,13 +1162,10 @@ void MainWindow::dataSink(qint64 frames)
int nsps=m_nsps;
if(m_bFastMode) nsps=6912;
int nsmo=m_wideGraph->smoothYellow()-1;
symspec_(&dec_data,&k,&trmin,&nsps,&m_inGain,&nsmo,&m_px,s,&m_df3,&m_ihsym,&m_npts8,&m_rmsNoGain,&m_pxmax);
symspec_(&dec_data,&k,&trmin,&nsps,&m_inGain,&nsmo,&m_px,s,&m_df3,&m_ihsym,&m_npts8,&m_pxmax);
if(m_mode=="WSPR") wspr_downsample_(dec_data.d2,&k);
if(m_ihsym <=0) return;
QString t;
m_pctZap=m_nzap*100.0/m_nsps; // TODO: this is currently redundant
t.sprintf(" Rx noise: %5.1f ",m_px);
if (ui) ui->signal_meter_widget->setValue(m_rmsNoGain,m_pxmax); // Update thermometer
if(ui) ui->signal_meter_widget->setValue(m_px,m_pxmax); // Update thermometer
if(m_monitoring || m_diskData) {
m_wideGraph->dataSink2(s,m_df3,m_ihsym,m_diskData);
}

View File

@ -439,13 +439,11 @@ private:
bool m_bDoubleClicked;
bool m_bHideControls;
float m_pctZap;
int m_ihsym;
int m_nzap;
int m_npts8;
float m_px;
float m_pxmax;
float m_rmsNoGain;
float m_pxmax;
float m_df3;
int m_iptt0;
bool m_btxok0;