diff --git a/CMakeLists.txt b/CMakeLists.txt index 376401c46..9726caee0 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -377,6 +377,7 @@ set (wsjt_FSRCS lib/options.f90 lib/packjt.f90 lib/77bit/packjt77.f90 + lib/qra66_decode.f90 lib/readwav.f90 lib/timer_C_wrapper.f90 lib/timer_impl.f90 @@ -575,6 +576,7 @@ set (wsjt_FSRCS lib/symspec65.f90 lib/sync4.f90 lib/sync64.f90 + lib/sync66.f90 lib/sync65.f90 lib/ft4/getcandidates4.f90 lib/ft4/get_ft4_bitmetrics.f90 diff --git a/lib/decoder.f90 b/lib/decoder.f90 index a3269aef9..4faae181b 100644 --- a/lib/decoder.f90 +++ b/lib/decoder.f90 @@ -9,6 +9,7 @@ subroutine multimode_decoder(ss,id2,params,nfsample) use ft8_decode use ft4_decode use fst4_decode + use qra66_decode include 'jt9com.f90' include 'timer_common.inc' @@ -37,6 +38,10 @@ subroutine multimode_decoder(ss,id2,params,nfsample) integer :: decoded end type counting_fst4_decoder + type, extends(qra66_decoder) :: counting_qra66_decoder + integer :: decoded + end type counting_qra66_decoder + real ss(184,NSMAX) logical baddata,newdat65,newdat9,single_decode,bVHF,bad0,newdat,ex integer*2 id2(NTMAX*12000) @@ -54,6 +59,7 @@ subroutine multimode_decoder(ss,id2,params,nfsample) type(counting_ft8_decoder) :: my_ft8 type(counting_ft4_decoder) :: my_ft4 type(counting_fst4_decoder) :: my_fst4 + type(counting_qra66_decoder) :: my_qra66 !cast C character arrays to Fortran character strings datetime=transfer(params%datetime, datetime) @@ -69,6 +75,7 @@ subroutine multimode_decoder(ss,id2,params,nfsample) my_ft8%decoded = 0 my_ft4%decoded = 0 my_fst4%decoded = 0 + my_qra66%decoded = 0 ! For testing only: return Rx messages stored in a file as decodes inquire(file='rx_messages.txt',exist=ex) @@ -187,6 +194,16 @@ subroutine multimode_decoder(ss,id2,params,nfsample) go to 800 endif + if(params%nmode.eq.66) then +! We're in QRA66 mode + call timer('decqra66',0) + call my_qra66%decode(qra66_decoded,id2,params%nutc,params%nfa, & + params%nfb,params%nfqso,params%ndepth,logical(params%lapcqonly), & + mycall,hiscall,hisgrid) + call timer('decqra66',1) + go to 800 + endif + if(params%nmode.eq.240) then ! We're in FST4 mode ndepth=iand(params%ndepth,3) @@ -759,4 +776,65 @@ contains return end subroutine fst4_decoded + subroutine qra66_decoded (this,nutc,sync,nsnr,dt,freq,decoded,nap, & + qual,ntrperiod,fmid,w50) + + use qra66_decode + implicit none + + class(qra66_decoder), intent(inout) :: this + integer, intent(in) :: nutc + real, intent(in) :: sync + integer, intent(in) :: nsnr + real, intent(in) :: dt + real, intent(in) :: freq + character(len=37), intent(in) :: decoded + integer, intent(in) :: nap + real, intent(in) :: qual + integer, intent(in) :: ntrperiod + real, intent(in) :: fmid + real, intent(in) :: w50 + + character*2 annot + character*37 decoded0 + character*70 line + + decoded0=decoded + annot=' ' + if(nap.ne.0) then + write(annot,'(a1,i1)') 'a',nap + if(qual.lt.0.17) decoded0(37:37)='?' + endif + + if(ntrperiod.lt.60) then + write(line,1001) nutc,nsnr,dt,nint(freq),decoded0,annot +1001 format(i6.6,i4,f5.1,i5,' ` ',1x,a37,1x,a2) + write(13,1002) nutc,nint(sync),nsnr,dt,freq,0,decoded0 +1002 format(i6.6,i4,i5,f6.1,f8.0,i4,3x,a37,' FST4') + else + write(line,1003) nutc,nsnr,dt,nint(freq),decoded0,annot +1003 format(i4.4,i4,f5.1,i5,' ` ',1x,a37,1x,a2,2f7.3) + write(13,1004) nutc,nint(sync),nsnr,dt,freq,0,decoded0 +1004 format(i4.4,i4,i5,f6.1,f8.0,i4,3x,a37,' FST4') + endif + + if(fmid.ne.-999.0) then + if(w50.lt.0.95) write(line(65:70),'(f6.3)') w50 + if(w50.ge.0.95) write(line(65:70),'(f6.2)') w50 + endif + + write(*,1005) line +1005 format(a70) + + call flush(6) + call flush(13) + + select type(this) + type is (counting_qra66_decoder) + this%decoded = this%decoded + 1 + end select + + return + end subroutine qra66_decoded + end subroutine multimode_decoder diff --git a/lib/jt9.f90 b/lib/jt9.f90 index a08a20cb2..3c017ac18 100644 --- a/lib/jt9.f90 +++ b/lib/jt9.f90 @@ -26,7 +26,7 @@ program jt9 fhigh=4000,nrxfreq=1500,ndepth=1,nexp_decode=0,nQSOProg=0 logical :: read_files = .true., tx9 = .false., display_help = .false., & bLowSidelobes = .false. - type (option) :: long_options(29) = [ & + type (option) :: long_options(30) = [ & option ('help', .false., 'h', 'Display this help message', ''), & option ('shmem',.true.,'s','Use shared memory for sample data','KEY'), & option ('tr-period', .true., 'p', 'Tx/Rx period, default SECONDS=60', & @@ -51,6 +51,7 @@ program jt9 option ('fft-threads', .true., 'm', & 'Number of threads to process large FFTs, default THREADS=1', & 'THREADS'), & + option ('qra66', .false., '3', 'QRA66 mode', ''), & option ('jt4', .false., '4', 'JT4 mode', ''), & option ('ft4', .false., '5', 'FT4 mode', ''), & option ('jt65', .false.,'6', 'JT65 mode', ''), & @@ -86,7 +87,7 @@ program jt9 TRperiod=60.d0 do - call getopt('hs:e:a:b:r:m:p:d:f:w:t:987654WqTL:S:H:c:G:x:g:X:Q:', & + call getopt('hs:e:a:b:r:m:p:d:f:w:t:9876543WqTL:S:H:c:G:x:g:X:Q:', & long_options,c,optarg,arglen,stat,offset,remain,.true.) if (stat .ne. 0) then exit @@ -123,6 +124,8 @@ program jt9 mode = 164 case ('Q') read (optarg(:arglen), *) nQSOProg + case ('3') + mode = 66 case ('4') mode = 4 case ('5')