From e936a863a8def0604c0482a3c7fb03810528a195 Mon Sep 17 00:00:00 2001 From: Steven Franke Date: Thu, 13 Feb 2020 14:25:36 -0600 Subject: [PATCH] Fix some bugs related to osd decoding in msk144 and disable it for now. --- lib/msk144decodeframe.f90 | 7 +++++-- lib/msk144spd.f90 | 4 +++- lib/mskrtd.f90 | 1 + 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/lib/msk144decodeframe.f90 b/lib/msk144decodeframe.f90 index aeb9bd891..f200d3ee5 100644 --- a/lib/msk144decodeframe.f90 +++ b/lib/msk144decodeframe.f90 @@ -14,7 +14,8 @@ subroutine msk144decodeframe(c,softbits,msgreceived,nsuccess,doosd) real pp(12) real softbits(144) real llr(128) - logical first,unpk77_success,doosd + logical first,unpk77_success + logical*1 doosd data first/.true./ data s8/0,1,1,1,0,0,1,0/ save first,cb,fs,pi,twopi,dt,s8,pp @@ -95,8 +96,9 @@ subroutine msk144decodeframe(c,softbits,msgreceived,nsuccess,doosd) max_iterations=10 ! call timer('bpdec128_90 ',0) apmask=0 + dmin=0.0 call bpdecode128_90(llr,apmask,max_iterations,decoded77,cw,nharderror,niterations) - if(doosd .and. nharderror .lt. 0) call osd128_90(llr,apmask,3,decoded77,cw,nharderror,dmin) +! if(doosd .and. nharderror .lt. 0) call osd128_90(llr,apmask,3,decoded77,cw,nharderror,dmin) ! call timer('bpdec128_90 ',1) if( nharderror .ge. 0 .and. nharderror .lt. 18 ) then nsuccess=1 @@ -106,6 +108,7 @@ subroutine msk144decodeframe(c,softbits,msgreceived,nsuccess,doosd) nsuccess=0 else call unpack77(c77,1,msgreceived,unpk77_success) +!if(unpk77_success) write(*,*) msgreceived,nharderror,dmin,nbadsync1,nbadsync2 if(.not.unpk77_success) nsuccess=0 endif endif diff --git a/lib/msk144spd.f90 b/lib/msk144spd.f90 index 85758a1dd..c32d2c08e 100644 --- a/lib/msk144spd.f90 +++ b/lib/msk144spd.f90 @@ -31,7 +31,7 @@ subroutine msk144spd(cbig,n,ntol,nsuccess,msgreceived,fc,fret,tret,navg,ct, & real tpat(NPATTERNS) real*8 dt, df, fs, pi, twopi logical first - logical doosd + logical*1 doosd data first/.true./ data navpatterns/ & 0,1,0, & @@ -44,7 +44,9 @@ subroutine msk144spd(cbig,n,ntol,nsuccess,msgreceived,fc,fret,tret,navg,ct, & save df,first,fs,pi,twopi,dt,tframe,rcw + doosd=.false. if( ntol .le. 50 ) doosd = .true. + if(first) then nmatchedfilter=1 ! define half-sine pulse and raised-cosine edge window diff --git a/lib/mskrtd.f90 b/lib/mskrtd.f90 index 54bcf29e7..2fd535d6f 100644 --- a/lib/mskrtd.f90 +++ b/lib/mskrtd.f90 @@ -144,6 +144,7 @@ subroutine mskrtd(id2,nutc0,tsec,ntol,nrxfreq,ndepth,mycall,mygrid,hiscall, & npat=NPATTERNS if( ndepth .eq. 1 ) npat=0 if( ndepth .eq. 2 ) npat=2 + doosd=.false. if( ntol .le. 50 ) doosd = .true. do iavg=1,npat iavmask=iavpatterns(1:8,iavg)