mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2025-03-22 12:08:43 -04:00
Many corrections for QMAP behavior regarding CFOM.
This commit is contained in:
parent
e42e995c59
commit
9545c8eaa2
@ -27,7 +27,7 @@ extern struct { //This is "common/datcom/..." in Fortran
|
||||
int ntimeout; //Max for timeouts in Messages and BandMap
|
||||
int ntol; //+/- decoding range around fQSO (Hz)
|
||||
int nxant; //1 ==> add 45 deg to measured pol angle
|
||||
int junk_1;
|
||||
int nCFOM; //1 ==> CFOM already done, 0 otherwise
|
||||
int nfsample; //Input sample rate
|
||||
int nxpol; //1 if using xpol antennas, 0 otherwise
|
||||
int nBaseSubmode; //Base submode for Q65-60x (aka m_modeQ65)
|
||||
@ -68,7 +68,7 @@ extern struct { //This is "common/datcom/..." in Fortran
|
||||
int ntimeout; //Max for timeouts in Messages and BandMap
|
||||
int ntol; //+/- decoding range around fQSO (Hz)
|
||||
int nxant; //1 ==> add 45 deg to measured pol angle
|
||||
int junk_1;
|
||||
int nCFOM; //1 ==> CFOM already done, 0 otherwise
|
||||
int nfsample; //Input sample rate
|
||||
int nxpol; //1 if using xpol antennas, 0 otherwise
|
||||
int nBaseSubmode; //Base submode for Q65-60x (aka m_modeQ65)
|
||||
|
@ -40,15 +40,15 @@ void getfile(QString fname, bool xpol, int dbDgrd)
|
||||
}
|
||||
n = fread(datcom_.mygrid,sizeof(datcom_.mygrid),1,fp);
|
||||
short int one=0;
|
||||
fread(&one,2,1,fp);
|
||||
n= fread(&one,2,1,fp);
|
||||
Q_UNUSED(n);
|
||||
// if(n>0) qDebug() << "bb" << datcom_.mygrid << one;
|
||||
datcom_.nCFOM=one;
|
||||
|
||||
fclose(fp);
|
||||
|
||||
datcom_.ndiskdat=1;
|
||||
int nfreq=(int)datcom_.fcenter;
|
||||
if(nfreq!=144 and nfreq != 432 and nfreq != 1296) datcom_.fcenter=1296.080;
|
||||
if(nfreq!=144 and nfreq != 432 and nfreq != 1296) datcom_.fcenter=1296.090;
|
||||
int i0=fname.indexOf(".iq");
|
||||
datcom_.nutc=0;
|
||||
if(i0>0) {
|
||||
@ -60,7 +60,6 @@ void getfile(QString fname, bool xpol, int dbDgrd)
|
||||
void save_iq(QString fname, bool bCFOM)
|
||||
{
|
||||
int npts=2*60*96000;
|
||||
if(bCFOM) npts=2*npts;
|
||||
|
||||
qint16* buf=(qint16*)malloc(2*npts);
|
||||
char name[80];
|
||||
|
@ -28,3 +28,13 @@ subroutine cfom(dd,k0,k,ndop0)
|
||||
|
||||
return
|
||||
end subroutine cfom
|
||||
|
||||
subroutine zaptx(dd,k0,k)
|
||||
|
||||
parameter(NMAX=60*96000)
|
||||
real dd(2,NMAX)
|
||||
|
||||
dd(1:2,k0+1:k)=0.
|
||||
|
||||
return
|
||||
end subroutine zaptx
|
||||
|
@ -15,7 +15,7 @@ subroutine decode0(dd,ss,savg)
|
||||
nWTransmitting,result(50)
|
||||
common/npar/fcenter,nutc,fselected,mousedf,mousefqso,nagain, &
|
||||
ndepth,ndiskdat,neme,newdat,nfa,nfb,nfcal,nfshift, &
|
||||
mcall3,nkeep,ntol,nxant,nrxlog,nfsample,nxpol,nmode, &
|
||||
mcall3,nkeep,ntol,nxant,nCFOM,nfsample,nxpol,nmode, &
|
||||
ndop00,nsave,max_drift,offset,nhsym,mycall,mygrid, &
|
||||
hiscall,hisgrid,datetime,junk1,junk2,bAlso30
|
||||
data neme0/-99/
|
||||
@ -48,7 +48,7 @@ subroutine decode0(dd,ss,savg)
|
||||
call qmapa(dd,ss,savg,newdat,nutc,fcenter,ntol,nfa,nfb, &
|
||||
mousedf,mousefqso,nagain,nfshift,max_drift,offset, &
|
||||
nfcal,mycall,hiscall,hisgrid,nfsample,nmode,ndepth, &
|
||||
datetime,ndop00,fselected,bAlso30,nhsym)
|
||||
datetime,ndop00,fselected,bAlso30,nhsym,NCFOM)
|
||||
call timer('qmapa ',1)
|
||||
|
||||
return
|
||||
|
@ -1,7 +1,7 @@
|
||||
subroutine q65b(nutc,nqd,fcenter,nfcal,nfsample,ikhz,mousedf,ntol, &
|
||||
ntrperiod,iseq, &
|
||||
mycall0,hiscall0,hisgrid,mode_q65,f0,fqso,nkhz_center, newdat,nagain, &
|
||||
max_drift,offset,ndepth,datetime,ndop00,idec)
|
||||
max_drift,offset,ndepth,datetime,nCFOM,ndop00,idec)
|
||||
|
||||
! This routine provides an interface between QMAP and the Q65 decoder
|
||||
! in WSJT-X. All arguments are input data obtained from the QMAP GUI.
|
||||
@ -130,6 +130,7 @@ subroutine q65b(nutc,nqd,fcenter,nfcal,nfsample,ikhz,mousedf,ntol, &
|
||||
freq1=freq0 + 0.001d0*(ikhz1-ikhz)
|
||||
frx=0.001*k0*df+nkhz_center-48.0+1.0 - 0.001*nfcal
|
||||
fsked=frx - 0.001*ndop00/2.0 - 0.001*offset
|
||||
! write(*,'("A",i5,i8,f10.3,f10.1)') nCFOM,ndop00,frx,fsked
|
||||
ctmp=csubmode//' '//trim(msg0)
|
||||
ndecodes=min(ndecodes+1,50)
|
||||
write(result(ndecodes),1120) nhhmmss,frx,fsked,xdt0,nsnr0,trim(ctmp)
|
||||
|
@ -22,7 +22,7 @@ subroutine q65c(itimer)
|
||||
!### REMEMBER that /npar/ is not updated until nparams=nparams0 is executed. ###
|
||||
common/npar/fcenter,nutc,fselected,mousedf,mousefqso,nagain, &
|
||||
ndepth,ndiskdat,neme,newdat,nn1,nn2,nfcal,nfshift, &
|
||||
mcall3,nkeep,ntol,nxant,nrxlog,nfsample,nxpol,nmode, &
|
||||
mcall3,nkeep,ntol,nxant,nCFOM,nfsample,nxpol,nmode, &
|
||||
ndop00,nsave,nn3,nn4,max_nhsym,mycall,mygrid,hiscall,hisgrid, &
|
||||
datetime,junk1,junk2,bAlso30
|
||||
equivalence (nparams,fcenter)
|
||||
|
@ -1,7 +1,7 @@
|
||||
subroutine qmapa(dd,ss,savg,newdat,nutc,fcenter,ntol,nfa,nfb, &
|
||||
mousedf,mousefqso,nagain,nfshift,max_drift,offset,nfcal,mycall, &
|
||||
hiscall,hisgrid,nfsample,nBaseSubmode,ndepth,datetime,ndop00, &
|
||||
fselected,bAlso30,nhsym)
|
||||
fselected,bAlso30,nhsym,nCFOM)
|
||||
|
||||
! Processes timf2 data received from Linrad to find and decode Q65 signals.
|
||||
|
||||
@ -72,7 +72,7 @@ subroutine qmapa(dd,ss,savg,newdat,nutc,fcenter,ntol,nfa,nfb, &
|
||||
call q65b(nutc,nqd,fcenter,nfcal,nfsample,ikhz,mousedf,ntol, &
|
||||
ntrperiod,iseq, &
|
||||
mycall,hiscall,hisgrid,mode_q65_tmp,f0,fqso,nkhz_center,newdat, &
|
||||
nagain2,max_drift,offset,ndepth,datetime,ndop00,idec)
|
||||
nagain2,max_drift,offset,ndepth,datetime,nCFOM,ndop00,idec)
|
||||
call timer('q65b ',1)
|
||||
tsec=sec_midn() - tsec0
|
||||
if(tsec.gt.30.0) exit !Don't start another decode attempt after t=30 s.
|
||||
|
@ -348,12 +348,13 @@ void MainWindow::dataSink(int k)
|
||||
nfsample=96000;
|
||||
if(!m_fs96000) nfsample=95238;
|
||||
|
||||
|
||||
if(ui->cbCFOM->isChecked()) {
|
||||
int ndop00=0;
|
||||
if(m_astro_window) ndop00=m_astro_window->getSelfDop();
|
||||
cfom_(datcom_.d4, &k0, &k, &ndop00);
|
||||
}
|
||||
|
||||
if(m_bWTransmitting) zaptx_(datcom_.d4, &k0, &k);
|
||||
k0=k;
|
||||
|
||||
symspec_(&k, &ndiskdat, &nb, &m_NBslider, &nfsample,
|
||||
@ -426,7 +427,7 @@ void MainWindow::dataSink(int k)
|
||||
QDateTime t = QDateTime::currentDateTimeUtc();
|
||||
m_dateTime=t.toString("yyMMdd_hhmm");
|
||||
decode(); //Start the decoder
|
||||
if(m_saveAll and !m_diskData and (m_nTx30<5 and m_nTx60<10) and ihsym==m_hsymStop) {
|
||||
if(m_saveAll and !m_diskData and m_nTx60<10 and ihsym==m_hsymStop) {
|
||||
QDir dir(m_saveDir);
|
||||
if (!dir.exists()) dir.mkpath(".");
|
||||
QString fname=m_saveDir + "/" + t.date().toString("yyMMdd") + "_" +
|
||||
@ -436,8 +437,8 @@ void MainWindow::dataSink(int k)
|
||||
*future2 = QtConcurrent::run(save_iq, fname, bCFOM);
|
||||
watcher2->setFuture(*future2);
|
||||
}
|
||||
m_nTx30=0;
|
||||
m_nTx60=0;
|
||||
if(ihsym==200) m_nTx30=0;
|
||||
if(ihsym==m_hsymStop) m_nTx60=0;
|
||||
}
|
||||
soundInThread.m_dataSinkBusy=false;
|
||||
}
|
||||
@ -852,10 +853,11 @@ void MainWindow::decode() //decode()
|
||||
double uth=nhr + nmin/60.0;
|
||||
int nfreq=(int)datcom_.fcenter;
|
||||
int ndop00=0;
|
||||
if(ui->cbCFOM->isChecked()) {
|
||||
// if(ui->cbCFOM->isChecked()) {
|
||||
if(datcom_.nCFOM==0) {
|
||||
astrosub00_(&nyear, &month, &nday, &uth, &nfreq, m_myGrid.toLatin1(),&ndop00,6);
|
||||
}
|
||||
datcom_.ndop00=ndop00; //Send self Doppler (or 0, if using CFOM) to decoder
|
||||
datcom_.ndop00=ndop00; //Send self Doppler (or 0, if disk data had CFOM already) to decoder
|
||||
fname=m_path.mid(i0-11,11);
|
||||
}
|
||||
}
|
||||
@ -879,7 +881,6 @@ void MainWindow::decode() //decode()
|
||||
datcom_.ntol=m_tol;
|
||||
datcom_.nxant=0;
|
||||
m_nutc0=datcom_.nutc;
|
||||
datcom_.junk_1=0;
|
||||
datcom_.nfsample=96000;
|
||||
if(!m_fs96000) datcom_.nfsample=95238;
|
||||
datcom_.nxpol=0;
|
||||
@ -1007,13 +1008,19 @@ void MainWindow::guiUpdate()
|
||||
mem_qmap.unlock();
|
||||
if(itest[4]>0) {
|
||||
m_WSJTX_TRperiod=itest[4];
|
||||
m_bWTransmitting=true;
|
||||
if(m_WSJTX_TRperiod==30) m_nTx30++;
|
||||
if(m_WSJTX_TRperiod==60) m_nTx60++;
|
||||
} else {
|
||||
m_bWTransmitting=false;
|
||||
}
|
||||
if(n60<n60z) {
|
||||
m_nTx30=0;
|
||||
m_nTx60=0;
|
||||
}
|
||||
|
||||
// qDebug() << "aa" << n60z << n60 << m_nTx30 << m_nTx60 << m_bWTransmitting;
|
||||
|
||||
n60z=n60;
|
||||
|
||||
if(m_pctZap>30.0) {
|
||||
|
@ -141,6 +141,7 @@ private:
|
||||
bool m_decode_called=false;
|
||||
bool m_bAlso30=false;
|
||||
bool m_bDiskDatBusy=false;
|
||||
bool m_bWTransmitting=false;
|
||||
|
||||
float m_pctZap;
|
||||
|
||||
@ -209,6 +210,8 @@ extern "C" {
|
||||
|
||||
void cfom_(float d4[], int* k0, int* k, int* ndop0);
|
||||
|
||||
void zaptx_(float d4[], int* k0, int* k);
|
||||
|
||||
}
|
||||
|
||||
#endif // MAINWINDOW_H
|
||||
|
Loading…
Reference in New Issue
Block a user