mirror of
				https://github.com/saitohirga/WSJT-X.git
				synced 2025-10-31 13:10:19 -04:00 
			
		
		
		
	Build synctest from top-level CMakeLists.txt. Add 'nfiles' capability.
This commit is contained in:
		
							parent
							
								
									0531f339e8
								
							
						
					
					
						commit
						b0bc73e3f3
					
				| @ -586,6 +586,10 @@ set (wsjt_FSRCS | ||||
|   lib/fst4/get_crc24.f90 | ||||
|   lib/fst4/fst4_baseline.f90 | ||||
|   lib/77bit/hash22calc.f90 | ||||
|   lib/superfox/gen_sfox.f90 | ||||
|   lib/superfox/sync_sf.f90 | ||||
|   lib/superfox/hard_symbols.f90 | ||||
|   lib/superfox/ran1.f90 | ||||
|   ) | ||||
| 
 | ||||
| # temporary workaround for a gfortran v7.3 ICE on Fedora 27 64-bit | ||||
|  | ||||
| @ -18,9 +18,9 @@ program synctest | ||||
|   character fname*17,arg*12 | ||||
|    | ||||
|   nargs=iargc() | ||||
|   if(nargs.ne.6) then | ||||
|      print*,'Usage:   synctest   f0    DT fspread delay width snr' | ||||
|      print*,'Example: synctest 1500.0 2.5    0.0   0.0   100  -20' | ||||
|   if(nargs.ne.8) then | ||||
|      print*,'Usage:   synctest   f0    DT fspread delay width nran nfiles snr' | ||||
|      print*,'Example: synctest 1500.0 2.5    0.0   0.0   100    0    10   -20' | ||||
|      go to 999 | ||||
|   endif | ||||
|   call getarg(1,arg) | ||||
| @ -34,19 +34,31 @@ program synctest | ||||
|   call getarg(5,arg) | ||||
|   read(arg,*) syncwidth | ||||
|   call getarg(6,arg) | ||||
|   read(arg,*) nran | ||||
|   call getarg(7,arg) | ||||
|   read(arg,*) nfiles | ||||
|   call getarg(8,arg) | ||||
|   read(arg,*) snrdb | ||||
| 
 | ||||
|   rms=100. | ||||
|   fsample=12000.0                   !Sample rate (Hz) | ||||
|   baud=12000.0/nsps                 !Keying rate, 11.719 baud for nsps=1024 | ||||
|   h=default_header(12000,NMAX) | ||||
|   idummy=0 | ||||
|   bandwidth_ratio=2500.0/6000.0 | ||||
|   sig=sqrt(2*bandwidth_ratio)*10.0**(0.05*snrdb) | ||||
|   if(snrdb.gt.90.0) sig=1.0 | ||||
|   ngood=0 | ||||
| 
 | ||||
|   do ifile=1,nfiles | ||||
|      do i=1,ND | ||||
|      idat(i)=128*ran1(idummy) | ||||
|         call random_number(r) | ||||
|         if(nran.eq.1) r=ran1(idummy) | ||||
|         idat(i)=128*r | ||||
|      enddo | ||||
|    | ||||
|   h=default_header(12000,NMAX) | ||||
|      fname='000000_000001.wav' | ||||
|      write(fname(8:13),'(i6.6)') ifile | ||||
|      open(10,file=trim(fname),access='stream',status='unknown') | ||||
| 
 | ||||
|      xnoise=0. | ||||
| @ -60,10 +72,6 @@ program synctest | ||||
|         enddo | ||||
|      endif | ||||
| 
 | ||||
|   bandwidth_ratio=2500.0/6000.0 | ||||
|   sig=sqrt(2*bandwidth_ratio)*10.0**(0.05*snrdb) | ||||
|   if(snrdb.gt.90.0) sig=1.0 | ||||
| 
 | ||||
| !Generate cdat (SuperFox waveform) and clo (LO needed for sync detection) | ||||
|      call gen_sfox(idat,f0,fsample,syncwidth,cdat,clo)   | ||||
| 
 | ||||
| @ -95,10 +103,11 @@ program synctest | ||||
| 1110 format('err:',f6.1,f12.2) | ||||
|      write(*,1120) nharderr | ||||
| 1120 format('Hard errors:',i4) | ||||
|      if(nharderr.le.38) ngood=ngood+1 | ||||
| !     write(13,1200) snrdb,nharderr | ||||
| !1200 format(f7.2,i5) | ||||
|   enddo | ||||
|   write(*,1300) snrdb,nfiles,ngood,float(ngood)/nfiles | ||||
| 1300 format(f7.2,2i5,f7.2) | ||||
| 
 | ||||
| 999 end program synctest | ||||
| 
 | ||||
|   include 'gen_sfox.f90' | ||||
|   include 'sync_sf.f90' | ||||
|   include 'hard_symbols.f90' | ||||
|   include 'ran1.f90' | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user