mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2025-07-30 20:52:28 -04:00
Put superfox parameters in sfox_params.f90.
This commit is contained in:
parent
0d664e4ed1
commit
88838fca62
12
lib/superfox/sfox_params.f90
Normal file
12
lib/superfox/sfox_params.f90
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
parameter (KK=49) !Information bits
|
||||||
|
parameter (ND1=62) !Data symbols before sync waveform
|
||||||
|
parameter (ND2=63) !Data symbols after sync waveform
|
||||||
|
parameter (ND=ND1+ND2) !Total data symbols (125)
|
||||||
|
parameter (NS=23) !Sync symbols (for length)
|
||||||
|
parameter (NN=NS+ND) !Total channel symbols (148)
|
||||||
|
parameter (NSPS=1024) !Samples per symbol at 12000 S/s
|
||||||
|
parameter (NSYNC=NS*NSPS) !Samples in sync waveform (23,552)
|
||||||
|
parameter (NZ=NSPS*NN) !Samples in full Tx waveform (151,552)
|
||||||
|
parameter (NMAX=15*12000) !Samples in iwave (180,000)
|
||||||
|
parameter (NFFT=32768) !Length of FFT for sync waveform
|
||||||
|
parameter (NFFT1=2*NSPS) !Length of FFTs for symbol spectra
|
@ -3,8 +3,7 @@ program synctest
|
|||||||
! Generate and test sync waveforms for possible use in SuperFox signal.
|
! Generate and test sync waveforms for possible use in SuperFox signal.
|
||||||
|
|
||||||
use wavhdr
|
use wavhdr
|
||||||
parameter (NMAX=15*12000) !Total samples in .wav file
|
include "sfox_params.f90"
|
||||||
parameter (NFFT=32768)
|
|
||||||
parameter (MMAX=150,JMAX=300)
|
parameter (MMAX=150,JMAX=300)
|
||||||
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
|
||||||
@ -37,28 +36,19 @@ program synctest
|
|||||||
call getarg(4,arg)
|
call getarg(4,arg)
|
||||||
read(arg,*) snrdb
|
read(arg,*) snrdb
|
||||||
|
|
||||||
ntrperiod=15
|
|
||||||
rms=100.
|
rms=100.
|
||||||
fsample=12000.0 !Sample rate (Hz)
|
fsample=12000.0 !Sample rate (Hz)
|
||||||
npts=fsample*ntrperiod !Total samples in .wav file
|
|
||||||
twopi=8.0*atan(1.0)
|
twopi=8.0*atan(1.0)
|
||||||
|
tsync=NS*nsps/fsample
|
||||||
nsps=1024
|
|
||||||
ns1=62
|
|
||||||
nsync=23
|
|
||||||
ns2=63
|
|
||||||
tsync=nsync*nsps/fsample
|
|
||||||
nsym=125 !Number of channel symbols
|
|
||||||
nsync=tsync*fsample
|
|
||||||
|
|
||||||
baud=12000.0/nsps !Keying rate, 11.719 baud for nsps=1024
|
baud=12000.0/nsps !Keying rate, 11.719 baud for nsps=1024
|
||||||
h=default_header(12000,npts)
|
h=default_header(12000,NMAX)
|
||||||
fname='000000_000001.wav'
|
fname='000000_000001.wav'
|
||||||
open(10,file=trim(fname),access='stream',status='unknown')
|
open(10,file=trim(fname),access='stream',status='unknown')
|
||||||
|
|
||||||
xnoise=0.
|
xnoise=0.
|
||||||
cnoise=0.
|
cnoise=0.
|
||||||
if(snrdb.lt.90) then
|
if(snrdb.lt.90) then
|
||||||
do i=1,npts !Generate Gaussian noise
|
do i=1,NMAX !Generate Gaussian noise
|
||||||
x=gran()
|
x=gran()
|
||||||
y=gran()
|
y=gran()
|
||||||
xnoise(i)=x
|
xnoise(i)=x
|
||||||
@ -96,9 +86,9 @@ program synctest
|
|||||||
|
|
||||||
dat=aimag(cdat(1:NMAX)) + xnoise !Add generated AWGN noise
|
dat=aimag(cdat(1:NMAX)) + xnoise !Add generated AWGN noise
|
||||||
fac=32767.0
|
fac=32767.0
|
||||||
if(snrdb.ge.90.0) iwave(1:npts)=nint(fac*dat(1:npts))
|
if(snrdb.ge.90.0) iwave(1:NMAX)=nint(fac*dat(1:NMAX))
|
||||||
if(snrdb.lt.90.0) iwave(1:npts)=nint(rms*dat(1:npts))
|
if(snrdb.lt.90.0) iwave(1:NMAX)=nint(rms*dat(1:NMAX))
|
||||||
write(10) h,iwave(1:npts) !Save the .wav file
|
write(10) h,iwave(1:NMAX) !Save the .wav file
|
||||||
close(10)
|
close(10)
|
||||||
|
|
||||||
crcvd=0.
|
crcvd=0.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user