Code cleanup. Implement use of fQSO, ntol, etc.

git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@2671 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
Joe Taylor
2012-10-19 19:26:07 +00:00
parent ed2cd7b155
commit b10df1efdc
12 changed files with 58 additions and 44 deletions
+8 -10
View File
@@ -14,7 +14,7 @@ subroutine decoder(ntrSeconds,c0)
integer*2 id2
complex c0(NDMAX)
common/jt9com/ss(184,NSMAX),savg(NSMAX),id2(NMAX),nutc,ndiskdat, &
ntr,mousefqso,nagain,newdat,nfa,nfb,ntol,kin
ntr,nfqso,nagain,newdat,npts8,nfb,ntol,kin
ntrMinutes=ntrSeconds/60
newdat=1
@@ -35,24 +35,22 @@ subroutine decoder(ntrSeconds,c0)
! Now do the decoding
nutc=0
kstep=nsps/2
tstep=kstep/12000.0
ntol=500
nfqso=1500
! Get sync, approx freq
call sync9(ss,tstep,df3,ntol,nfqso,sync,fpk,red)
npts8=170880 !### TEST ONLY ###
print*,'A',nfqso,ntol,fpk
call spec9(c0,npts8,nsps,fpk,xdt,i1SoftSymbols)
call decode9(i1SoftSymbols,msg)
open(73,file='decoded.txt',status='unknown')
rewind 73
open(13,file='decoded.txt',status='unknown')
rewind 13
! write(*,1010) nutc,sync,xdt,1000.0+fpk,msg
write(73,1010) nutc,sync,xdt,1000.0+fpk,msg
write(13,1010) nutc,sync,xdt,1000.0+fpk,msg
1010 format(i4.4,3f7.1,2x,a22)
call flush(73)
close(73)
call flush(13)
close(13)
return
end subroutine decoder
+5 -4
View File
@@ -2,6 +2,7 @@ subroutine spec9(c0,npts8,nsps,fpk,xdt,i1SoftSymbols)
parameter (MAXFFT=31500)
complex c0(0:npts8-1)
complex c1(0:2700000)
real ssym(0:7,69)
complex c(0:MAXFFT-1)
integer*1 i1SoftSymbolsScrambled(207)
@@ -27,17 +28,17 @@ subroutine spec9(c0,npts8,nsps,fpk,xdt,i1SoftSymbols)
phi=phi+dphi
if(phi.gt.twopi) phi=phi-twopi
if(phi.lt.-twopi) phi=phi+twopi
c0(i)=cmplx(aimag(c0(i)),real(c0(i)))*cmplx(cos(phi),sin(phi))
c1(i)=cmplx(aimag(c0(i)),real(c0(i)))*cmplx(cos(phi),sin(phi))
enddo
nsps8=nsps/8
foffset=fpk
istart=1520
call peakdf9(c0,npts8,nsps8,istart,foffset,idf)
call peakdf9(c1,npts8,nsps8,istart,foffset,idf)
fpk=fpk + idf*0.1*1500.0/nsps8
foffset=foffset + idf*0.1*1500.0/nsps8
call peakdt9(c0,npts8,nsps8,istart,foffset,idt)
call peakdt9(c1,npts8,nsps8,istart,foffset,idt)
istart=istart + 0.0625*nsps8*idt
xdt=istart/1500.0 - 1.0
! write(*,3002) 0.0625*nsps8*idt/1500.0,idf*0.1*1500.0/nsps8
@@ -57,7 +58,7 @@ subroutine spec9(c0,npts8,nsps,fpk,xdt,i1SoftSymbols)
k=k+1
ia=(j-1)*nsps8 + istart
ib=ia+nsps8-1
c(0:nfft-1)=c0(ia:ib)
c(0:nfft-1)=c1(ia:ib)
phi=0.
do i=0,nfft-1
+1 -1
View File
@@ -37,7 +37,7 @@ subroutine symspec(k,ntrperiod,nsps,nb,nbslider,pxdb,s,red, &
data rms/999.0/,k0/99999999/,ntrperiod0/0/,nfft3z/0/
save
if(ntrperiod.eq.1) nfft3=1024
if(ntrperiod.eq.1) nfft3=2048
if(ntrperiod.eq.2) nfft3=2048
if(ntrperiod.eq.5) nfft3=6144
if(ntrperiod.eq.10) nfft3=12288