mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2025-03-25 21:49:20 -04:00
Revert "Input ts (approx tsync) from command line."
This reverts commit fada229d83
.
This commit is contained in:
parent
baec5dcfd2
commit
863ac4fd3d
@ -10,7 +10,7 @@ module sfox_mod
|
||||
40, 89, 0, 46, 34,126, 35, 80, 21, 94/
|
||||
|
||||
contains
|
||||
subroutine sfox_init(mm0,nn0,kk0,itu,fspread,delay,fsample,ts)
|
||||
subroutine sfox_init(mm0,nn0,kk0,itu,fspread,delay,fsample)
|
||||
|
||||
character*2 itu
|
||||
integer isps(54)
|
||||
@ -30,10 +30,11 @@ contains
|
||||
ND2=NN-ND1 !Data symbols after sync
|
||||
NFZ=3 !First zero
|
||||
|
||||
jsps=nint((12.8-ts)*fsample/NN)
|
||||
tsync=3.0
|
||||
jsps=nint((12.8-tsync)*fsample/NN)
|
||||
iloc=minloc(abs(isps-jsps))
|
||||
NSPS=isps(iloc(1)) !Samples per symbol
|
||||
NS=nint(ts*fsample/NSPS)
|
||||
NS=nint(tsync*fsample/NSPS)
|
||||
if(mod(NS,2).eq.1) NS=NS+1
|
||||
NSYNC=NS*NSPS !Samples in sync waveform
|
||||
NZ=NSPS*(NN+NS) !Samples in full Tx waveform
|
||||
|
@ -31,15 +31,14 @@ program sfoxtest
|
||||
character fname*17,arg*12,itu*2
|
||||
|
||||
nargs=iargc()
|
||||
if(nargs.ne.11) then
|
||||
print*,'Usage: sfoxtest f0 DT ITU M N K ts v hs nfiles snr'
|
||||
print*,'Example: sfoxtest 1500 0.15 MM 7 127 48 3 0 F 10 -10'
|
||||
if(nargs.ne.10) then
|
||||
print*,'Usage: sfoxtest f0 DT ITU M N K v hs nfiles snr'
|
||||
print*,'Example: sfoxtest 1500 0.15 MM 8 74 44 0 F 10 -10'
|
||||
print*,' f0=0 means f0, DT will assume suitable random values'
|
||||
print*,' LQ: Low Latitude Quiet'
|
||||
print*,' MM: Mid Latitude Moderate'
|
||||
print*,' HD: High Latitude Disturbed'
|
||||
print*,' ... and similarly for LM LD MQ MD HQ HM'
|
||||
print*,' ts: approximate sync duration (s)'
|
||||
print*,' v=1 for .wav files, 2 for verbose output, 3 for both'
|
||||
print*,' hs = T for hard-wired sync'
|
||||
print*,' snr=0 means loop over SNRs'
|
||||
@ -57,21 +56,19 @@ program sfoxtest
|
||||
call getarg(6,arg)
|
||||
read(arg,*) kk0
|
||||
call getarg(7,arg)
|
||||
read(arg,*) ts
|
||||
call getarg(8,arg)
|
||||
read(arg,*) nv
|
||||
call getarg(9,arg)
|
||||
call getarg(8,arg)
|
||||
hard_sync=arg(1:1).eq.'T'
|
||||
call getarg(10,arg)
|
||||
call getarg(9,arg)
|
||||
read(arg,*) nfiles
|
||||
call getarg(11,arg)
|
||||
call getarg(10,arg)
|
||||
read(arg,*) snrdb
|
||||
|
||||
call init_timer ('timer.out')
|
||||
call timer('sfoxtest',0)
|
||||
|
||||
fsample=12000.0 !Sample rate (Hz)
|
||||
call sfox_init(mm0,nn0,kk0,itu,fspread,delay,fsample,ts)
|
||||
call sfox_init(mm0,nn0,kk0,itu,fspread,delay,fsample)
|
||||
baud=fsample/NSPS
|
||||
tsym=1.0/baud
|
||||
bw=NQ*baud
|
||||
@ -234,14 +231,14 @@ program sfoxtest
|
||||
fgoodsync=float(ngoodsync)/nfiles
|
||||
fgood=float(ngood)/nfiles
|
||||
if(isnr.eq.isnr0) write(*,1300)
|
||||
1300 format(' SNR Eb/No iters fsync fgood averr worst rmsf rmst'/ &
|
||||
1300 format(' SNR Eb/No iters fsync fgood averr worst rmsf rmst'/ &
|
||||
'------------------------------------------------------------')
|
||||
ave_harderr=float(ntot)/nfiles
|
||||
rmst=sqrt(sqt/ngoodsync)
|
||||
rmsf=sqrt(sqf/ngoodsync)
|
||||
ebno=snr-10*log10(baud/2500*mm0*KK/NN)
|
||||
write(*,1310) snr,ebno,nfiles,fgoodsync,fgood,ave_harderr,nworst,rmsf,rmst
|
||||
1310 format(f7.2,f7.2 i6,2f7.4,f7.1,i6,f6.1,f7.3)
|
||||
1310 format(f7.2,f7.2 i6,2f7.4,f7.1,i6,f7.2,f6.3)
|
||||
if(fgood.le.0.5 .and. fgood0.gt.0.5) then
|
||||
threshold=isnr + 1 - (fgood0-0.50)/(fgood0-fgood+0.000001)
|
||||
endif
|
||||
|
Loading…
Reference in New Issue
Block a user