Enable JT65 decodes with the 'OOO' sync pattern.

git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@6663 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
Joe Taylor 2016-05-03 16:10:22 +00:00
parent 5cbd9ce103
commit 4346f0ef97
5 changed files with 40 additions and 14 deletions

View File

@ -192,7 +192,6 @@ contains
real, intent(in) :: dt real, intent(in) :: dt
integer, intent(in) :: freq integer, intent(in) :: freq
logical, intent(in) :: flip logical, intent(in) :: flip
character(len=1) :: cused, csync character(len=1) :: cused, csync
cused = '.' cused = '.'
@ -203,8 +202,8 @@ contains
1000 format(a1,i5.4,f6.1,f6.2,i6,1x,a1) 1000 format(a1,i5.4,f6.1,f6.2,i6,1x,a1)
end subroutine jt4_average end subroutine jt4_average
subroutine jt65_decoded(this,utc,sync,snr,dt,freq,drift,width,decoded0,ft, & subroutine jt65_decoded(this,utc,sync,snr,dt,freq,drift,nflip,width, &
qual,nsmo,nsum,minsync,nsubmode,naggressive) decoded0,ft,qual,nsmo,nsum,minsync,nsubmode,naggressive)
use jt65_decode use jt65_decode
implicit none implicit none
@ -216,6 +215,7 @@ contains
real, intent(in) :: dt real, intent(in) :: dt
integer, intent(in) :: freq integer, intent(in) :: freq
integer, intent(in) :: drift integer, intent(in) :: drift
integer, intent(in) :: nflip
real, intent(in) :: width real, intent(in) :: width
character(len=22), intent(in) :: decoded0 character(len=22), intent(in) :: decoded0
integer, intent(in) :: ft integer, intent(in) :: ft
@ -226,9 +226,10 @@ contains
integer, intent(in) :: nsubmode integer, intent(in) :: nsubmode
integer, intent(in) :: naggressive integer, intent(in) :: naggressive
integer n integer i,n
character*5 ctail character*5 ctail
character*22 decoded character*22 decoded
character*1 csync
character*36 c character*36 c
data c/'0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ'/ data c/'0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ'/
@ -255,7 +256,20 @@ contains
if(qual.lt.3) decoded(21:21)='?' if(qual.lt.3) decoded(21:21)='?'
endif endif
endif endif
write(*,1010) utc,snr,dt,freq,'#',decoded,ctail csync=' '
if(sync.ge.float(minsync)) then
csync='*'
if(nflip.eq.-1) then
csync='#'
if(decoded.ne.' ') then
do i=22,1,-1
if(decoded(i:i).ne.' ') exit
enddo
decoded(i+2:i+4)='OOO'
endif
endif
endif
write(*,1010) utc,snr,dt,freq,csync,decoded,ctail
1010 format(i4.4,i4,f5.1,i5,1x,a1,1x,a22,a5) 1010 format(i4.4,i4,f5.1,i5,1x,a1,1x,a22,a5)
endif endif

View File

@ -6,6 +6,7 @@ subroutine fqso_first(nfqso,ntol,ca,ncand)
real freq real freq
real dt real dt
real sync real sync
real flip
end type candidate end type candidate
type(candidate) ca(300),cb type(candidate) ca(300),cb

View File

