Use 15 30 60 120 300 rather than A B C D E for sequence length in FST280sim.

This commit is contained in:
Joe Taylor 2020-06-19 09:28:55 -04:00
parent d64e266e8f
commit 8933e43fb3

View File

@ -8,7 +8,6 @@ program fst280sim
type(hdr) h !Header for .wav file type(hdr) h !Header for .wav file
character arg*12,fname*17 character arg*12,fname*17
character msg37*37,msgsent37*37,c77*77 character msg37*37,msgsent37*37,c77*77
character tr_designator*1
complex, allocatable :: c0(:) complex, allocatable :: c0(:)
complex, allocatable :: c(:) complex, allocatable :: c(:)
real, allocatable :: wave(:) real, allocatable :: wave(:)
@ -21,18 +20,13 @@ program fst280sim
nargs=iargc() nargs=iargc()
if(nargs.ne.9) then if(nargs.ne.9) then
print*,'Need 9 arguments, got ',nargs print*,'Need 9 arguments, got ',nargs
print*,'Usage: fst280sim "message" type f0 DT h fdop del nfiles snr' print*,'Usage: fst280sim "message" TRsec f0 DT h fdop del nfiles snr'
print*,'Examples: fst280sim "K1JT K9AN EN50" C 1500 0.0 1 0.1 1.0 10 -15' print*,'Examples: fst280sim "K1JT K9AN EN50" 60 1500 0.0 1 0.1 1.0 10 -15'
print*,'A: 15 sec'
print*,'B: 30 sec'
print*,'C: 1 min'
print*,'D: 2 min'
print*,'E: 5 min'
go to 999 go to 999
endif endif
call getarg(1,msg37) !Message to be transmitted call getarg(1,msg37) !Message to be transmitted
call getarg(2,arg) call getarg(2,arg)
read(arg,*) tr_designator !TR selector read(arg,*) nsec !TR sequence length, seconds
call getarg(3,arg) call getarg(3,arg)
read(arg,*) f0 !Frequency (only used for single-signal) read(arg,*) f0 !Frequency (only used for single-signal)
call getarg(4,arg) call getarg(4,arg)
@ -53,23 +47,17 @@ program fst280sim
fs=12000.0 !Sample rate (Hz) fs=12000.0 !Sample rate (Hz)
dt=1.0/fs !Sample interval (s) dt=1.0/fs !Sample interval (s)
baud=1.0/tt !Keying rate (baud) baud=1.0/tt !Keying rate (baud)
select case (tr_designator) nsps=0
case('A') if(nsec.eq.15) nsps=800
nsps=800 if(nsec.eq.30) nsps=1680
nmax=15*12000 if(nsec.eq.60) nsps=4000
case('B') if(nsec.eq.120) nsps=8400
nsps=1680 if(nsec.eq.300) nsps=21504
nmax=30*12000 if(nsps.eq.0) then
case('C') print*,'Invalid TR sequence length.'
nsps=4000 go to 999
nmax=60*12000 endif
case('D') nmax=nsec*12000
nsps=8400
nmax=120*12000
case('E')
nsps=21504
nmax=300*12000
end select
nz=nsps*NN nz=nsps*NN
nz2=nsps*NN2 nz2=nsps*NN2
txt=nz2*dt !Transmission length (s) txt=nz2*dt !Transmission length (s)