mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-11-23 12:48:40 -05:00
Add more decoding parameters to jt9 command line program
Options have been added to control frequency cut off values, mode and, Tx mode. The comand line parser now has optional long option names and usage help. git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@4949 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
parent
566f9e01b6
commit
ff43a95498
@ -1,5 +1,7 @@
|
||||
subroutine fillcom(nutc0,ndepth0,nrxfreq)
|
||||
subroutine fillcom(nutc0,ndepth0,nrxfreq,mode,tx9,flow,fsplit,fhigh)
|
||||
character*20 datetime
|
||||
integer mode,flow,fsplit,fhigh
|
||||
logical tx9
|
||||
common/npar/nutc,ndiskdat,ntrperiod,nfqso,newdat,npts8,nfa,nfsplit,nfb, &
|
||||
ntol,kin,nzhsym,nsave,nagain,ndepth,ntxmode,nmode,datetime
|
||||
save
|
||||
@ -10,16 +12,24 @@ subroutine fillcom(nutc0,ndepth0,nrxfreq)
|
||||
nfqso=nrxfreq
|
||||
newdat=1
|
||||
npts8=74736
|
||||
nfa=200
|
||||
nfsplit=2700
|
||||
nfb=4007
|
||||
nfa=flow
|
||||
nfsplit=fsplit
|
||||
nfb=fhigh
|
||||
ntol=3
|
||||
kin=1024
|
||||
nzhsym=173
|
||||
nsave=0
|
||||
ndepth=ndepth0
|
||||
ntxmode=9
|
||||
nmode=9+65
|
||||
if (tx9) then
|
||||
ntxmode=9
|
||||
else
|
||||
ntxmode=65
|
||||
end if
|
||||
if (mode.lt.9) then
|
||||
nmode=65+9
|
||||
else
|
||||
nmode=mode
|
||||
end if
|
||||
datetime="2013-Apr-16 15:13"
|
||||
|
||||
return
|
||||
|
63
lib/jt9.f90
63
lib/jt9.f90
@ -16,9 +16,25 @@ program jt9
|
||||
character c
|
||||
character(len=500) optarg, infile
|
||||
character wisfile*80
|
||||
integer*4 arglen,stat,offset,remain
|
||||
logical :: shmem = .false., read_files = .false., have_args = .false.
|
||||
type (option) :: long_options (0)
|
||||
integer :: arglen,stat,offset,remain,mode=0,flow=200,fsplit=2700,fhigh=4007,nrxfreq=1500,ntrperiod=1,ndepth=1
|
||||
logical :: shmem = .false., read_files = .false., have_args = .false., tx9 = .false., display_help = .false.
|
||||
type (option) :: long_options(16) = [ &
|
||||
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=1', '<minutes>'), &
|
||||
option ('executable-path', .true., 'e', 'Location of subordinate executables (KVASD) default="."', '<path>'), &
|
||||
option ('data-path', .true., 'a', 'Location of writeable data files, detfault="."', '<path>'), &
|
||||
option ('temp-path', .true., 't', 'Temporary files path, default="."', '<path>'), &
|
||||
option ('lowest', .true., 'L', 'Lowest frequency decoded (JT65), default=200Hz', '<hertz>'), &
|
||||
option ('highest', .true., 'H', 'Highest frequency decoded, default=4007Hz', '<hertz>'), &
|
||||
option ('split', .true., 'S', 'Lowest JT9 frequency decoded, default=2700Hz', '<hertz>'), &
|
||||
option ('rx-frequency', .true., 'f', 'Receive frequency offset, default=1500', '<hertz>'), &
|
||||
option ('patience', .true., 'w', 'FFTW3 planing patience (0-4), default=1', '<patience>'), &
|
||||
option ('fft-threads', .true., 'm', 'Number of threads to process large FFTs, default=1', '<number>'), &
|
||||
option ('jt65', .false., '6', 'JT65 mode', ''), &
|
||||
option ('jt9', .false., '9', 'JT9 mode', ''), &
|
||||
option ('depth', .true., 'd', 'JT9 decoding depth (1-3), default=1', '<number>'), &
|
||||
option ('tx-jt9', .false., 'T', 'Tx mode is JT9, default=JT65', '') ]
|
||||
common/jt9com/ss(184,NSMAX),savg(NSMAX),id2(NMAX),nutc,ndiskdat,ntr, &
|
||||
mousefqso,newdat,nfa,nfsplit,nfb,ntol,kin,nzhsym,nsynced,ndecoded
|
||||
common/tracer/limtrace,lu
|
||||
@ -26,13 +42,16 @@ program jt9
|
||||
data npatience/1/,nthreads/1/
|
||||
|
||||
do
|
||||
call getopt('s:e:a:r:m:p:d:f:w:t:',long_options,c,optarg,arglen,stat, &
|
||||
call getopt('hs:e:a:r:m:p:d:f:w:t:96TL:S:H:',long_options,c,optarg,arglen,stat, &
|
||||
offset,remain)
|
||||
if (stat .ne. 0) then
|
||||
exit
|
||||
end if
|
||||
have_args = .true.
|
||||
select case (c)
|
||||
case ('h')
|
||||
display_help = .true.
|
||||
|
||||
case ('s')
|
||||
shmem = .true.
|
||||
shm_key = optarg(:arglen)
|
||||
@ -61,20 +80,48 @@ program jt9
|
||||
read_files = .true.
|
||||
read (optarg(:arglen), *) nrxfreq
|
||||
|
||||
case ('L')
|
||||
read_files = .true.
|
||||
read (optarg(:arglen), *) flow
|
||||
|
||||
case ('S')
|
||||
read_files = .true.
|
||||
read (optarg(:arglen), *) fsplit
|
||||
|
||||
case ('H')
|
||||
read_files = .true.
|
||||
read (optarg(:arglen), *) fhigh
|
||||
|
||||
case ('6')
|
||||
read_files = .true.
|
||||
if (mode.lt.65) mode = mode + 65
|
||||
|
||||
case ('9')
|
||||
read_files = .true.
|
||||
if (mode.lt.9.or.mode.eq.65) mode = mode + 9
|
||||
|
||||
case ('T')
|
||||
read_files = .true.
|
||||
tx9 = .true.
|
||||
|
||||
case ('w')
|
||||
read (optarg(:arglen), *) npatience
|
||||
|
||||
end select
|
||||
end do
|
||||
|
||||
if (.not. have_args .or. (stat .lt. 0 .or. (shmem .and. remain .gt. 0) &
|
||||
if (display_help .or. .not. have_args .or. (stat .lt. 0 .or. (shmem .and. remain .gt. 0) &
|
||||
.or. (read_files .and. remain .eq. 0) .or. &
|
||||
(shmem .and. read_files))) then
|
||||
print*,'Usage: jt9 -p TRperiod [-d ndepth] [-f rxfreq] {-w patience] [-e exe_dir] [-m nthreads] file1 [file2 ...]'
|
||||
print*,'Usage: jt9 -p <per> OPTIONS file1 [file2 ...]'
|
||||
print*,' Reads data from *.wav files.'
|
||||
print*,''
|
||||
print*,' jt9 -s <key> [-w patience] [-m nthreads] -e exe_dir -a data_dir -t temp_dir'
|
||||
print*,' jt9 -s <key> [-w n] [-m n] [-e path] [-a path] [-t path]'
|
||||
print*,' Gets data from shared memory region with key==<key>'
|
||||
do i = 1, size (long_options)
|
||||
print*,''
|
||||
call long_options(i) % print (6)
|
||||
end do
|
||||
go to 999
|
||||
endif
|
||||
|
||||
@ -152,7 +199,7 @@ program jt9
|
||||
enddo
|
||||
|
||||
10 close(10)
|
||||
call fillcom(nutc0,ndepth,nrxfreq)
|
||||
call fillcom(nutc0,ndepth,nrxfreq,mode,tx9,flow,fsplit,fhigh)
|
||||
call decoder(ss,id2)
|
||||
enddo
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user