mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2025-06-09 01:52:30 -04:00
Interpolate threshold sensitivity for 50% decoding probability.
This commit is contained in:
parent
4a1e6a19fc
commit
ec535541db
@ -1,10 +1,9 @@
|
|||||||
program sfoxtest
|
program sfoxtest
|
||||||
|
|
||||||
! Generate and test sync waveforms for possible use in SuperFox signal.
|
! Generate and test possible waveforms for SuperFox signal.
|
||||||
|
|
||||||
use wavhdr
|
use wavhdr
|
||||||
use sfox_mod
|
use sfox_mod
|
||||||
! include "sfox_params.f90"
|
|
||||||
type(hdr) h !Header for .wav file
|
type(hdr) h !Header for .wav file
|
||||||
integer*2 iwave(NMAX) !Generated i*2 waveform
|
integer*2 iwave(NMAX) !Generated i*2 waveform
|
||||||
real*4 xnoise(NMAX) !Random noise
|
real*4 xnoise(NMAX) !Random noise
|
||||||
@ -60,6 +59,7 @@ program sfoxtest
|
|||||||
1000 format('M:',i2,' Base code: (',i3,',',i3,') NSPS:',i5, &
|
1000 format('M:',i2,' Base code: (',i3,',',i3,') NSPS:',i5, &
|
||||||
' Symbol Rate:',f7.3,' BW:',f6.0)
|
' Symbol Rate:',f7.3,' BW:',f6.0)
|
||||||
|
|
||||||
|
! Allocate storage for arrays that depend on code parameters.
|
||||||
allocate(msg0(1:KK))
|
allocate(msg0(1:KK))
|
||||||
allocate(parsym(1:NN-KK))
|
allocate(parsym(1:NN-KK))
|
||||||
allocate(chansym0(1:NN))
|
allocate(chansym0(1:NN))
|
||||||
@ -84,6 +84,7 @@ program sfoxtest
|
|||||||
call rs_encode_sf(msg0,parsym) !Compute parity symbols
|
call rs_encode_sf(msg0,parsym) !Compute parity symbols
|
||||||
chansym0(1:kk)=msg0(1:kk)
|
chansym0(1:kk)=msg0(1:kk)
|
||||||
chansym0(kk+1:nn)=parsym(1:nn-kk)
|
chansym0(kk+1:nn)=parsym(1:nn-kk)
|
||||||
|
fgood0=1.0
|
||||||
|
|
||||||
! Generate cdat (SuperFox waveform) and clo (LO for sync detection)
|
! Generate cdat (SuperFox waveform) and clo (LO for sync detection)
|
||||||
call gen_sfox(chansym0,f0,fsample,syncwidth,cdat,clo)
|
call gen_sfox(chansym0,f0,fsample,syncwidth,cdat,clo)
|
||||||
@ -167,10 +168,7 @@ program sfoxtest
|
|||||||
|
|
||||||
maxerr=(nn-kk)/2
|
maxerr=(nn-kk)/2
|
||||||
if(nharderr.le.maxerr) ngood=ngood+1
|
if(nharderr.le.maxerr) ngood=ngood+1
|
||||||
! write(13,1200) ifile,snr,ferr,terr,nharderr
|
|
||||||
!1200 format(i5,3f10.3,i5)
|
|
||||||
enddo ! ifile
|
enddo ! ifile
|
||||||
! print*,'D'
|
|
||||||
fgoodsync=float(ngoodsync)/nfiles
|
fgoodsync=float(ngoodsync)/nfiles
|
||||||
fgood=float(ngood)/nfiles
|
fgood=float(ngood)/nfiles
|
||||||
if(isnr.eq.0) write(*,1300)
|
if(isnr.eq.0) write(*,1300)
|
||||||
@ -179,8 +177,17 @@ program sfoxtest
|
|||||||
ave_harderr=float(ntot)/nfiles
|
ave_harderr=float(ntot)/nfiles
|
||||||
write(*,1310) snr,nfiles,fgoodsync,fgood,ave_harderr,nworst
|
write(*,1310) snr,nfiles,fgoodsync,fgood,ave_harderr,nworst
|
||||||
1310 format(f7.2,i6,2f7.2,f7.1,i6)
|
1310 format(f7.2,i6,2f7.2,f7.1,i6)
|
||||||
|
|
||||||
|
if(snrdb.eq.0 .and. fgood.le.0.5 .and. fgood0.gt.0.5) then
|
||||||
|
threshold=isnr+1 - (fgood0-0.50)/(fgood0-fgood)
|
||||||
|
|
||||||
|
endif
|
||||||
|
|
||||||
|
fgood0=fgood
|
||||||
if(snrdb.ne.0.0) exit
|
if(snrdb.ne.0.0) exit
|
||||||
if(fgoodsync.lt.0.5) exit
|
if(fgoodsync.lt.0.5) exit
|
||||||
enddo ! isnr
|
enddo ! isnr
|
||||||
|
write(*,1320) threshold
|
||||||
|
1320 format('Threshold sensitivity (50% decoding):',f6.1)
|
||||||
|
|
||||||
999 end program sfoxtest
|
999 end program sfoxtest
|
||||||
|
Loading…
x
Reference in New Issue
Block a user