mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-11-12 07:06:17 -05:00
Add frequency drift (Hz/min) option to jt65sim.
This commit is contained in:
parent
6bb1e6ac22
commit
42d68ff84e
@ -21,12 +21,13 @@ program jt65sim
|
||||
character msg*22,fname*11,csubmode*1,c,optarg*500,numbuf*32
|
||||
! character call1*5,call2*5
|
||||
logical :: display_help=.false.,seed_prngs=.true.
|
||||
type (option) :: long_options(12) = [ &
|
||||
type (option) :: long_options(13) = [ &
|
||||
option ('help',.false.,'h','Display this help message',''), &
|
||||
option ('sub-mode',.true.,'m','sub mode, default MODE=A','MODE'), &
|
||||
option ('num-sigs',.true.,'n','number of signals per file, default SIGNALS=10','SIGNALS'), &
|
||||
option ('f0',.true.,'F','base frequency offset, default F0=1500.0','F0'), &
|
||||
option ('doppler-spread',.true.,'d','Doppler spread, default SPREAD=0.0','SPREAD'), &
|
||||
option ('drift per min',.true.,'D','Frequency drift (Hz/min), default DRIFT=0.0','DRIFT'), &
|
||||
option ('time-offset',.true.,'t','Time delta, default SECONDS=0.0','SECONDS'), &
|
||||
option ('num-files',.true.,'f','Number of files to generate, default FILES=1','FILES'), &
|
||||
option ('no-prng-seed',.false.,'p','Do not seed PRNGs (use for reproducible tests)',''), &
|
||||
@ -50,6 +51,7 @@ program jt65sim
|
||||
nsigs=10
|
||||
bf0=1500.
|
||||
fspread=0.
|
||||
drift=0.
|
||||
xdt=0.
|
||||
snrdb=0.
|
||||
nfiles=1
|
||||
@ -58,7 +60,7 @@ program jt65sim
|
||||
msg="K1ABC W9XYZ EN37"
|
||||
|
||||
do
|
||||
call getopt('hm:n:F:d:t:f:ps:SG:M:',long_options,c,optarg,narglen,nstat,noffset,nremain,.true.)
|
||||
call getopt('hm:n:F:d:D:t:f:ps:SG:M:',long_options,c,optarg,narglen,nstat,noffset,nremain,.true.)
|
||||
if( nstat .ne. 0 ) then
|
||||
exit
|
||||
end if
|
||||
@ -76,6 +78,8 @@ program jt65sim
|
||||
read (optarg(:narglen), *,err=10) bf0
|
||||
case ('d')
|
||||
read (optarg(:narglen), *,err=10) fspread
|
||||
case ('D')
|
||||
read (optarg(:narglen), *,err=10) drift
|
||||
case ('t')
|
||||
read (optarg(:narglen), *) numbuf
|
||||
if (numbuf(1:1) == '\') then !'\'
|
||||
@ -217,11 +221,8 @@ program jt65sim
|
||||
do i=1,npts !Add this signal into cdat()
|
||||
isym=floor(i/sps)+1
|
||||
if(isym.gt.nsym) exit
|
||||
if(isym.ne.isym0) then
|
||||
freq=f0 + itone(isym)*baud*mode65
|
||||
dphi=twopi*freq*dt
|
||||
isym0=isym
|
||||
endif
|
||||
freq=f0 + (drift/60.0)*(i-npts/2)*dt + itone(isym)*baud*mode65
|
||||
dphi=twopi*freq*dt
|
||||
phi=phi + dphi
|
||||
if(phi.gt.twopi) phi=phi-twopi
|
||||
xphi=phi
|
||||
|
Loading…
Reference in New Issue
Block a user