From 308d815fb590e6223daedeebac65d6b339c18cf2 Mon Sep 17 00:00:00 2001 From: Bill Somerville Date: Fri, 23 Oct 2020 03:24:19 +0100 Subject: [PATCH] Add --freq-tolerance (-F) jt9 option --- lib/jt9.f90 | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/lib/jt9.f90 b/lib/jt9.f90 index a08a20cb2..6b4368740 100644 --- a/lib/jt9.f90 +++ b/lib/jt9.f90 @@ -26,10 +26,10 @@ program jt9 fhigh=4000,nrxfreq=1500,ndepth=1,nexp_decode=0,nQSOProg=0 logical :: read_files = .true., tx9 = .false., display_help = .false., & bLowSidelobes = .false. - type (option) :: long_options(29) = [ & + type (option) :: long_options(30) = [ & option ('help', .false., 'h', 'Display this help message', ''), & option ('shmem',.true.,'s','Use shared memory for sample data','KEY'), & - option ('tr-period', .true., 'p', 'Tx/Rx period, default SECONDS=60', & + option ('tr-period', .true., 'p', 'Tx/Rx period, default SECONDS=60', & 'SECONDS'), & option ('executable-path', .true., 'e', & 'Location of subordinate executables (KVASD) default PATH="."', & @@ -46,6 +46,8 @@ program jt9 'Lowest JT9 frequency decoded, default HERTZ=2700', 'HERTZ'), & option ('rx-frequency', .true., 'f', & 'Receive frequency offset, default HERTZ=1500', 'HERTZ'), & + option ('freq-tolerance', .true., 'F', & + 'Receive frequency tolerance, default HERTZ=20', 'HERTZ'), & option ('patience', .true., 'w', & 'FFTW3 planing patience (0-4), default PATIENCE=1', 'PATIENCE'), & option ('fft-threads', .true., 'm', & @@ -54,8 +56,8 @@ program jt9 option ('jt4', .false., '4', 'JT4 mode', ''), & option ('ft4', .false., '5', 'FT4 mode', ''), & option ('jt65', .false.,'6', 'JT65 mode', ''), & - option ('fst4', .false., '7', 'FST4 mode', ''), & - option ('fst4w', .false., 'W', 'FST4W mode', ''), & + option ('fst4', .false., '7', 'FST4 mode', ''), & + option ('fst4w', .false., 'W', 'FST4W mode', ''), & option ('ft8', .false., '8', 'FT8 mode', ''), & option ('jt9', .false., '9', 'JT9 mode', ''), & option ('qra64', .false., 'q', 'QRA64 mode', ''), & @@ -83,10 +85,11 @@ program jt9 iwspr=0 nsubmode = 0 + ntol = 20 TRperiod=60.d0 do - call getopt('hs:e:a:b:r:m:p:d:f:w:t:987654WqTL:S:H:c:G:x:g:X:Q:', & + call getopt('hs:e:a:b:r:m:p:d:f:F:w:t:987654WqTL:S:H:c:G:x:g:X:Q:', & long_options,c,optarg,arglen,stat,offset,remain,.true.) if (stat .ne. 0) then exit @@ -113,6 +116,8 @@ program jt9 read (optarg(:arglen), *) ndepth case ('f') read (optarg(:arglen), *) nrxfreq + case ('F') + read (optarg(:arglen), *) ntol case ('L') read (optarg(:arglen), *) flow case ('S') @@ -195,6 +200,13 @@ program jt9 go to 999 endif + if (mode .eq. 241) then + ntol = min (ntol, 100) + else if (mode .eq. 74) then + ntol = 20 + else + ntol = min (ntol, 1000) + end if allocate(shared_data) nflatten=0 do iarg = offset + 1, offset + remain @@ -258,7 +270,7 @@ program jt9 shared_data%params%nfa=flow shared_data%params%nfsplit=fsplit shared_data%params%nfb=fhigh - shared_data%params%ntol=20 + shared_data%params%ntol=ntol shared_data%params%kin=64800 if(mode.eq.240) shared_data%params%kin=720000 !### 60 s periods ### shared_data%params%nzhsym=nhsym