mirror of
				https://github.com/saitohirga/WSJT-X.git
				synced 2025-11-03 21:40:52 -05:00 
			
		
		
		
	Fix a potential problem in hint65.f90
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@6568 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
		
							parent
							
								
									cb8eeba835
								
							
						
					
					
						commit
						26f10956b3
					
				@ -86,8 +86,6 @@ subroutine hint65(s3,mrs,mrs2,mrsym,mr2sym,mrprob,nadd,flip,   &
 | 
				
			|||||||
              if(m.eq.2)  msg='CQ '//call2(i)//' '//grid2(i)
 | 
					              if(m.eq.2)  msg='CQ '//call2(i)//' '//grid2(i)
 | 
				
			||||||
           endif
 | 
					           endif
 | 
				
			||||||
           call fmtmsg(msg,iz)
 | 
					           call fmtmsg(msg,iz)
 | 
				
			||||||
!           write(65,3001) msg
 | 
					 | 
				
			||||||
!3001       format(a22)
 | 
					 | 
				
			||||||
           call packmsg(msg,dgen,itype)            !Pack message into 72 bits
 | 
					           call packmsg(msg,dgen,itype)            !Pack message into 72 bits
 | 
				
			||||||
           call rs_encode(dgen,sym_rev)            !RS encode
 | 
					           call rs_encode(dgen,sym_rev)            !RS encode
 | 
				
			||||||
           sym(0:62)=sym_rev(62:0:-1)
 | 
					           sym(0:62)=sym_rev(62:0:-1)
 | 
				
			||||||
@ -116,6 +114,7 @@ subroutine hint65(s3,mrs,mrs2,mrsym,mr2sym,mrprob,nadd,flip,   &
 | 
				
			|||||||
! Find u1 and u2 (best and second-best) codeword from a list, using 
 | 
					! Find u1 and u2 (best and second-best) codeword from a list, using 
 | 
				
			||||||
! a bank of matched filters on the symbol spectra s3(i,j).
 | 
					! a bank of matched filters on the symbol spectra s3(i,j).
 | 
				
			||||||
  ipk=1
 | 
					  ipk=1
 | 
				
			||||||
 | 
					  ipk2=0
 | 
				
			||||||
  do k=1,nused
 | 
					  do k=1,nused
 | 
				
			||||||
     if(k.ge.2 .and. k.le.64 .and. flip.lt.0.0) cycle
 | 
					     if(k.ge.2 .and. k.le.64 .and. flip.lt.0.0) cycle
 | 
				
			||||||
! Test all messages if flip=+1; skip the CQ messages if flip=-1.
 | 
					! Test all messages if flip=+1; skip the CQ messages if flip=-1.
 | 
				
			||||||
@ -131,18 +130,32 @@ subroutine hint65(s3,mrs,mrs2,mrsym,mr2sym,mrprob,nadd,flip,   &
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
        if(p.gt.u1) then
 | 
					        if(p.gt.u1) then
 | 
				
			||||||
           u2=u1
 | 
					           u2=u1
 | 
				
			||||||
 | 
					           ipk2=ipk
 | 
				
			||||||
           u1=p
 | 
					           u1=p
 | 
				
			||||||
           ipk=k
 | 
					           ipk=k
 | 
				
			||||||
        endif
 | 
					        endif
 | 
				
			||||||
        if(p.ne.u1 .and. p.gt.u2) u2=p
 | 
					        if(p.ne.u1 .and. p.gt.u2) then
 | 
				
			||||||
 | 
					           u2=p
 | 
				
			||||||
 | 
					           ipk2=k
 | 
				
			||||||
        endif
 | 
					        endif
 | 
				
			||||||
 | 
					     endif
 | 
				
			||||||
 | 
					!     write(91,3401) k,p,u1,u2,ipk,ipk2,msg0(k)
 | 
				
			||||||
 | 
					!3401  format(i6,3f9.3,2i6,2x,a22)
 | 
				
			||||||
  enddo
 | 
					  enddo
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					!### Just in case ???
 | 
				
			||||||
 | 
					  rewind 77
 | 
				
			||||||
 | 
					  write(77,*) u1,u2,ipk,ipk2
 | 
				
			||||||
 | 
					  call flush(77)
 | 
				
			||||||
 | 
					!###
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  decoded='                      '
 | 
					  decoded='                      '
 | 
				
			||||||
  bias=max(1.12*u2,0.35)
 | 
					  bias=max(1.12*u2,0.35)
 | 
				
			||||||
  if(nadd.ge.4) bias=max(1.08*u2,0.45)
 | 
					  if(nadd.ge.4) bias=max(1.08*u2,0.45)
 | 
				
			||||||
  if(nadd.ge.8) bias=max(1.04*u2,0.60)
 | 
					  if(nadd.ge.8) bias=max(1.04*u2,0.60)
 | 
				
			||||||
  qual=100.0*(u1-bias)
 | 
					  qual=100.0*(u1-bias)
 | 
				
			||||||
 | 
					!  write(*,3301) u1,u2,u1/u2,bias,qual,nadd,ipk,ipk2
 | 
				
			||||||
 | 
					!3301 format(5f6.2,i3,2i6)
 | 
				
			||||||
  qmin=1.0
 | 
					  qmin=1.0
 | 
				
			||||||
  if(qual.ge.qmin) decoded=msg0(ipk)
 | 
					  if(qual.ge.qmin) decoded=msg0(ipk)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user