mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2025-03-29 23:52:24 -04:00
Working on smooth functioning of decoding average messages. Not finished, yet!
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/map65@2540 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
parent
5879498755
commit
46280056b0
@ -31,6 +31,8 @@ extern struct { //This is "common/datcom/..." in Fortran
|
|||||||
int nfsample; //Input sample rate
|
int nfsample; //Input sample rate
|
||||||
int nxpol; //1 if using xpol antennas, 0 otherwise
|
int nxpol; //1 if using xpol antennas, 0 otherwise
|
||||||
int mode65; //JT65 sub-mode: A=1, B=2, C=4
|
int mode65; //JT65 sub-mode: A=1, B=2, C=4
|
||||||
|
int nfast; //1 for sub-modes ABC; 2 for B2, C2
|
||||||
|
int nsave; //Number of s3(64,63) spectra saved
|
||||||
char mycall[12];
|
char mycall[12];
|
||||||
char mygrid[6];
|
char mygrid[6];
|
||||||
char hiscall[12];
|
char hiscall[12];
|
||||||
|
@ -11,7 +11,7 @@ subroutine decode0(dd,ss,savg,nstandalone)
|
|||||||
common/npar/fcenter,nutc,idphi,mousedf,mousefqso,nagain, &
|
common/npar/fcenter,nutc,idphi,mousedf,mousefqso,nagain, &
|
||||||
ndepth,ndiskdat,neme,newdat,nfa,nfb,nfcal,nfshift, &
|
ndepth,ndiskdat,neme,newdat,nfa,nfb,nfcal,nfshift, &
|
||||||
mcall3,nkeep,ntol,nxant,nrxlog,nfsample,nxpol,mode65, &
|
mcall3,nkeep,ntol,nxant,nrxlog,nfsample,nxpol,mode65, &
|
||||||
mycall,mygrid,hiscall,hisgrid,datetime
|
nfast,nsave,mycall,mygrid,hiscall,hisgrid,datetime
|
||||||
common/tracer/ limtrace,lu
|
common/tracer/ limtrace,lu
|
||||||
data neme0/-99/,mcall3b/1/
|
data neme0/-99/,mcall3b/1/
|
||||||
save
|
save
|
||||||
@ -53,12 +53,16 @@ subroutine decode0(dd,ss,savg,nstandalone)
|
|||||||
call timer('map65a ',0)
|
call timer('map65a ',0)
|
||||||
call map65a(dd,ss,savg,newdat,nutc,fcenter,ntol,idphi,nfa,nfb, &
|
call map65a(dd,ss,savg,newdat,nutc,fcenter,ntol,idphi,nfa,nfb, &
|
||||||
mousedf,mousefqso,nagain,ndecdone,ndiskdat,nfshift,ndphi, &
|
mousedf,mousefqso,nagain,ndecdone,ndiskdat,nfshift,ndphi, &
|
||||||
nfcal,nkeep,mcall3b,nsave,nxant,rmsdd,mycall,mygrid, &
|
nfcal,nkeep,mcall3b,nsum,nsave0,nxant,rmsdd,mycall,mygrid, &
|
||||||
neme,ndepth,hiscall,hisgrid,nhsym,nfsample,nxpol,mode65)
|
neme,ndepth,hiscall,hisgrid,nhsym,nfsample,nxpol,mode65)
|
||||||
|
|
||||||
call timer('map65a ',1)
|
call timer('map65a ',1)
|
||||||
call timer('decode0 ',1)
|
call timer('decode0 ',1)
|
||||||
if(nstandalone.eq.0) call timer('decode0 ',101)
|
if(nstandalone.eq.0) call timer('decode0 ',101)
|
||||||
|
|
||||||
|
write(*,1010) nsum,nsave0
|
||||||
|
1010 format('<m65aFinished>',2i4)
|
||||||
|
flush(6)
|
||||||
|
|
||||||
return
|
return
|
||||||
end subroutine decode0
|
end subroutine decode0
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
subroutine decode1a(dd,newdat,f0,nflip,mode65,nfsample,xpol,
|
subroutine decode1a(dd,newdat,f0,nflip,mode65,nfsample,xpol,
|
||||||
+ mycall,hiscall,hisgrid,neme,ndepth,nqd,dphi,ndphi,iloop,
|
+ mycall,hiscall,hisgrid,neme,ndepth,nqd,dphi,ndphi,iloop,
|
||||||
+ nutc,nkhz,ndf,ipol,sync2,a,dt,pol,nkv,nhist,nsave,qual,decoded)
|
+ nutc,nkhz,ndf,ipol,sync2,a,dt,pol,nkv,nhist,nsum,nsave,
|
||||||
|
+ qual,decoded)
|
||||||
|
|
||||||
! Apply AFC corrections to a candidate JT65 signal, then decode it.
|
! Apply AFC corrections to a candidate JT65 signal, then decode it.
|
||||||
|
|
||||||
@ -139,7 +140,8 @@
|
|||||||
nkhz0=nkhz
|
nkhz0=nkhz
|
||||||
nsave=min(32,nsave+1)
|
nsave=min(32,nsave+1)
|
||||||
npol=nint(57.296*pol)
|
npol=nint(57.296*pol)
|
||||||
call s3avg(nsave,mode65,nutc,ndf,dt+0.8,npol,s3,nkv,decoded)
|
call s3avg(nsave,mode65,nutc,ndf,dt+0.8,npol,s3,nsum,
|
||||||
|
+ nkv,decoded)
|
||||||
syncbest=sync2
|
syncbest=sync2
|
||||||
endif
|
endif
|
||||||
nutc0=nutc
|
nutc0=nutc
|
||||||
|
@ -13,11 +13,11 @@ program m65
|
|||||||
real*8 fc0,fcenter
|
real*8 fc0,fcenter
|
||||||
character*80 arg,infile
|
character*80 arg,infile
|
||||||
character mycall*12,hiscall*12,mygrid*6,hisgrid*6,datetime*20
|
character mycall*12,hiscall*12,mygrid*6,hisgrid*6,datetime*20
|
||||||
common/datcom/dd(4,5760000),ss(4,322,NFFT),savg(4,NFFT),fc0,nutc0,junk(34)
|
common/datcom/dd(4,5760000),ss(4,322,NFFT),savg(4,NFFT),fc0,nutc0,junk(36)
|
||||||
common/npar/fcenter,nutc,idphi,mousedf,mousefqso,nagain, &
|
common/npar/fcenter,nutc,idphi,mousedf,mousefqso,nagain, &
|
||||||
ndepth,ndiskdat,neme,newdat,nfa,nfb,nfcal,nfshift, &
|
ndepth,ndiskdat,neme,newdat,nfa,nfb,nfcal,nfshift, &
|
||||||
mcall3,nkeep,ntol,nxant,nrxlog,nfsample,nxpol,mode65, &
|
mcall3,nkeep,ntol,nxant,nrxlog,nfsample,nxpol,mode65, &
|
||||||
mycall,mygrid,hiscall,hisgrid,datetime
|
nfast,nsave,mycall,mygrid,hiscall,hisgrid,datetime
|
||||||
|
|
||||||
nargs=iargc()
|
nargs=iargc()
|
||||||
if(nargs.lt.1) then
|
if(nargs.lt.1) then
|
||||||
|
@ -45,10 +45,6 @@ subroutine m65a
|
|||||||
p_m65=>address_m65()
|
p_m65=>address_m65()
|
||||||
call m65b(p_m65,nbytes)
|
call m65b(p_m65,nbytes)
|
||||||
|
|
||||||
write(*,1010)
|
|
||||||
1010 format('<m65aFinished>')
|
|
||||||
flush(6)
|
|
||||||
|
|
||||||
100 inquire(file=trim(cwd)//'/.lock',exist=fileExists)
|
100 inquire(file=trim(cwd)//'/.lock',exist=fileExists)
|
||||||
if(fileExists) go to 10
|
if(fileExists) go to 10
|
||||||
call sleep_msec(100)
|
call sleep_msec(100)
|
||||||
@ -70,14 +66,14 @@ subroutine m65c(dd,ss,savg,nparams0)
|
|||||||
integer*1 detach_m65
|
integer*1 detach_m65
|
||||||
real*4 dd(4,5760000),ss(4,322,32768),savg(4,32768)
|
real*4 dd(4,5760000),ss(4,322,32768),savg(4,32768)
|
||||||
real*8 fcenter
|
real*8 fcenter
|
||||||
integer nparams0(37),nparams(37)
|
integer nparams0(40),nparams(40)
|
||||||
character*12 mycall,hiscall
|
character*12 mycall,hiscall
|
||||||
character*6 mygrid,hisgrid
|
character*6 mygrid,hisgrid
|
||||||
character*20 datetime
|
character*20 datetime
|
||||||
common/npar/fcenter,nutc,idphi,mousedf,mousefqso,nagain, &
|
common/npar/fcenter,nutc,idphi,mousedf,mousefqso,nagain, &
|
||||||
ndepth,ndiskdat,neme,newdat,nfa,nfb,nfcal,nfshift, &
|
ndepth,ndiskdat,neme,newdat,nfa,nfb,nfcal,nfshift, &
|
||||||
mcall3,nkeep,ntol,nxant,nrxlog,nfsample,nxpol,mode65, &
|
mcall3,nkeep,ntol,nxant,nrxlog,nfsample,nxpol,mode65, &
|
||||||
mycall,mygrid,hiscall,hisgrid,datetime
|
nfast,nsave,mycall,mygrid,hiscall,hisgrid,datetime
|
||||||
equivalence (nparams,fcenter)
|
equivalence (nparams,fcenter)
|
||||||
|
|
||||||
nparams=nparams0 !Copy parameters into common/npar/
|
nparams=nparams0 !Copy parameters into common/npar/
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
subroutine map65a(dd,ss,savg,newdat,nutc,fcenter,ntol,idphi,nfa,nfb, &
|
subroutine map65a(dd,ss,savg,newdat,nutc,fcenter,ntol,idphi,nfa,nfb, &
|
||||||
mousedf,mousefqso,nagain,ndecdone,ndiskdat,nfshift,ndphi, &
|
mousedf,mousefqso,nagain,ndecdone,ndiskdat,nfshift,ndphi, &
|
||||||
nfcal,nkeep,mcall3b,nsave,nxant,rmsdd,mycall,mygrid, &
|
nfcal,nkeep,mcall3b,nsum,nsave,nxant,rmsdd,mycall,mygrid, &
|
||||||
neme,ndepth,hiscall,hisgrid,nhsym,nfsample,nxpol,mode65)
|
neme,ndepth,hiscall,hisgrid,nhsym,nfsample,nxpol,mode65)
|
||||||
|
|
||||||
! Processes timf2 data from Linrad to find and decode JT65 signals.
|
! Processes timf2 data from Linrad to find and decode JT65 signals.
|
||||||
@ -206,7 +206,7 @@ subroutine map65a(dd,ss,savg,newdat,nutc,fcenter,ntol,idphi,nfa,nfb, &
|
|||||||
call decode1a(dd,newdat,f00,nflip,mode65,nfsample,xpol, &
|
call decode1a(dd,newdat,f00,nflip,mode65,nfsample,xpol, &
|
||||||
mycall,hiscall,hisgrid,neme,ndepth,nqd,dphi,ndphi, &
|
mycall,hiscall,hisgrid,neme,ndepth,nqd,dphi,ndphi, &
|
||||||
iloop,nutc,ikHz,idf,ipol,sync2,a,dt,pol,nkv,nhist, &
|
iloop,nutc,ikHz,idf,ipol,sync2,a,dt,pol,nkv,nhist, &
|
||||||
nsave,qual,decoded)
|
nsum,nsave,qual,decoded)
|
||||||
dt=dt+0.8 !### empirical tweak
|
dt=dt+0.8 !### empirical tweak
|
||||||
call timer('decode1a',1)
|
call timer('decode1a',1)
|
||||||
|
|
||||||
|
@ -11,7 +11,7 @@ subroutine recvpkt(nsam,nblock2,userx_no,k,buf4,buf8,buf16)
|
|||||||
integer*2 jd(4),kd(2),nblock2
|
integer*2 jd(4),kd(2),nblock2
|
||||||
real*4 xd(4),yd(2)
|
real*4 xd(4),yd(2)
|
||||||
real*8 fcenter
|
real*8 fcenter
|
||||||
common/datcom/dd(4,5760000),ss(4,322,NFFT),savg(4,NFFT),fcenter,nutc,junk(34)
|
common/datcom/dd(4,5760000),ss(4,322,NFFT),savg(4,NFFT),fcenter,nutc,junk(36)
|
||||||
equivalence (kd,d4)
|
equivalence (kd,d4)
|
||||||
equivalence (jd,d8,yd)
|
equivalence (jd,d8,yd)
|
||||||
equivalence (xd,c16)
|
equivalence (xd,c16)
|
||||||
|
@ -1,34 +1,37 @@
|
|||||||
subroutine s3avg(nsave,mode65,nutc,ndf,xdt,npol,s3,nkv,decoded)
|
subroutine s3avg(nsave,mode65,nutc,ndf,xdt,npol,s3,nsum,nkv,decoded)
|
||||||
|
|
||||||
real s3(64,63),s3b(64,63)
|
! Save the current synchronized spectra, s3(64,63), for possible
|
||||||
real s3a(64,63,32)
|
! decoding of average.
|
||||||
|
|
||||||
|
real s3(64,63) !Synchronized spectra for 63 symbols
|
||||||
|
real s3a(64,63,32) !Saved spectra
|
||||||
|
real s3b(64,63) !Average
|
||||||
integer iutc(32),idf(32),ipol(32)
|
integer iutc(32),idf(32),ipol(32)
|
||||||
real dt(32)
|
real dt(32)
|
||||||
character*22 decoded
|
character*22 decoded
|
||||||
logical ltext
|
logical ltext
|
||||||
save
|
save
|
||||||
|
|
||||||
n=nsave
|
iutc(nsave)=nutc !Save UTC
|
||||||
iutc(n)=nutc
|
idf(nsave)=ndf !Save DF
|
||||||
idf(n)=ndf
|
ipol(nsave)=npol !Save pol
|
||||||
ipol(n)=npol
|
dt(nsave)=xdt !Save DT
|
||||||
dt(n)=xdt
|
s3a(1:64,1:63,nsave)=s3 !Save the spectra
|
||||||
s3a(1:64,1:63,n)=s3
|
|
||||||
|
|
||||||
s3b=0.
|
s3b=0.
|
||||||
nsum=0
|
nsum=0
|
||||||
idfdiff=100
|
idfdiff=100
|
||||||
dtdiff=0.2
|
dtdiff=0.2
|
||||||
do i=1,n
|
do i=1,nsave !Accumulate avg spectra
|
||||||
if(mod(iutc(i),2).ne.mod(nutc,2)) cycle
|
if(mod(iutc(i),2).ne.mod(nutc,2)) cycle !Use only 1st or 2nd sequence
|
||||||
if(abs(ndf-idf(i)).gt.idfdiff) cycle
|
if(abs(ndf-idf(i)).gt.idfdiff) cycle !DF must match
|
||||||
if(abs(xdt-dt(i)).gt.dtdiff) cycle
|
if(abs(xdt-dt(i)).gt.dtdiff) cycle !DT must match
|
||||||
s3b=s3b + s3a(1:64,1:63,i)
|
s3b=s3b + s3a(1:64,1:63,i)
|
||||||
nsum=nsum+1
|
nsum=nsum+1
|
||||||
enddo
|
enddo
|
||||||
|
|
||||||
decoded=' '
|
decoded=' '
|
||||||
if(nsum.ge.2) then
|
if(nsum.ge.2) then !Try decoding the sverage
|
||||||
nadd=mode65*nsum
|
nadd=mode65*nsum
|
||||||
call extract(s3b,nadd,ncount,nhist,decoded,ltext) !Extract the message
|
call extract(s3b,nadd,ncount,nhist,decoded,ltext) !Extract the message
|
||||||
nkv=nsum
|
nkv=nsum
|
||||||
|
@ -22,7 +22,7 @@ subroutine symspec(k,nxpol,ndiskdat,nb,nbslider,idphi,nfsample,fgreen, &
|
|||||||
parameter (NFFT=32768) !Length of FFTs
|
parameter (NFFT=32768) !Length of FFTs
|
||||||
real*8 ts,hsym
|
real*8 ts,hsym
|
||||||
real*8 fcenter
|
real*8 fcenter
|
||||||
common/datcom/dd(4,5760000),ss(4,322,NFFT),savg(4,NFFT),fcenter,nutc,junk(34)
|
common/datcom/dd(4,5760000),ss(4,322,NFFT),savg(4,NFFT),fcenter,nutc,junk(36)
|
||||||
real*4 ssz5a(NFFT),w(NFFT)
|
real*4 ssz5a(NFFT),w(NFFT)
|
||||||
complex z,zfac
|
complex z,zfac
|
||||||
complex zsumx,zsumy
|
complex zsumx,zsumy
|
||||||
|
@ -137,6 +137,8 @@ MainWindow::MainWindow(QWidget *parent) :
|
|||||||
m_adjustIQ=0;
|
m_adjustIQ=0;
|
||||||
m_applyIQcal=0;
|
m_applyIQcal=0;
|
||||||
m_colors="000066ff0000ffff00969696646464";
|
m_colors="000066ff0000ffff00969696646464";
|
||||||
|
m_nfast=1;
|
||||||
|
m_nsave=0;
|
||||||
|
|
||||||
ui->xThermo->setFillBrush(Qt::green);
|
ui->xThermo->setFillBrush(Qt::green);
|
||||||
ui->yThermo->setFillBrush(Qt::magenta);
|
ui->yThermo->setFillBrush(Qt::magenta);
|
||||||
@ -1196,6 +1198,8 @@ void MainWindow::decode() //decode()
|
|||||||
datcom_.nxpol=0;
|
datcom_.nxpol=0;
|
||||||
if(m_xpol) datcom_.nxpol=1;
|
if(m_xpol) datcom_.nxpol=1;
|
||||||
datcom_.mode65=m_mode65;
|
datcom_.mode65=m_mode65;
|
||||||
|
datcom_.nfast=m_nfast;
|
||||||
|
datcom_.nsave=m_nsave;
|
||||||
|
|
||||||
QString mcall=(m_myCall+" ").mid(0,12);
|
QString mcall=(m_myCall+" ").mid(0,12);
|
||||||
QString mgrid=(m_myGrid+" ").mid(0,6);
|
QString mgrid=(m_myGrid+" ").mid(0,6);
|
||||||
@ -1227,7 +1231,6 @@ void MainWindow::decode() //decode()
|
|||||||
|
|
||||||
QFile lockFile(m_appDir + "/.lock"); // Allow m65 to start
|
QFile lockFile(m_appDir + "/.lock"); // Allow m65 to start
|
||||||
lockFile.remove();
|
lockFile.remove();
|
||||||
|
|
||||||
decodeBusy(true);
|
decodeBusy(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1252,6 +1255,12 @@ void MainWindow::readFromStdout() //readFromStdout
|
|||||||
{
|
{
|
||||||
QByteArray t=proc_m65.readLine();
|
QByteArray t=proc_m65.readLine();
|
||||||
if(t.indexOf("<m65aFinished>") >= 0) {
|
if(t.indexOf("<m65aFinished>") >= 0) {
|
||||||
|
// int nsum,nsave;
|
||||||
|
// scanf("<m65aFinished> %d %d",&nsum,&nsave);
|
||||||
|
// m_nsum=nsum;
|
||||||
|
// m_nsave=nsave;
|
||||||
|
// qDebug() << m_nsum << m_nsave;
|
||||||
|
qDebug() << t;
|
||||||
if(m_widebandDecode) {
|
if(m_widebandDecode) {
|
||||||
g_pMessages->setText(m_messagesText);
|
g_pMessages->setText(m_messagesText);
|
||||||
g_pBandMap->setText(m_bandmapText);
|
g_pBandMap->setText(m_bandmapText);
|
||||||
|
@ -154,6 +154,9 @@ private:
|
|||||||
qint32 m_adjustIQ;
|
qint32 m_adjustIQ;
|
||||||
qint32 m_applyIQcal;
|
qint32 m_applyIQcal;
|
||||||
qint32 m_mult570;
|
qint32 m_mult570;
|
||||||
|
qint32 m_nfast;
|
||||||
|
qint32 m_nsum;
|
||||||
|
qint32 m_nsave;
|
||||||
|
|
||||||
double m_fAdd;
|
double m_fAdd;
|
||||||
double m_IQamp;
|
double m_IQamp;
|
||||||
|
@ -32,6 +32,8 @@ extern struct {
|
|||||||
int nfsample; //Input sample rate
|
int nfsample; //Input sample rate
|
||||||
int nxpol; //1 if using xpol antennas, 0 otherwise
|
int nxpol; //1 if using xpol antennas, 0 otherwise
|
||||||
int mode65; //JT65 sub-mode: A=1, B=2, C=4
|
int mode65; //JT65 sub-mode: A=1, B=2, C=4
|
||||||
|
int nfast; //1 for sub-modes ABC; 2 for B2, C2
|
||||||
|
int nsave; //Number of s3(64,63) spectra saved
|
||||||
char mycall[12];
|
char mycall[12];
|
||||||
char mygrid[6];
|
char mygrid[6];
|
||||||
char hiscall[12];
|
char hiscall[12];
|
||||||
|
Loading…
Reference in New Issue
Block a user