mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2025-02-21 13:08:39 -05:00
These are the files from QRA64 "ee" test.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@7368 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
parent
bc068209dc
commit
91cf07f6b9
13
lib/Makefile
13
lib/Makefile
@ -1,19 +1,6 @@
|
||||
# Set paths
|
||||
EXE_DIR = ..\\..\\wsjtx_install
|
||||
QT_DIR = C:/wsjt-env/Qt5/5.2.1/mingw48_32
|
||||
FFTW3_DIR = ..
|
||||
|
||||
INCPATH = -I${QT_DIR}/include/QtCore -I${QT_DIR}/include
|
||||
|
||||
# Compilers
|
||||
CC = gcc
|
||||
CXX = g++
|
||||
FC = gfortran
|
||||
AR = ar cr
|
||||
RANLIB = ranlib
|
||||
MKDIR = mkdir -p
|
||||
CP = cp
|
||||
RM = rm -f
|
||||
|
||||
FFLAGS = -O2 -fbounds-check -Wall -Wno-conversion
|
||||
CFLAGS = -O2 -I.
|
||||
|
@ -99,6 +99,12 @@ contains
|
||||
if(nsubmode.ge.100) then
|
||||
! This is QRA64 mode
|
||||
mode64=2**(nsubmode-100)
|
||||
!###
|
||||
! open(60,file='qra64_data.bin',access='stream',position='append')
|
||||
! write(60) dd,npts,nutc,nf1,nf2,nfqso,ntol,mode64,minsync,ndepth, &
|
||||
! mycall,hiscall,hisgrid
|
||||
! close(60)
|
||||
!###
|
||||
call qra64a(dd,npts,nutc,nf1,nf2,nfqso,ntol,mode64,minsync,ndepth, &
|
||||
mycall,hiscall,hisgrid,sync,nsnr,dtx,nfreq,decoded,nft)
|
||||
if (associated(this%callback)) then
|
||||
|
@ -61,26 +61,28 @@ subroutine qra64a(dd,npts,nutc,nf1,nf2,nfqso,ntol,mode64,minsync,ndepth, &
|
||||
call timer('sync64 ',0)
|
||||
call sync64(dd,npts,nf1,nf2,nfqso,ntol,mode64,maxf1,dtx,f0,jpk0,kpk,sync,c00)
|
||||
call timer('sync64 ',1)
|
||||
if(sync.lt.3.4) go to 900
|
||||
a=0.
|
||||
a(1)=-f0
|
||||
nfreq=nint(f0)
|
||||
npts2=npts/2
|
||||
call twkfreq(c00,c0,npts2,6000.0,a)
|
||||
|
||||
irc=-99
|
||||
s3lim=20.
|
||||
|
||||
npts2=npts/2
|
||||
itz=11
|
||||
if(mode64.eq.4) itz=9
|
||||
if(mode64.eq.2) itz=7
|
||||
if(mode64.eq.1) itz=5
|
||||
|
||||
|
||||
LL=64*(mode64+2)
|
||||
NN=63
|
||||
napmin=99
|
||||
do itry0=1,7
|
||||
do itry0=1,5
|
||||
idt=itry0/2
|
||||
if(mod(itry0,2).eq.0) idt=-idt
|
||||
jpk=jpk0 + 1500*idt
|
||||
a=0.
|
||||
a(1)=-f0
|
||||
nfreq=nint(f0)
|
||||
call twkfreq(c00,c0,npts2,6000.0,a)
|
||||
jpk=jpk0 + 750*idt
|
||||
call spec64(c0,npts2,mode64,jpk,s3a,LL,NN)
|
||||
call pctile(s3a,LL*NN,45,base)
|
||||
s3a=s3a/base
|
||||
@ -136,10 +138,6 @@ subroutine qra64a(dd,npts,nutc,nf1,nf2,nfqso,ntol,mode64,minsync,ndepth, &
|
||||
snr2=0.
|
||||
endif
|
||||
|
||||
write(60,3100) nutc,nsnr,dtx,f0,sync,itry0,iter,irc,decoded
|
||||
3100 format(i4.4,i4,f6.2,2f7.1,3i4,2x,a22)
|
||||
flush(60)
|
||||
|
||||
if(irc.lt.0) then
|
||||
sy=max(1.0,sync-2.5)
|
||||
if(nSubmode.eq.0) nsnr=nint(10.0*log10(sy)-38.0) !A
|
||||
|
@ -2,32 +2,41 @@ program qratest
|
||||
|
||||
parameter (NMAX=60*12000)
|
||||
real dd(NMAX)
|
||||
character*8 arg
|
||||
character*12 mycall,hiscall
|
||||
character*6 hisgrid
|
||||
character*22 decoded
|
||||
character arg*8,mycall*12,hiscall*12,hisgrid*6,decoded*22
|
||||
character c*1,label*3
|
||||
|
||||
nargs=iargc()
|
||||
if(nargs.ne.3) then
|
||||
print*,'Usage: qratest f0 maxf1 fTol'
|
||||
if(nargs.lt.1 .or. nargs.gt.3) then
|
||||
print*,'Usage: qratest nfile [f0 fTol]'
|
||||
go to 999
|
||||
endif
|
||||
call getarg(1,arg)
|
||||
read(arg,*) nf0
|
||||
call getarg(2,arg)
|
||||
read(arg,*) maxf1
|
||||
call getarg(3,arg)
|
||||
read(arg,*) ntol
|
||||
read(arg,*) nfile
|
||||
if(nargs.gt.1) then
|
||||
call getarg(2,arg)
|
||||
read(arg,*) maxf1
|
||||
call getarg(3,arg)
|
||||
read(arg,*) ntol
|
||||
endif
|
||||
ndepth=3
|
||||
nft=99
|
||||
|
||||
open(60,file='qra64_data.bin',access='stream')
|
||||
|
||||
! do n=1,999
|
||||
do n=1,1
|
||||
read(60,end=999) dd,npts,nutc,nf1,nf2,nfqso,ntol,mode64,minsync,mycall, &
|
||||
hiscall,hisgrid
|
||||
do ifile=1,999
|
||||
read(60,end=999) dd,npts,nutc,nf1,nf2,nfqso,ntol,mode64,minsync,ndepth, &
|
||||
mycall,hiscall,hisgrid
|
||||
if(ifile.lt.nfile) cycle
|
||||
call qra64a(dd,npts,nutc,nf1,nf2,nfqso,ntol,mode64,minsync,ndepth, &
|
||||
mycall,hiscall,hisgrid,sync,nsnr,dtx,nfreq,decoded,nft)
|
||||
write(*,1000) nutc,nsnr,dtx,nfreq,decoded,nft-100
|
||||
1000 format(i4.4,i4,f6.2,i5,1x,a22,i3)
|
||||
c='a'
|
||||
if(mode64.eq.2) c='b'
|
||||
if(mode64.eq.4) c='c'
|
||||
if(mode64.eq.8) c='d'
|
||||
if(mode64.eq.16) c='e'
|
||||
write(*,1000) ifile,c,nutc,nsnr,dtx,nfreq,decoded,nft-100
|
||||
1000 format(i4,1x,a1,1x,i4.4,i4,f6.2,i5,1x,a22,i3)
|
||||
if(ifile.eq.nfile) exit
|
||||
enddo
|
||||
|
||||
999 end program qratest
|
||||
|
@ -27,15 +27,12 @@ subroutine sync64(dd,npts,nf1,nf2,nfqso,ntol,mode64,maxf1,dtx,f0,jpk,kpk, &
|
||||
save
|
||||
|
||||
if(mode64.ne.mode64z) then
|
||||
nsync=10
|
||||
inquire(file='old_qra_sync',exist=old_qra_sync)
|
||||
if(old_qra_sync) nsync=1
|
||||
twopi=8.0*atan(1.0)
|
||||
dfgen=mode64*12000.0/6912.0
|
||||
k=-1
|
||||
phi=0.
|
||||
do j=0,6 !Compute complex Costas waveform
|
||||
dphi=twopi*nsync*icos7(j)*dfgen/6000.0
|
||||
dphi=twopi*10.0*icos7(j)*dfgen/6000.0
|
||||
do i=1,NSPS
|
||||
phi=phi + dphi
|
||||
if(phi.gt.twopi) phi=phi-twopi
|
||||
@ -61,15 +58,17 @@ subroutine sync64(dd,npts,nf1,nf2,nfqso,ntol,mode64,maxf1,dtx,f0,jpk,kpk, &
|
||||
nh3=nfft3/2
|
||||
df3=6000.0/nfft3
|
||||
|
||||
faa=max(nf1,nfqso-ntol)
|
||||
fbb=min(nf2,nfqso+ntol)
|
||||
iaa=nint(faa/df3)
|
||||
ibb=nint(fbb/df3)
|
||||
fa=max(nf1,nfqso-ntol)
|
||||
fb=min(nf2,nfqso+ntol)
|
||||
iaa=max(0,nint(fa/df3))
|
||||
ibb=min(NSPC-1,nint(fb/df3))
|
||||
|
||||
fa=max(nf1,nfqso-1000)
|
||||
fb=min(nf2,nfqso+1000)
|
||||
ia=nint(fa/df3)
|
||||
ib=nint(fb/df3)
|
||||
maxtol=max(ntol,500)
|
||||
fa=max(nf1,nfqso-maxtol)
|
||||
fb=min(nf2,nfqso+maxtol)
|
||||
ia=max(0,nint(fa/df3))
|
||||
ib=min(NSPC-1,nint(fb/df3))
|
||||
id=0.1*(ib-ia)
|
||||
|
||||
iz=ib-ia+1
|
||||
sync=0.
|
||||
@ -77,10 +76,13 @@ subroutine sync64(dd,npts,nf1,nf2,nfqso,ntol,mode64,maxf1,dtx,f0,jpk,kpk, &
|
||||
jpk=0
|
||||
ja=0
|
||||
jb=7.5*6000
|
||||
jstep=200
|
||||
jstep=100
|
||||
ipk=0
|
||||
nskip=max(14,10*mode64)
|
||||
|
||||
kpk=0
|
||||
nadd=10*mode64
|
||||
if(mod(nadd,2).eq.0) nadd=nadd+1 !Make nadd odd
|
||||
nskip=max(49,nadd)
|
||||
|
||||
do j1=ja,jb,jstep
|
||||
call timer('sync64_1',0)
|
||||
j2=j1 + 39*NSPS
|
||||
@ -91,7 +93,6 @@ subroutine sync64(dd,npts,nf1,nf2,nfqso,ntol,mode64,maxf1,dtx,f0,jpk,kpk, &
|
||||
call four2a(c2,nfft3,1,-1,1)
|
||||
c3=1.e-4*c0(j3:j3+NSPC-1) * conjg(cc)
|
||||
call four2a(c3,nfft3,1,-1,1)
|
||||
s0=0.
|
||||
s1=0.
|
||||
s2=0.
|
||||
s3=0.
|
||||
@ -106,33 +107,26 @@ subroutine sync64(dd,npts,nf1,nf2,nfqso,ntol,mode64,maxf1,dtx,f0,jpk,kpk, &
|
||||
|
||||
call timer('sync64_2',0)
|
||||
s0(ia:ib)=s1(ia:ib) + s2(ia:ib) + s3(ia:ib)
|
||||
call pctile(s0(ia:ib),iz,45,ave)
|
||||
s0(:ia-1)=0.
|
||||
s0(ib+1:)=0.
|
||||
smax=0.
|
||||
do na=0,3
|
||||
nadd=7*(2**na)
|
||||
if(nadd.gt.161) nadd=161
|
||||
if(mod(nadd,2).eq.0) nadd=nadd+1
|
||||
call smo(s0(ia:ib)/nadd,iz,s0b(ia:ib),nadd)
|
||||
call smo(s0b(ia:ib)/nadd,iz,s0(ia:ib),nadd)
|
||||
rms=ave/sqrt(float(nadd))
|
||||
s=0.
|
||||
sall=0.
|
||||
if(rms.gt.0.0) then
|
||||
s=(maxval(s0(iaa:ibb))-ave)/rms
|
||||
sall=(maxval(s0(ia:ib))-ave)/rms
|
||||
endif
|
||||
if(sall.gt.smaxall) then
|
||||
smaxall=sall
|
||||
s0a=(s0-ave)/rms
|
||||
endif
|
||||
if(s.gt.smax) then
|
||||
smax=s
|
||||
nabest=na
|
||||
s0c(ia:ib)=s0(ia:ib)
|
||||
endif
|
||||
enddo
|
||||
if(nadd.ge.3) then
|
||||
do ii=1,3
|
||||
s0b(ia:ib)=s0(ia:ib)
|
||||
call smo(s0b(ia:ib),iz,s0(ia:ib),nadd)
|
||||
enddo
|
||||
endif
|
||||
call averms(s0(ia+id:ib-id),iz-2*id,nskip,ave,rms)
|
||||
s=(maxval(s0(ia:ib))-ave)/rms
|
||||
ipk0=maxloc(s0(ia:ib))
|
||||
ip=ipk0(1) + ia - 1
|
||||
if(s.gt.sync .and. ip.ge.iaa .and. ip.le.ibb) then
|
||||
jpk=j1
|
||||
s0a=(s0-ave)/rms
|
||||
sync=s
|
||||
dtx=jpk/6000.0 - 1.0
|
||||
ipk=ip
|
||||
f0=ip*df3
|
||||
endif
|
||||
s0=s0c
|
||||
ipk0=maxloc(s0(ia:ib))
|
||||
ip=ipk0(1) + ia - 1
|
||||
|
Loading…
Reference in New Issue
Block a user