@ -13,7 +13,7 @@ module jt65_decode
! !
abstract interface abstract interface
subroutine jt65_decode_callback(this,utc,sync,snr,dt,freq,drift, & subroutine jt65_decode_callback(this,utc,sync,snr,dt,freq,drift, &
width,decoded,ft,qual,nsmo,nsum,minsync,nsubmode,naggressive) nflip,width,decoded,ft,qual,nsmo,nsum,minsync,nsubmode,naggressive)
import jt65_decoder import jt65_decoder
implicit none implicit none
@ -24,6 +24,7 @@ module jt65_decode
real, intent(in) :: dt real, intent(in) :: dt
integer, intent(in) :: freq integer, intent(in) :: freq
integer, intent(in) :: drift integer, intent(in) :: drift
integer, intent(in) :: nflip
real, intent(in) :: width real, intent(in) :: width
character(len=22), intent(in) :: decoded character(len=22), intent(in) :: decoded
integer, intent(in) :: ft integer, intent(in) :: ft
@ -69,6 +70,7 @@ contains
real freq real freq
real dt real dt
real sync real sync
real flip
end type candidate end type candidate
type(candidate) ca(300) type(candidate) ca(300)
type accepted_decode type accepted_decode
@ -170,7 +172,7 @@ contains
endif endif
mode65=2**nsubmode mode65=2**nsubmode
nflip=1 !### temporary ### nflip=1
nqd=0 nqd=0
decoded0="" decoded0=""
freq0=0. freq0=0.
@ -185,6 +187,11 @@ contains
sync1=ca(icand)%sync sync1=ca(icand)%sync
dtx=ca(icand)%dt dtx=ca(icand)%dt
freq=ca(icand)%freq freq=ca(icand)%freq
if(single_decode) then
flip=ca(icand)%flip
nflip=flip
if(sync1.lt.float(minsync)) cycle
endif
if(ipass.eq.1) ntry65a=ntry65a + 1 if(ipass.eq.1) ntry65a=ntry65a + 1
if(ipass.eq.2) ntry65b=ntry65b + 1 if(ipass.eq.2) ntry65b=ntry65b + 1
call timer('decod65a',0) call timer('decod65a',0)
@ -233,8 +240,8 @@ contains
if (associated(this%callback) .and. nsum.ge.2) then if (associated(this%callback) .and. nsum.ge.2) then
call this%callback(nutc,sync1,nsnr,dtx-1.0,nfreq,ndrift, & call this%callback(nutc,sync1,nsnr,dtx-1.0,nfreq,ndrift, &
width,avemsg,nftt,nqave,nsmo,nsum,minsync,nsubmode, & nflip,width,avemsg,nftt,nqave,nsmo,nsum,minsync, &
naggressive) nsubmode,naggressive)
prtavg=.true. prtavg=.true.
cycle cycle
end if end if
@ -285,8 +292,8 @@ contains
nqual=min(qual,9999.0) nqual=min(qual,9999.0)
if (associated(this%callback)) then if (associated(this%callback)) then
call this%callback(nutc,sync1,nsnr,dtx-1.0,nfreq,ndrift, & call this%callback(nutc,sync1,nsnr,dtx-1.0,nfreq,ndrift, &
width,decoded,nft,nqual,nsmo,nsum,minsync,nsubmode, & nflip,width,decoded,nft,nqual,nsmo,nsum,minsync, &
naggressive) nsubmode,naggressive)
end if end if
endif endif
decoded0=decoded decoded0=decoded

View File

@ -37,8 +37,8 @@ contains
call timer('jt65a ',1) call timer('jt65a ',1)
end subroutine test end subroutine test
subroutine my_callback (this,utc,sync,snr,dt,freq,drift,width,decoded & subroutine my_callback (this,utc,sync,snr,dt,freq,drift,nflip,width, &
, ft, qual, smo, sum, minsync, submode, aggression) decoded,ft,qual,smo,sum,minsync,submode,aggression)
use jt65_decode use jt65_decode
implicit none implicit none
@ -49,6 +49,7 @@ contains
real, intent(in) :: dt real, intent(in) :: dt
integer, intent(in) :: freq integer, intent(in) :: freq
integer, intent(in) :: drift integer, intent(in) :: drift
integer, intent(in) :: nflip
real, intent(in) :: width real, intent(in) :: width
character(len=22), intent(in) :: decoded character(len=22), intent(in) :: decoded
integer, intent(in) :: ft integer, intent(in) :: ft
@ -63,6 +64,7 @@ contains
t=max(0.0,width*width-7.2) t=max(0.0,width*width-7.2)
nwidth=max(nint(sqrt(t)),2) nwidth=max(nint(sqrt(t)),2)
!### deal with nflip here! ###
write(*,1010) utc,snr,dt,freq,decoded write(*,1010) utc,snr,dt,freq,decoded
1010 format(i4.4,i4,f5.1,i5,1x,'#',1x,a22) 1010 format(i4.4,i4,f5.1,i5,1x,'#',1x,a22)
write(13,1012) utc,nint(sync),snr,dt,freq,drift,nwidth, & write(13,1012) utc,nint(sync),snr,dt,freq,drift,nwidth, &

View File

@ -11,6 +11,7 @@ subroutine sync65(ss,nfa,nfb,naggressive,ntol,nhsym,ca,ncand,nrobust, &
real freq real freq
real dt real dt
real sync real sync
real flip
end type candidate end type candidate
type(candidate) ca(MAXCAND) type(candidate) ca(MAXCAND)
@ -76,13 +77,14 @@ subroutine sync65(ss,nfa,nfb,naggressive,ntol,nhsym,ca,ncand,nrobust, &
ccfblue(lag2)=0. ccfblue(lag2)=0.
ca(ncand)%freq=freq ca(ncand)%freq=freq
ca(ncand)%dt=dtx ca(ncand)%dt=dtx
ca(ncand)%flip=flip
if(single_decode) then if(single_decode) then
ca(ncand)%sync=db(ccfred(i)) - 16.0 ca(ncand)%sync=db(ccfred(i)) - 16.0
else else
ca(ncand)%sync=ccfred(i) ca(ncand)%sync=ccfred(i)
endif endif
endif endif
if(ncand.eq.MAXCAND) return if(ncand.eq.MAXCAND) exit
enddo enddo
return return