mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-11-16 09:01:59 -05:00
Merge branch 'hotfix-wsjtx-2.0.0-rc2' of bitbucket.org:k1jt/wsjtx into hotfix-wsjtx-2.0.0-rc2
This commit is contained in:
commit
4414280471
@ -1,10 +1,11 @@
|
||||
module packjt77
|
||||
|
||||
! These variables are accessible from outside via "use packjt":
|
||||
parameter (MAXHASH=1000)
|
||||
! These variables are accessible from outside via "use packjt77":
|
||||
parameter (MAXHASH=1000,MAXRECENT=10)
|
||||
character*13 callsign(MAXHASH)
|
||||
integer ihash10(MAXHASH),ihash12(MAXHASH),ihash22(MAXHASH)
|
||||
integer n28a,n28b,nzhash
|
||||
character*13 recent_calls(MAXRECENT)
|
||||
|
||||
contains
|
||||
|
||||
@ -358,11 +359,13 @@ subroutine unpack77(c77,msg,unpk77_success)
|
||||
i=index(call_1,' ')
|
||||
if(i.ge.4 .and. ipa.eq.1 .and. i3.eq.1) call_1(i:i+1)='/R'
|
||||
if(i.ge.4 .and. ipa.eq.1 .and. i3.eq.2) call_1(i:i+1)='/P'
|
||||
if(i.ge.4) call add_call_to_recent_calls(call_1)
|
||||
endif
|
||||
if(index(call_2,'<').le.0) then
|
||||
i=index(call_2,' ')
|
||||
if(i.ge.4 .and. ipb.eq.1 .and. i3.eq.1) call_2(i:i+1)='/R'
|
||||
if(i.ge.4 .and. ipb.eq.1 .and. i3.eq.2) call_2(i:i+1)='/P'
|
||||
if(i.ge.4) call add_call_to_recent_calls(call_2)
|
||||
endif
|
||||
if(igrid4.le.MAXGRID4) then
|
||||
n=igrid4
|
||||
@ -1153,6 +1156,7 @@ subroutine unpacktext77(c71,c13)
|
||||
return
|
||||
end subroutine unpacktext77
|
||||
|
||||
<<<<<<< HEAD
|
||||
subroutine mp_short_ops(w,u)
|
||||
character*1 w(*),u(*)
|
||||
integer i,ireg,j,n,ir,iv,ii1,ii2
|
||||
@ -1197,5 +1201,26 @@ subroutine mp_short_ops(w,u)
|
||||
|
||||
return
|
||||
end subroutine mp_short_ops
|
||||
=======
|
||||
subroutine add_call_to_recent_calls(callsign)
|
||||
|
||||
character*13 callsign
|
||||
logical ladd
|
||||
! only add if the callsign is not already on the list
|
||||
ladd=.true.
|
||||
do i=1,MAXRECENT-1 ! if callsign is at the end of the list add it again
|
||||
if(recent_calls(i).eq.callsign) ladd=.false.
|
||||
enddo
|
||||
|
||||
if(ladd) then
|
||||
do i=MAXRECENT,2,-1
|
||||
recent_calls(i)=recent_calls(i-1)
|
||||
enddo
|
||||
recent_calls(1)=callsign
|
||||
endif
|
||||
|
||||
return
|
||||
end subroutine add_call_to_recent_calls
|
||||
>>>>>>> d66724f6e9dd8fd8f1340aec9e5c0ebf45a681ac
|
||||
|
||||
end module packjt77
|
||||
|
@ -1,9 +1,8 @@
|
||||
subroutine msk144decodeframe(c,softbits,msgreceived,nsuccess,recent_calls,nrecent)
|
||||
subroutine msk144decodeframe(c,softbits,msgreceived,nsuccess)
|
||||
! use timer_module, only: timer
|
||||
use packjt77
|
||||
parameter (NSPM=864)
|
||||
character*37 msgreceived
|
||||
character*12 recent_calls(nrecent)
|
||||
character*77 c77
|
||||
complex cb(42)
|
||||
complex cfac,cca,ccb
|
||||
|
@ -1,13 +1,13 @@
|
||||
subroutine msk144spd(cbig,n,ntol,nsuccess,msgreceived,fc,fret,tret,navg,ct, &
|
||||
softbits,recent_calls,nrecent)
|
||||
softbits)
|
||||
|
||||
! MSK144 short-ping-decoder
|
||||
|
||||
use packjt77
|
||||
use timer_module, only: timer
|
||||
|
||||
parameter (NSPM=864, MAXSTEPS=100, NFFT=NSPM, MAXCAND=5, NPATTERNS=6)
|
||||
character*37 msgreceived
|
||||
character*12 recent_calls(nrecent)
|
||||
complex cbig(n)
|
||||
complex cdat(3*NSPM) !Analytic signal
|
||||
complex c(NSPM)
|
||||
@ -179,8 +179,7 @@ subroutine msk144spd(cbig,n,ntol,nsuccess,msgreceived,fc,fret,tret,navg,ct, &
|
||||
if( is.eq.2) ic0=max(1,ic0-1)
|
||||
if( is.eq.3) ic0=min(NSPM,ic0+1)
|
||||
ct=cshift(c,ic0-1)
|
||||
call msk144decodeframe(ct,softbits,msgreceived,ndecodesuccess, &
|
||||
recent_calls,nrecent)
|
||||
call msk144decodeframe(ct,softbits,msgreceived,ndecodesuccess)
|
||||
if( ndecodesuccess .gt. 0 ) then
|
||||
tret=(nstart(icand)+NSPM/2)/fs
|
||||
fret=fest
|
||||
|
@ -1,19 +1,19 @@
|
||||
subroutine msk40decodeframe(c,mycall,hiscall,xsnr,bswl,nhasharray, &
|
||||
recent_calls,nrecent,msgreceived,nsuccess)
|
||||
msgreceived,nsuccess)
|
||||
! use timer_module, only: timer
|
||||
use packjt77
|
||||
|
||||
parameter (NSPM=240)
|
||||
character*4 rpt(0:15)
|
||||
character*6 mycall,hiscall,mycall0,hiscall0
|
||||
character*22 hashmsg,msgreceived
|
||||
character*12 recent_calls(nrecent)
|
||||
complex cb(42)
|
||||
complex cfac,cca
|
||||
complex c(NSPM)
|
||||
integer*1 cw(32)
|
||||
integer*1 decoded(16)
|
||||
integer s8r(8),hardbits(40)
|
||||
integer nhasharray(nrecent,nrecent)
|
||||
integer nhasharray(MAXRECENT,MAXRECENT)
|
||||
real*8 dt, fs, pi, twopi
|
||||
real cbi(42),cbq(42)
|
||||
real pp(12)
|
||||
@ -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,33 +132,28 @@ 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)
|
||||
return
|
||||
elseif(bswl .and. nhammd.le.4 .and. cord.lt.0.65 .and. nrxrpt.ge.7 ) then
|
||||
do i=1,nrecent
|
||||
do j=i+1,nrecent
|
||||
do i=1,MAXRECENT
|
||||
do j=i+1,MAXRECENT
|
||||
if( nrxhash .eq. nhasharray(i,j) ) then
|
||||
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
|
||||
|
@ -1,13 +1,13 @@
|
||||
subroutine msk40spd(cbig,n,ntol,mycall,hiscall,bswl,nhasharray,recent_calls, &
|
||||
nrecent,nsuccess,msgreceived,fc,fret,tret,navg)
|
||||
subroutine msk40spd(cbig,n,ntol,mycall,hiscall,bswl,nhasharray, &
|
||||
nsuccess,msgreceived,fc,fret,tret,navg)
|
||||
! msk40 short-ping-decoder
|
||||
|
||||
use packjt77
|
||||
use timer_module, only: timer
|
||||
|
||||
parameter (NSPM=240, MAXSTEPS=150, NFFT=NSPM, MAXCAND=5, NPATTERNS=6)
|
||||
character*6 mycall,hiscall
|
||||
character*22 msgreceived
|
||||
character*12 recent_calls(nrecent)
|
||||
complex cbig(n)
|
||||
complex cdat(3*NSPM) !Analytic signal
|
||||
complex c(NSPM)
|
||||
@ -19,7 +19,6 @@ subroutine msk40spd(cbig,n,ntol,mycall,hiscall,bswl,nhasharray,recent_calls, &
|
||||
integer navpatterns(3,NPATTERNS)
|
||||
integer navmask(3)
|
||||
integer nstart(MAXCAND)
|
||||
integer nhasharray(nrecent,nrecent)
|
||||
logical ismask(NFFT)
|
||||
logical*1 bswl
|
||||
real detmet(-2:MAXSTEPS+3)
|
||||
@ -181,7 +180,7 @@ subroutine msk40spd(cbig,n,ntol,mycall,hiscall,bswl,nhasharray,recent_calls, &
|
||||
if( is.eq.3) ic0=min(NSPM,ic0+1)
|
||||
ct=cshift(c,ic0-1)
|
||||
call msk40decodeframe(ct,mycall,hiscall,xsnr,bswl,nhasharray, &
|
||||
recent_calls,nrecent,msgreceived,ndecodesuccess)
|
||||
msgreceived,ndecodesuccess)
|
||||
if( ndecodesuccess .gt. 0 ) then
|
||||
!write(*,*) icand, iav, ipk, is, tret, fret, msgreceived
|
||||
tret=(nstart(icand)+NSPM/2)/fs
|
||||
|
@ -5,21 +5,22 @@ subroutine mskrtd(id2,nutc0,tsec,ntol,nrxfreq,ndepth,mycall,mygrid,hiscall, &
|
||||
! Analysis block size = NZ = 7168 samples, t_block = 0.597333 s
|
||||
! Called from hspec() at half-block increments, about 0.3 s
|
||||
|
||||
use packjt77
|
||||
|
||||
parameter (NZ=7168) !Block size
|
||||
parameter (NSPM=864) !Number of samples per message frame
|
||||
parameter (NFFT1=8192) !FFT size for making analytic signal
|
||||
parameter (NPATTERNS=4) !Number of frame averaging patterns to try
|
||||
parameter (NRECENT=10) !Number of recent calls to remember
|
||||
parameter (NSHMEM=50) !Number of recent SWL messages to remember
|
||||
|
||||
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
|
||||
@ -30,7 +31,7 @@ subroutine mskrtd(id2,nutc0,tsec,ntol,nrxfreq,ndepth,mycall,mygrid,hiscall, &
|
||||
integer iavmask(8)
|
||||
integer iavpatterns(8,NPATTERNS)
|
||||
integer npkloc(10)
|
||||
integer nhasharray(NRECENT,NRECENT)
|
||||
integer nhasharray(MAXRECENT,MAXRECENT)
|
||||
integer nsnrlast,nsnrlastswl
|
||||
|
||||
real d(NFFT1)
|
||||
@ -54,20 +55,20 @@ subroutine mskrtd(id2,nutc0,tsec,ntol,nrxfreq,ndepth,mycall,mygrid,hiscall, &
|
||||
1,1,1,1,1,1,1,0/
|
||||
data xmc/2.0,4.5,2.5,3.5/ !Used to set time at center of averaging mask
|
||||
save first,tsec0,nutc00,pnoise,cdat,msglast,msglastswl, &
|
||||
nsnrlast,nsnrlastswl,recent_calls,nhasharray,recent_shmsgs
|
||||
nsnrlast,nsnrlastswl,nhasharray,recent_shmsgs
|
||||
|
||||
if(first) then
|
||||
tsec0=tsec
|
||||
nutc00=nutc0
|
||||
pnoise=-1.0
|
||||
do i=1,nrecent
|
||||
recent_calls(i)(1:12)=' '
|
||||
do i=1,MAXRECENT
|
||||
recent_calls(i)(1:13)=' '
|
||||
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
|
||||
@ -116,10 +117,11 @@ subroutine mskrtd(id2,nutc0,tsec,ntol,nrxfreq,ndepth,mycall,mygrid,hiscall, &
|
||||
! 3 frames along with 2- and 3-frame averages.
|
||||
np=8*NSPM
|
||||
call msk144spd(cdat,np,ntol,ndecodesuccess,msgreceived,fc,fest,tdec,navg,ct, &
|
||||
softbits,recent_calls,nrecent)
|
||||
softbits)
|
||||
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)
|
||||
ndecodesuccess,msgrx22,fc,fest,tdec,navg)
|
||||
if( ndecodesuccess .ge. 1 ) msgreceived(1:22)=msgrx22
|
||||
endif
|
||||
if( ndecodesuccess .ge. 1 ) then
|
||||
tdec=tsec+tdec
|
||||
@ -150,8 +152,7 @@ subroutine mskrtd(id2,nutc0,tsec,ntol,nrxfreq,ndepth,mycall,mygrid,hiscall, &
|
||||
if(is.eq.2) ic0=max(1,ic0-1)
|
||||
if(is.eq.3) ic0=min(NSPM,ic0+1)
|
||||
ct=cshift(c,ic0-1)
|
||||
call msk144decodeframe(ct,softbits,msgreceived,ndecodesuccess, &
|
||||
recent_calls,nrecent)
|
||||
call msk144decodeframe(ct,softbits,msgreceived,ndecodesuccess)
|
||||
if(ndecodesuccess .gt. 0) then
|
||||
tdec=tsec+xmc(iavg)*tframe
|
||||
goto 900
|
||||
@ -192,7 +193,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
|
||||
@ -207,11 +208,17 @@ subroutine mskrtd(id2,nutc0,tsec,ntol,nrxfreq,ndepth,mycall,mygrid,hiscall, &
|
||||
msglast=msgreceived
|
||||
nsnrlast=nsnr
|
||||
if(.not. bshdecode) then
|
||||
call update_hasharray(recent_calls,nrecent,nhasharray)
|
||||
call update_hasharray(nhasharray)
|
||||
endif
|
||||
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
|
||||
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)
|
||||
elseif(bswl .and. ndecodesuccess.ge.2) then
|
||||
seenb4=.false.
|
||||
do i=1,nshmem
|
||||
@ -226,8 +233,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 +243,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.
|
||||
|
@ -1,12 +1,12 @@
|
||||
subroutine update_hasharray(recent_calls,nrecent,nhasharray)
|
||||
subroutine update_hasharray(nhasharray)
|
||||
|
||||
character*12 recent_calls(nrecent)
|
||||
use packjt77
|
||||
character*22 hashmsg
|
||||
integer nhasharray(nrecent,nrecent)
|
||||
integer nhasharray(MAXRECENT,MAXRECENT)
|
||||
|
||||
nhasharray=-1
|
||||
do i=1,nrecent
|
||||
do j=i+1,nrecent
|
||||
do i=1,MAXRECENT
|
||||
do j=i+1,MAXRECENT
|
||||
if( recent_calls(i)(1:1) .ne. ' ' .and. recent_calls(j)(1:1) .ne. ' ' ) then
|
||||
hashmsg=trim(recent_calls(i))//' '//trim(recent_calls(j))
|
||||
call fmtmsg(hashmsg,iz)
|
||||
|
Loading…
Reference in New Issue
Block a user