diff --git a/lib/fsk4hf/ft8apset.f90 b/lib/fsk4hf/ft8apset.f90 index ccd3108f5..4c89d72b0 100644 --- a/lib/fsk4hf/ft8apset.f90 +++ b/lib/fsk4hf/ft8apset.f90 @@ -11,14 +11,16 @@ subroutine ft8apset(mycall12,hiscall12,hisgrid6,apsym,iaptype) mycall=mycall12(1:6) hiscall=hiscall12(1:6) + hisgrid=hisgrid6(1:4) if(len_trim(hiscall).eq.0) then iaptype=1 - hiscall="K9AN " ! dummy call - hisgrid="EN50" ! and dummy's grid - else + hiscall="K9AN" + else iaptype=2 - hisgrid=hisgrid6(1:4) endif + hisgrid=hisgrid6(1:4) +! if(len_trim(hisgrid).eq.0) hisgrid="EN50" + if(index(hisgrid," ").eq.0) hisgrid="EN50" msg=mycall//' '//hiscall//' '//hisgrid call genft8(msg,msgsent,msgbits,itone) apsym=2*msgbits-1 diff --git a/lib/fsk4hf/ft8b.f90 b/lib/fsk4hf/ft8b.f90 index 652c022dd..51acfb93a 100644 --- a/lib/fsk4hf/ft8b.f90 +++ b/lib/fsk4hf/ft8b.f90 @@ -112,11 +112,13 @@ subroutine ft8b(dd0,newdat,nfqso,ndepth,lsubtract,iaptype,icand,sync0,f1,xdt, llr0=llr apmag=4.0 ! nera=1 - nera=3 +! nera=3 nap=0 if(ndepth.eq.3) nap=2 do iap=0,nap !### Temporary ### + nera=1 + if(iap.eq.0) nera=3 do iera=1,nera llr=llr0 nblank=0 @@ -130,62 +132,66 @@ subroutine ft8b(dd0,newdat,nfqso,ndepth,lsubtract,iaptype,icand,sync0,f1,xdt, llrap=llr llrap(160:162)=apmag*apsym(73:75)/ss endif - if(iap.eq.1) then - if(iaptype.eq.1) then ! look for plain CQ + if(iaptype.eq.1) then + if(iap.eq.1) then ! look for plain CQ apmask=0 apmask(88:115)=1 ! plain CQ apmask(144)=1 ! not free text apmask(160:162)=1 ! 3 extra bits - llrap=0.0 + llrap=llr llrap(88:115)=apmag*cq/ss llrap(144)=-apmag/ss llrap(160:162)=apmag*apsym(73:75)/ss endif - if(iaptype.eq.2) then ! look for mycall + if(iap.eq.2) then ! look for mycall apmask=0 apmask(88:115)=1 ! mycall apmask(144)=1 ! not free text apmask(160:162)=1 ! 3 extra bits - llrap=0.0 + llrap=llr llrap(88:115)=apmag*apsym(1:28)/ss llrap(144)=-apmag/ss llrap(160:162)=apmag*apsym(73:75)/ss - where(apmask.eq.0) llrap=llr endif endif - if(iap.eq.2) then - if(iaptype.eq.1) then ! look for mycall, dxcall + if(iaptype.eq.2) then + if(iap.eq.1) then ! look for mycall, dxcall apmask=0 apmask(88:115)=1 ! mycall apmask(116:143)=1 ! hiscall apmask(144)=1 ! not free text apmask(160:162)=1 ! 3 extra bits - llrap=0.0 + llrap=llr llrap(88:143)=apmag*apsym(1:56)/ss llrap(144)=-apmag/ss llrap(160:162)=apmag*apsym(73:75)/ss - where(apmask.eq.0) llrap=llr endif - if(iaptype.eq.2) then ! look mycall, dxcall, RRR/73 + if(iap.eq.2) then ! look mycall, dxcall, RRR/73 apmask=0 apmask(88:115)=1 ! mycall apmask(116:143)=1 ! hiscall apmask(144:154)=1 ! RRR or 73 apmask(160:162)=1 ! 3 extra bits - llrap=0.0 + llrap=llr llrap(88:143)=apmag*apsym(1:56)/ss llrap(144:154)=apmag*rr73/ss llrap(160:162)=apmag*apsym(73:75)/ss - where(apmask.eq.0) llrap=llr endif endif + cw=0 call timer('bpd174 ',0) call bpdecode174(llrap,apmask,max_iterations,decoded,cw,nharderrors, & niterations) call timer('bpd174 ',1) dmin=0.0 - if(ndepth.eq.3 .and. abs(nfqso-f1).lt.10.0 .and. nharderrors.lt.0) then + if(ndepth.eq.3 .and. nharderrors.lt.0) then + if(iaptype.eq.1) norder=2 + if(iaptype.eq.2 .and. abs(nfqso-f1).lt.10.0) then + norder=3 + else + norder=1 + endif call timer('osd174 ',0) call osd174(llrap,apmask,norder,decoded,cw,nharderrors,dmin) call timer('osd174 ',1) @@ -217,7 +223,7 @@ subroutine ft8b(dd0,newdat,nfqso,ndepth,lsubtract,iaptype,icand,sync0,f1,xdt, if(xnoi.gt.0 .and. xnoi.lt.xsig) xsnr=xsig/xnoi-1.0 xsnr=10.0*log10(xsnr)-27.0 if(xsnr .lt. -24.0) xsnr=-24.0 - exit + return endif enddo enddo diff --git a/lib/ft8_decode.f90 b/lib/ft8_decode.f90 index 00ac284a9..6b7c4ab51 100644 --- a/lib/ft8_decode.f90 +++ b/lib/ft8_decode.f90 @@ -46,7 +46,6 @@ contains write(datetime,1001) nutc !### TEMPORARY ### 1001 format("000000_",i6.6) - if(index(hisgrid6," ").eq.0) hisgrid6="EN50" call ft8apset(mycall12,hiscall12,hisgrid6,apsym,iaptype) dd=iwave