Fix some message-length incompatibilities involving MSK144 Sh messages. SWL mode is broken for the time being, because it relied on the old extractmessage144 routine to keep track of recent callsigns. That routine is no longer used.

This commit is contained in:
Steve Franke 2018-09-24 12:31:17 -05:00
parent 7baf8480a3
commit 45031738bf
2 changed files with 24 additions and 22 deletions

View File

@ -115,7 +115,6 @@ subroutine msk40decodeframe(c,mycall,hiscall,xsnr,bswl,nhasharray, &
max_iterations=5
call bpdecode40(llr,max_iterations,decoded,niterations)
if( niterations .ge. 0.0 ) then
call encode_msk40(decoded,cw)
nhammd=0
@ -133,10 +132,8 @@ subroutine msk40decodeframe(c,mycall,hiscall,xsnr,bswl,nhasharray, &
enddo
nrxrpt=iand(imsg,15)
nrxhash=(imsg-nrxrpt)/16
if(nhammd.le.4 .and. cord .lt. 0.65 .and. &
nrxhash.eq.ihash .and. nrxrpt.ge.7) then
!write(*,*) 'decodeframe 1',nbadsync,nhammd,cord,nrxhash,nrxrpt,ihash,xsnr,sigma
nsuccess=1
write(msgreceived,'(a1,a,1x,a,a1,1x,a4)') "<",trim(mycall), &
trim(hiscall),">",rpt(nrxrpt)
@ -148,18 +145,15 @@ subroutine msk40decodeframe(c,mycall,hiscall,xsnr,bswl,nhasharray, &
nsuccess=2
write(msgreceived,'(a1,a,1x,a,a1,1x,a4)') "<",trim(recent_calls(i)), &
trim(recent_calls(j)),">",rpt(nrxrpt)
!write(*,*) 'decodeframe 2',nbadsync,nhammd,cord,nrxhash,nrxrpt,ihash,xsnr,sigma
elseif( nrxhash .eq. nhasharray(j,i) ) then
nsuccess=2
write(msgreceived,'(a1,a,1x,a,a1,1x,a4)') "<",trim(recent_calls(j)), &
trim(recent_calls(i)),">",rpt(nrxrpt)
!write(*,*) 'decodeframe 3',nbadsync,nhammd,cord,nrxhash,nrxrpt,ihash,xsnr,sigma
endif
enddo
enddo
if(nsuccess.eq.0) then
nsuccess=3
!write(*,*) 'decodeframe 4',bswl,nbadsync,nhammd,cord,nrxhash,nrxrpt,ihash,xsnr,sigma,nsuccess
write(msgreceived,'(a1,i4.4,a1,1x,a4)') "<",nrxhash,">",rpt(nrxrpt)
endif
endif

View File

@ -14,12 +14,13 @@ subroutine mskrtd(id2,nutc0,tsec,ntol,nrxfreq,ndepth,mycall,mygrid,hiscall, &
character*4 decsym !"&" for mskspd or "^" for long averages
character*37 msgreceived !Decoded message
character*22 msgrx22 !Sh messages are returned as 22chars
character*37 msglast,msglastswl !Used for dupechecking
character*80 line !Formatted line with UTC dB T Freq Msg
character*12 mycall,hiscall
character*6 mygrid
character*12 recent_calls(NRECENT)
character*22 recent_shmsgs(NSHMEM)
character*37 recent_shmsgs(NSHMEM)
character*512 datadir
complex cdat(NFFT1) !Analytic signal
@ -64,10 +65,10 @@ subroutine mskrtd(id2,nutc0,tsec,ntol,nrxfreq,ndepth,mycall,mygrid,hiscall, &
recent_calls(i)(1:12)=' '
enddo
do i=1,nshmem
recent_shmsgs(i)(1:22)=' '
recent_shmsgs(i)(1:37)=' '
enddo
msglast=' '
msglastswl=' '
msglast=' '
msglastswl=' '
nsnrlast=-99
nsnrlastswl=-99
first=.false.
@ -77,8 +78,8 @@ subroutine mskrtd(id2,nutc0,tsec,ntol,nrxfreq,ndepth,mycall,mygrid,hiscall, &
! Dupe checking setup
if(nutc00.ne.nutc0 .or. tsec.lt.tsec0) then ! reset dupe checker
msglast=' '
msglastswl=' '
msglast=' '
msglastswl=' '
nsnrlast=-99
nsnrlastswl=-99
nutc00=nutc0
@ -86,7 +87,7 @@ subroutine mskrtd(id2,nutc0,tsec,ntol,nrxfreq,ndepth,mycall,mygrid,hiscall, &
tframe=float(NSPM)/12000.0
line=char(0)
msgreceived=' '
msgreceived=' '
max_iterations=10
niterations=0
d(1:NZ)=id2
@ -119,7 +120,8 @@ subroutine mskrtd(id2,nutc0,tsec,ntol,nrxfreq,ndepth,mycall,mygrid,hiscall, &
softbits,recent_calls,nrecent)
if(ndecodesuccess.eq.0 .and. (bshmsg.or.bswl)) then
call msk40spd(cdat,np,ntol,mycall(1:6),hiscall(1:6),bswl,nhasharray, &
recent_calls,nrecent,ndecodesuccess,msgreceived,fc,fest,tdec,navg)
recent_calls,nrecent,ndecodesuccess,msgrx22,fc,fest,tdec,navg)
if( ndecodesuccess .ge. 1 ) msgreceived(1:22)=msgrx22
endif
if( ndecodesuccess .ge. 1 ) then
tdec=tsec+tdec
@ -192,7 +194,7 @@ subroutine mskrtd(id2,nutc0,tsec,ntol,nrxfreq,ndepth,mycall,mygrid,hiscall, &
decsym=' & '
if( btrain ) decsym=' ^ '
if( msgreceived(1:1).eq.'<') then
if( bshdecode ) then
ncorrected=0
eyeopening=0.0
endif
@ -209,9 +211,15 @@ subroutine mskrtd(id2,nutc0,tsec,ntol,nrxfreq,ndepth,mycall,mygrid,hiscall, &
if(.not. bshdecode) then
call update_hasharray(recent_calls,nrecent,nhasharray)
endif
write(line,1020) nutc0,nsnr,tdec,nint(fest),decsym,msgreceived, &
navg,ncorrected,eyeopening,char(0)
1020 format(i6.6,i4,f5.1,i5,a4,a22,i2,i3,f5.1,a1)
if( .not.bshdecode ) then
write(line,1020) nutc0,nsnr,tdec,nint(fest),decsym,msgreceived(1:22), &
navg,ncorrected,eyeopening,char(0)
1020 format(i6.6,i4,f5.1,i5,a4,a22,i2,i3,f5.1,a1)
else
write(line,1022) nutc0,nsnr,tdec,nint(fest),decsym,msgreceived(1:22), &
navg,char(0)
1022 format(i6.6,i4,f5.1,i5,a4,a22,i2,a1)
endif
elseif(bswl .and. ndecodesuccess.ge.2) then
seenb4=.false.
do i=1,nshmem
@ -226,8 +234,8 @@ subroutine mskrtd(id2,nutc0,tsec,ntol,nrxfreq,ndepth,mycall,mygrid,hiscall, &
if(bflag) then
msglastswl=msgreceived
nsnrlastswl=nsnr
write(line,1020) nutc0,nsnr,tdec,nint(fest),decsym,msgreceived, &
navg,ncorrected,eyeopening,char(0)
write(line,1022) nutc0,nsnr,tdec,nint(fest),decsym,msgreceived, &
navg,char(0)
endif
endif
999 tsec0=tsec
@ -236,8 +244,8 @@ subroutine mskrtd(id2,nutc0,tsec,ntol,nrxfreq,ndepth,mycall,mygrid,hiscall, &
end subroutine mskrtd
subroutine update_recent_shmsgs(message,msgs,nsize)
character*22 msgs(nsize)
character*22 message
character*37 msgs(nsize)
character*37 message
logical*1 seen
seen=.false.