mirror of
				https://github.com/saitohirga/WSJT-X.git
				synced 2025-10-31 13:10:19 -04:00 
			
		
		
		
	Check for hard symbol errors.
This commit is contained in:
		
							parent
							
								
									42439c2b6d
								
							
						
					
					
						commit
						3434faf84a
					
				
							
								
								
									
										32
									
								
								lib/superfox/hard_symbols.f90
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										32
									
								
								lib/superfox/hard_symbols.f90
									
									
									
									
									
										Normal file
									
								
							| @ -0,0 +1,32 @@ | |||||||
|  | subroutine hard_symbols(crcvd,f,t,jdat) | ||||||
|  | 
 | ||||||
|  |   include "sfox_params.f90" | ||||||
|  |   complex crcvd(NMAX)                    !Signal as received | ||||||
|  |   complex c(0:NSPS-1)                    !Work array, one symbol long | ||||||
|  |   real s(0:NSPS-1)                       !Power spectrum | ||||||
|  |   integer*1 jdat(ND)                     !Recovered hard-decision symbols | ||||||
|  |   integer ipk(1) | ||||||
|  | 
 | ||||||
|  |   i0=nint(12000.0*t) | ||||||
|  |   df=12000.0/NSPS | ||||||
|  |   j0=nint(f/df)-128 | ||||||
|  |   do n=1,ND                             !Loop over all symbols | ||||||
|  |      ib=n*NSPS + i0 | ||||||
|  |      if(n.gt.ND1) ib=(NS+n)*NSPS + i0 | ||||||
|  |      ia=ib-NSPS+1 | ||||||
|  |      c=crcvd(ia:ib) | ||||||
|  |      call four2a(c,NSPS,1,-1,1)          !Compute symbol spectrum | ||||||
|  |      do i=0,NSPS-1 | ||||||
|  |         s(i)=real(c(i))**2 + aimag(c(i))**2 | ||||||
|  |      enddo | ||||||
|  |      ipk=maxloc(s) | ||||||
|  |      ipk(1)=ipk(1)-j0 | ||||||
|  |      if(ipk(1).ge.64) then | ||||||
|  |         jdat(n)=ipk(1)-64 | ||||||
|  |      else | ||||||
|  |         jdat(n)=ipk(1)+256-64 | ||||||
|  |      endif | ||||||
|  |   enddo | ||||||
|  | 
 | ||||||
|  |   return | ||||||
|  | end subroutine hard_symbols | ||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user