summaryrefslogtreecommitdiff
path: root/lib/decoder.f90
diff options
context:
space:
mode:
authorChristoph Berg <myon@debian.org>2018-12-19 22:58:32 +0100
committerChristoph Berg <myon@debian.org>2018-12-19 22:58:32 +0100
commite0737c56c1e384e05064a0c6e1ac46979371041b (patch)
treea0123d694a2d36c43dabdf0a3907392fce11d457 /lib/decoder.f90
parentb4aebf2d137b892f53503b13785ecae900062ff7 (diff)
New upstream version 2.0.0+repackupstream/2.0.0+repack
Diffstat (limited to 'lib/decoder.f90')
-rw-r--r--lib/decoder.f90109
1 files changed, 60 insertions, 49 deletions
diff --git a/lib/decoder.f90 b/lib/decoder.f90
index d5607ebd..730c59d1 100644
--- a/lib/decoder.f90
+++ b/lib/decoder.f90
@@ -67,20 +67,6 @@ subroutine multimode_decoder(ss,id2,params,nfsample)
else
open(13,file=trim(temp_dir)//'/decoded.txt',status='unknown',iostat=ios)
endif
- if(params%nmode.eq.8) then
- inquire(file=trim(temp_dir)//'/houndcallers.txt',exist=ex)
- if(.not.ex) then
- c2fox=' '
- g2fox=' '
- nsnrfox=-99
- nfreqfox=-99
- n30z=0
- nwrap=0
- nfox=0
- endif
- open(19,file=trim(temp_dir)//'/houndcallers.txt',status='unknown')
- endif
-
if(ios.ne.0) then
nfail=nfail+1
if(nfail.le.3) then
@@ -91,46 +77,67 @@ subroutine multimode_decoder(ss,id2,params,nfsample)
if(params%nmode.eq.8) then
! We're in FT8 mode
+
+ if(ncontest.eq.5) then
+! Fox mode: initialize and open houndcallers.txt
+ inquire(file=trim(temp_dir)//'/houndcallers.txt',exist=ex)
+ if(.not.ex) then
+ c2fox=' '
+ g2fox=' '
+ nsnrfox=-99
+ nfreqfox=-99
+ n30z=0
+ nwrap=0
+ nfox=0
+ endif
+ open(19,file=trim(temp_dir)//'/houndcallers.txt',status='unknown')
+ endif
+
call timer('decft8 ',0)
newdat=params%newdat
+ ncontest=iand(params%nexp_decode,7)
call my_ft8%decode(ft8_decoded,id2,params%nQSOProgress,params%nfqso, &
params%nftx,newdat,params%nutc,params%nfa,params%nfb, &
- params%nexp_decode,params%ndepth,logical(params%nagain), &
- logical(params%lft8apon),logical(params%lapcqonly),params%napwid, &
- mycall,mygrid,hiscall,hisgrid)
+ params%ndepth,ncontest,logical(params%nagain), &
+ logical(params%lft8apon),logical(params%lapcqonly), &
+ params%napwid,mycall,hiscall,hisgrid)
call timer('decft8 ',1)
if(nfox.gt.0) then
n30min=minval(n30fox(1:nfox))
n30max=maxval(n30fox(1:nfox))
endif
j=0
- rewind 19
- if(nfox.eq.0) then
- endfile 19
+
+ if(ncontest.eq.5) then
+! Fox mode: save decoded Hound calls for possible selection by FoxOp
rewind 19
- else
- do i=1,nfox
- n=n30fox(i)
- if(n30max-n30fox(i).le.4) then
- j=j+1
- c2fox(j)=c2fox(i)
- g2fox(j)=g2fox(i)
- nsnrfox(j)=nsnrfox(i)
- nfreqfox(j)=nfreqfox(i)
- n30fox(j)=n
- m=n30max-n
- if(len(trim(g2fox(j))).eq.4) then
- call azdist(mygrid,g2fox(j),0.d0,nAz,nEl,nDmiles,nDkm, &
- nHotAz,nHotABetter)
- else
- nDkm=9999
+ if(nfox.eq.0) then
+ endfile 19
+ rewind 19
+ else
+ do i=1,nfox
+ n=n30fox(i)
+ if(n30max-n30fox(i).le.4) then
+ j=j+1
+ c2fox(j)=c2fox(i)
+ g2fox(j)=g2fox(i)
+ nsnrfox(j)=nsnrfox(i)
+ nfreqfox(j)=nfreqfox(i)
+ n30fox(j)=n
+ m=n30max-n
+ if(len(trim(g2fox(j))).eq.4) then
+ call azdist(mygrid,g2fox(j),0.d0,nAz,nEl,nDmiles,nDkm, &
+ nHotAz,nHotABetter)
+ else
+ nDkm=9999
+ endif
+ write(19,1004) c2fox(j),g2fox(j),nsnrfox(j),nfreqfox(j),nDkm,m
+1004 format(a12,1x,a4,i5,i6,i7,i3)
endif
- write(19,1004) c2fox(j),g2fox(j),nsnrfox(j),nfreqfox(j),nDkm,m
-1004 format(a12,1x,a4,i5,i6,i7,i3)
- endif
- enddo
- nfox=j
- flush(19)
+ enddo
+ nfox=j
+ flush(19)
+ endif
endif
go to 800
endif
@@ -463,8 +470,8 @@ contains
real, intent(in) :: dt
real, intent(in) :: freq
character(len=37), intent(in) :: decoded
- character c1*12,c2*12,g2*4,w*4,ctmp*12
- integer i0,i1,i2,i3,i4,i5,i6,n30,nwrap
+ 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
@@ -493,16 +500,20 @@ contains
decoded0=decoded
annot=' '
- if(nap.ne.0) then
+ if(ncontest.eq.0 .and. nap.ne.0) then
write(annot,'(a1,i1)') 'a',nap
- if(qual.lt.0.17) decoded0(22:22)='?'
+ if(qual.lt.0.17) decoded0(37:37)='?'
endif
- i0=index(decoded0,';')
+! i0=index(decoded0,';')
+! Always print 37 characters? Or, send i3,n3 up to here from ft8b_2 and use them
+! to decide how many chars to print?
+!TEMP
+ i0=1
if(i0.le.0) write(*,1000) params%nutc,snr,dt,nint(freq),decoded0(1:22),annot
1000 format(i6.6,i4,f5.1,i5,' ~ ',1x,a22,1x,a2)
- if(i0.gt.0) write(*,1001) params%nutc,snr,dt,nint(freq),decoded0
-1001 format(i6.6,i4,f5.1,i5,' ~ ',1x,a37)
+ if(i0.gt.0) 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,' FT8')