mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-11-22 04:11:16 -05:00
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:
parent
0e87c974e9
commit
5ff7b9ac79
Binary file not shown.
Before Width: | Height: | Size: 6.2 KiB After Width: | Height: | Size: 6.1 KiB |
@ -1,6 +1,6 @@
|
|||||||
subroutine hspec(id2,k,nutc0,ntrpdepth,nrxfreq,ntol,bmsk144,bcontest, &
|
subroutine hspec(id2,k,nutc0,ntrpdepth,nrxfreq,ntol,bmsk144,bcontest, &
|
||||||
btrain,pcoeffs,ingain,mycall,hiscall,bshmsg,bswl,datadir,green,s,jh,pxmax,rmsNoGain,line1, &
|
btrain,pcoeffs,ingain,mycall,hiscall,bshmsg,bswl,datadir,green,s, &
|
||||||
mygrid)
|
jh,pxmax,dbNoGain,line1,mygrid)
|
||||||
|
|
||||||
! Input:
|
! Input:
|
||||||
! k pointer to the most recent new data
|
! 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.
|
green(jh)=0.
|
||||||
if(rms.gt.0.0) then
|
if(rms.gt.0.0) then
|
||||||
green(jh)=20.0*log10(rms)
|
green(jh)=20.0*log10(rms)
|
||||||
rmsNoGain=20.0*log10(rms2);
|
dbNoGain=20.0*log10(rms2);
|
||||||
endif
|
endif
|
||||||
call four2a(x,nfft,1,-1,0) !Real-to-complex FFT
|
call four2a(x,nfft,1,-1,0) !Real-to-complex FFT
|
||||||
df=12000.0/nfft
|
df=12000.0/nfft
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
subroutine symspec(shared_data,k,ntrperiod,nsps,ingain,nminw,pxdb,s, &
|
subroutine symspec(shared_data,k,ntrperiod,nsps,ingain,nminw,pxdb,s, &
|
||||||
df3,ihsym,npts8, rmsnogain, pxdbmax)
|
df3,ihsym,npts8,pxdbmax)
|
||||||
|
|
||||||
! Input:
|
! Input:
|
||||||
! k pointer to the most recent new data
|
! 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
|
! nbslider NB setting, 0-100
|
||||||
|
|
||||||
! Output:
|
! Output:
|
||||||
! pxdb power (0-60 dB)
|
! pxdb raw power (0-90 dB)
|
||||||
! s() current spectrum for waterfall display
|
! s() current spectrum for waterfall display
|
||||||
! ihsym index number of this half-symbol (1-184) for 60 s modes
|
! 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 ssum(NSMAX)
|
||||||
real*4 xc(0:MAXFFT3-1)
|
real*4 xc(0:MAXFFT3-1)
|
||||||
real*4 tmp(NSMAX)
|
real*4 tmp(NSMAX)
|
||||||
real*4 rmsnogain
|
|
||||||
complex cx(0:MAXFFT3/2)
|
complex cx(0:MAXFFT3/2)
|
||||||
integer nch(7)
|
integer nch(7)
|
||||||
|
|
||||||
common/spectra/syellow(NSMAX),ref(0:3456),filter(0:3456)
|
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/
|
data nch/1,2,4,9,18,36,72/
|
||||||
equivalence (xc,cx)
|
equivalence (xc,cx)
|
||||||
save
|
save
|
||||||
@ -71,14 +70,10 @@ subroutine symspec(shared_data,k,ntrperiod,nsps,ingain,nminw,pxdb,s, &
|
|||||||
if (abs(x1).gt.pxmax) pxmax = abs(x1);
|
if (abs(x1).gt.pxmax) pxmax = abs(x1);
|
||||||
sq=sq + x1*x1
|
sq=sq + x1*x1
|
||||||
enddo
|
enddo
|
||||||
rmsnogain = 0.
|
pxdb = 0.
|
||||||
if (sq.gt.0.0) rmsnogain=20*log10(sqrt(sq/(k-k0)))
|
if(sq.gt.0.0) pxdb=10*log10(sq/(k-k0))
|
||||||
sq=sq * gain
|
pxdbmax=0.
|
||||||
rms=sqrt(sq/(k-k0))
|
if(pxmax.gt.0) pxdbmax = 20*log10(pxmax)
|
||||||
pxdb=0.
|
|
||||||
pxdbmax = 20*log10(pxmax)
|
|
||||||
if(rms.gt.0.0) pxdb=20.0*log10(rms)
|
|
||||||
if(pxdb.gt.90.0) pxdb=90.0
|
|
||||||
|
|
||||||
k0=k
|
k0=k
|
||||||
ja=ja+jstep !Index of first sample
|
ja=ja+jstep !Index of first sample
|
||||||
|
@ -66,7 +66,8 @@
|
|||||||
extern "C" {
|
extern "C" {
|
||||||
//----------------------------------------------------- C and Fortran routines
|
//----------------------------------------------------- C and Fortran routines
|
||||||
void symspec_(struct dec_data *, int* k, int* ntrperiod, int* nsps, int* ingain,
|
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,
|
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,
|
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_ihsym {0},
|
||||||
m_nzap {0},
|
m_nzap {0},
|
||||||
m_px {0.0},
|
m_px {0.0},
|
||||||
m_rmsNoGain {0.0},
|
|
||||||
m_iptt0 {0},
|
m_iptt0 {0},
|
||||||
m_btxok0 {false},
|
m_btxok0 {false},
|
||||||
m_nsendingsh {0},
|
m_nsendingsh {0},
|
||||||
@ -1162,13 +1162,10 @@ void MainWindow::dataSink(qint64 frames)
|
|||||||
int nsps=m_nsps;
|
int nsps=m_nsps;
|
||||||
if(m_bFastMode) nsps=6912;
|
if(m_bFastMode) nsps=6912;
|
||||||
int nsmo=m_wideGraph->smoothYellow()-1;
|
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_mode=="WSPR") wspr_downsample_(dec_data.d2,&k);
|
||||||
if(m_ihsym <=0) return;
|
if(m_ihsym <=0) return;
|
||||||
QString t;
|
if(ui) ui->signal_meter_widget->setValue(m_px,m_pxmax); // Update thermometer
|
||||||
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(m_monitoring || m_diskData) {
|
if(m_monitoring || m_diskData) {
|
||||||
m_wideGraph->dataSink2(s,m_df3,m_ihsym,m_diskData);
|
m_wideGraph->dataSink2(s,m_df3,m_ihsym,m_diskData);
|
||||||
}
|
}
|
||||||
|
@ -439,13 +439,11 @@ private:
|
|||||||
bool m_bDoubleClicked;
|
bool m_bDoubleClicked;
|
||||||
bool m_bHideControls;
|
bool m_bHideControls;
|
||||||
|
|
||||||
float m_pctZap;
|
|
||||||
int m_ihsym;
|
int m_ihsym;
|
||||||
int m_nzap;
|
int m_nzap;
|
||||||
int m_npts8;
|
int m_npts8;
|
||||||
float m_px;
|
float m_px;
|
||||||
float m_pxmax;
|
float m_pxmax;
|
||||||
float m_rmsNoGain;
|
|
||||||
float m_df3;
|
float m_df3;
|
||||||
int m_iptt0;
|
int m_iptt0;
|
||||||
bool m_btxok0;
|
bool m_btxok0;
|
||||||
|
Loading…
Reference in New Issue
Block a user