mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2025-05-24 10:22:26 -04:00
Add single-echo SNR measurement.
This commit is contained in:
parent
8c916c14d4
commit
3f94b75912
@ -1,5 +1,5 @@
|
|||||||
subroutine avecho(id2,ndop,nfrit,nauto,nqual,f1,xlevel,snrdb,db_err, &
|
subroutine avecho(id2,ndop,nfrit,nauto,nqual,f1,xlevel,snrdb,snrdb0, &
|
||||||
dfreq,width,bDiskData)
|
db_err,dfreq,width,bDiskData)
|
||||||
|
|
||||||
integer TXLENGTH
|
integer TXLENGTH
|
||||||
parameter (TXLENGTH=27648) !27*1024
|
parameter (TXLENGTH=27648) !27*1024
|
||||||
@ -8,6 +8,8 @@ subroutine avecho(id2,ndop,nfrit,nauto,nqual,f1,xlevel,snrdb,db_err, &
|
|||||||
integer*2 id2(34560) !Buffer for Rx data
|
integer*2 id2(34560) !Buffer for Rx data
|
||||||
real sa(NZ) !Avg spectrum relative to initial Doppler echo freq
|
real sa(NZ) !Avg spectrum relative to initial Doppler echo freq
|
||||||
real sb(NZ) !Avg spectrum with Dither and changing Doppler removed
|
real sb(NZ) !Avg spectrum with Dither and changing Doppler removed
|
||||||
|
real red0(NZ)
|
||||||
|
real blue0(NZ)
|
||||||
integer nsum !Number of integrations
|
integer nsum !Number of integrations
|
||||||
real dop0 !Doppler shift for initial integration (Hz)
|
real dop0 !Doppler shift for initial integration (Hz)
|
||||||
real dop !Doppler shift for current integration (Hz)
|
real dop !Doppler shift for current integration (Hz)
|
||||||
@ -71,6 +73,8 @@ subroutine avecho(id2,ndop,nfrit,nauto,nqual,f1,xlevel,snrdb,db_err, &
|
|||||||
sa(i)=sa(i) + s(ia+i-2048) !Center at initial doppler freq
|
sa(i)=sa(i) + s(ia+i-2048) !Center at initial doppler freq
|
||||||
sb(i)=sb(i) + s(ib+i-2048) !Center at expected echo freq
|
sb(i)=sb(i) + s(ib+i-2048) !Center at expected echo freq
|
||||||
enddo
|
enddo
|
||||||
|
call echo_snr(s(ia-2047),s(ib-2047),fspread,blue0,red0,snrdb0, &
|
||||||
|
db_err,dfreq,snr_detect)
|
||||||
call echo_snr(sa,sb,fspread,blue,red,snrdb,db_err,dfreq,snr_detect)
|
call echo_snr(sa,sb,fspread,blue,red,snrdb,db_err,dfreq,snr_detect)
|
||||||
nqual=snr_detect-2
|
nqual=snr_detect-2
|
||||||
if(nqual.lt.0) nqual=0
|
if(nqual.lt.0) nqual=0
|
||||||
|
@ -156,7 +156,7 @@ extern "C" {
|
|||||||
void save_echo_params_(int* ndoptotal, int* ndop, int* nfrit, float* f1, float* fspread, short id2[], int* idir);
|
void save_echo_params_(int* ndoptotal, int* ndop, int* nfrit, float* f1, float* fspread, short id2[], int* idir);
|
||||||
|
|
||||||
void avecho_( short id2[], int* dop, int* nfrit, int* nauto, int* nqual, float* f1,
|
void avecho_( short id2[], int* dop, int* nfrit, int* nauto, int* nqual, float* f1,
|
||||||
float* level, float* sigdb, float* snr, float* dfreq,
|
float* level, float* sigdb, float* sigdb0, float* snr, float* dfreq,
|
||||||
float* width, bool* bDiskData);
|
float* width, bool* bDiskData);
|
||||||
|
|
||||||
void fast_decode_(short id2[], int narg[], double * trperiod,
|
void fast_decode_(short id2[], int narg[], double * trperiod,
|
||||||
@ -1602,6 +1602,7 @@ void MainWindow::dataSink(qint64 frames)
|
|||||||
float f1=1500.0 + m_fDither;
|
float f1=1500.0 + m_fDither;
|
||||||
float xlevel=0.0;
|
float xlevel=0.0;
|
||||||
float sigdb=0.0;
|
float sigdb=0.0;
|
||||||
|
float sigdb0=0.0;
|
||||||
float dfreq=0.0;
|
float dfreq=0.0;
|
||||||
float width=m_fSpread;
|
float width=m_fSpread;
|
||||||
echocom_.nclearave=m_nclearave;
|
echocom_.nclearave=m_nclearave;
|
||||||
@ -1612,7 +1613,7 @@ void MainWindow::dataSink(qint64 frames)
|
|||||||
save_echo_params_(&nDopTotal,&nDop,&nfrit,&f1,&width,dec_data.d2,&idir);
|
save_echo_params_(&nDopTotal,&nDop,&nfrit,&f1,&width,dec_data.d2,&idir);
|
||||||
}
|
}
|
||||||
avecho_(dec_data.d2,&nDop,&nfrit,&nauto,&nqual,&f1,&xlevel,&sigdb,
|
avecho_(dec_data.d2,&nDop,&nfrit,&nauto,&nqual,&f1,&xlevel,&sigdb,
|
||||||
&dBerr,&dfreq,&width,&m_diskData);
|
&sigdb0,&dBerr,&dfreq,&width,&m_diskData);
|
||||||
//Don't restart Monitor after an Echo transmission
|
//Don't restart Monitor after an Echo transmission
|
||||||
if(m_bEchoTxed and !m_auto) {
|
if(m_bEchoTxed and !m_auto) {
|
||||||
monitor(false);
|
monitor(false);
|
||||||
@ -1636,12 +1637,11 @@ void MainWindow::dataSink(qint64 frames)
|
|||||||
int n=t0.toInt();
|
int n=t0.toInt();
|
||||||
int nsec=((n/10000)*3600) + (((n/100)%100)*60) + (n%100);
|
int nsec=((n/10000)*3600) + (((n/100)%100)*60) + (n%100);
|
||||||
if(!m_echoRunning or echocom_.nsum<2) m_echoSec0=nsec;
|
if(!m_echoRunning or echocom_.nsum<2) m_echoSec0=nsec;
|
||||||
n=(nsec-m_echoSec0 + 864000)%86400;
|
float hour=n/10000 + ((n/100)%100)/60.0 + (n%100)/3600.0;
|
||||||
if(n>43200) n-=86400;
|
|
||||||
m_echoRunning=true;
|
m_echoRunning=true;
|
||||||
QString t;
|
QString t;
|
||||||
t = t.asprintf("%6d %5.2f %7d %7.1f %7d %7d %7d %7.1f %7.1f",n,xlevel,
|
t = t.asprintf("%9.6f %5.2f %7d %7.1f %7d %7d %7d %7.1f %7.1f %7.1f",hour,xlevel,
|
||||||
nDopTotal,width,echocom_.nsum,nqual,qRound(dfreq),sigdb,dBerr);
|
nDopTotal,width,echocom_.nsum,nqual,qRound(dfreq),sigdb0,sigdb,dBerr);
|
||||||
t = t0 + t;
|
t = t0 + t;
|
||||||
if (ui) ui->decodedTextBrowser->appendText(t);
|
if (ui) ui->decodedTextBrowser->appendText(t);
|
||||||
t=t1+t;
|
t=t1+t;
|
||||||
@ -7127,7 +7127,7 @@ void MainWindow::on_actionEcho_triggered()
|
|||||||
m_bFastMode=false;
|
m_bFastMode=false;
|
||||||
m_bFast9=false;
|
m_bFast9=false;
|
||||||
WSPR_config(true);
|
WSPR_config(true);
|
||||||
ui->lh_decodes_headings_label->setText(" UTC Tsec Level Doppler Width N Q DF SNR dBerr");
|
ui->lh_decodes_headings_label->setText(" UTC Hour Level Doppler Width N Q DF SNR SNRavg dBerr");
|
||||||
// 01234567890123456789012345678901234567
|
// 01234567890123456789012345678901234567
|
||||||
displayWidgets(nWidgets("00000000000000000010001000000000000000"));
|
displayWidgets(nWidgets("00000000000000000010001000000000000000"));
|
||||||
fast_config(false);
|
fast_config(false);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user