summaryrefslogtreecommitdiff
path: root/lib/decoder.f90
diff options
context:
space:
mode:
Diffstat (limited to 'lib/decoder.f90')
-rw-r--r--lib/decoder.f9059
1 files changed, 58 insertions, 1 deletions
diff --git a/lib/decoder.f90 b/lib/decoder.f90
index 218a6cbf..8ca7e316 100644
--- a/lib/decoder.f90
+++ b/lib/decoder.f90
@@ -7,6 +7,7 @@ subroutine multimode_decoder(ss,id2,params,nfsample)
use jt65_decode
use jt9_decode
use ft8_decode
+ use ft4_decode
include 'jt9com.f90'
include 'timer_common.inc'
@@ -27,6 +28,10 @@ subroutine multimode_decoder(ss,id2,params,nfsample)
integer :: decoded
end type counting_ft8_decoder
+ type, extends(ft4_decoder) :: counting_ft4_decoder
+ integer :: decoded
+ end type counting_ft4_decoder
+
real ss(184,NSMAX)
logical baddata,newdat65,newdat9,single_decode,bVHF,bad0,newdat,ex
integer*2 id2(NTMAX*12000)
@@ -40,6 +45,7 @@ subroutine multimode_decoder(ss,id2,params,nfsample)
type(counting_jt65_decoder) :: my_jt65
type(counting_jt9_decoder) :: my_jt9
type(counting_ft8_decoder) :: my_ft8
+ type(counting_ft4_decoder) :: my_ft4
!cast C character arrays to Fortran character strings
datetime=transfer(params%datetime, datetime)
@@ -53,6 +59,7 @@ subroutine multimode_decoder(ss,id2,params,nfsample)
my_jt65%decoded = 0
my_jt9%decoded = 0
my_ft8%decoded = 0
+ my_ft4%decoded = 0
single_decode=iand(params%nexp_decode,32).ne.0
bVHF=iand(params%nexp_decode,64).ne.0
@@ -142,6 +149,15 @@ subroutine multimode_decoder(ss,id2,params,nfsample)
go to 800
endif
+ if(params%nmode.eq.5) then
+ call timer('decft4 ',0)
+ call my_ft4%decode(ft4_decoded,id2,params%nQSOProgress,params%nfqso, &
+ params%nutc,params%nfa,params%nfb,params%ndepth,ncontest, &
+ mycall,hiscall)
+ call timer('decft4 ',1)
+ go to 800
+ endif
+
rms=sqrt(dot_product(float(id2(300000:310000)), &
float(id2(300000:310000)))/10000.0)
if(rms.lt.2.0) go to 800
@@ -258,7 +274,8 @@ subroutine multimode_decoder(ss,id2,params,nfsample)
!$omp end parallel sections
! JT65 is not yet producing info for nsynced, ndecoded.
-800 ndecoded = my_jt4%decoded + my_jt65%decoded + my_jt9%decoded + my_ft8%decoded
+800 ndecoded = my_jt4%decoded + my_jt65%decoded + my_jt9%decoded + &
+ my_ft8%decoded + my_ft4%decoded
write(*,1010) nsynced,ndecoded
1010 format('<DecodeFinished>',2i4)
call flush(6)
@@ -561,4 +578,44 @@ contains
return
end subroutine ft8_decoded
+ subroutine ft4_decoded (this,sync,snr,dt,freq,decoded,nap,qual)
+ use ft4_decode
+ implicit none
+
+ class(ft4_decoder), intent(inout) :: this
+ real, intent(in) :: sync
+ integer, intent(in) :: snr
+ real, intent(in) :: dt
+ real, intent(in) :: freq
+ character(len=37), intent(in) :: decoded
+ character c1*12,c2*12,g2*4,w*4
+ integer i0,i1,i2,i3,i4,i5,n30,nwrap
+ integer, intent(in) :: nap
+ real, intent(in) :: qual
+ character*2 annot
+ character*37 decoded0
+
+ decoded0=decoded
+
+ annot=' '
+ if(ncontest.eq.0 .and. nap.ne.0) then
+ write(annot,'(a1,i1)') 'a',nap
+ if(qual.lt.0.17) decoded0(37:37)='?'
+ endif
+
+ write(*,1001) params%nutc,snr,dt,nint(freq),decoded0,annot
+1001 format(i6.6,i4,f5.1,i5,' + ',1x,a37,1x,a2)
+ write(13,1002) params%nutc,nint(sync),snr,dt,freq,0,decoded0
+1002 format(i6.6,i4,i5,f6.1,f8.0,i4,3x,a37,' FT4')
+
+ call flush(6)
+ call flush(13)
+
+ select type(this)
+ type is (counting_ft4_decoder)
+ this%decoded = this%decoded + 1
+ end select
+
+ return
+ end subroutine ft4_decoded
end subroutine multimode_decoder