mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2026-07-27 04:24:18 -04:00
Make it possible to find MSK144 code-definition files in the "data_dir" on all platforms.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@6747 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
+3
-9
@@ -1,4 +1,4 @@
|
||||
subroutine fast_decode(id2,narg,line)
|
||||
subroutine fast_decode(id2,narg,line,pchk_file)
|
||||
|
||||
parameter (NMAX=30*12000)
|
||||
integer*2 id2(NMAX)
|
||||
@@ -9,15 +9,9 @@ subroutine fast_decode(id2,narg,line)
|
||||
logical pick
|
||||
character*6 cfile6
|
||||
character*80 line(100)
|
||||
character*80 pchk_file,gen_file
|
||||
character*512 pchk_file
|
||||
save npts
|
||||
|
||||
pchk_file=line(1)
|
||||
i=index(pchk_file,".pchk")
|
||||
gen_file=pchk_file(1:i-1)//".gen"
|
||||
! print*,pchk_file
|
||||
! print*,gen_file
|
||||
|
||||
nutc=narg(0)
|
||||
ndat0=narg(1)
|
||||
nsubmode=narg(2)
|
||||
@@ -39,7 +33,7 @@ subroutine fast_decode(id2,narg,line)
|
||||
call jtmsk_decode(id2,narg,line)
|
||||
go to 900
|
||||
else if(nmode.eq.104) then
|
||||
call msk144_decode(id2,ndat0,nutc,0,line)
|
||||
call msk144_decode(id2,ndat0,nutc,0,pchk_file,line)
|
||||
go to 900
|
||||
endif
|
||||
|
||||
|
||||
+4
-7
@@ -1,4 +1,4 @@
|
||||
subroutine genmsk144(msg0,ichk,msgsent,i4tone,itype)
|
||||
subroutine genmsk144(msg0,ichk,msgsent,i4tone,itype,pchk_file)
|
||||
|
||||
!!!!!!!!!!!!!!!!!! Experimental small blocklength ldpc version
|
||||
! s8 + 48bits + s8 + 80 bits = 144 bits (72ms message duration)
|
||||
@@ -22,7 +22,7 @@ subroutine genmsk144(msg0,ichk,msgsent,i4tone,itype)
|
||||
use iso_c_binding, only: c_loc,c_size_t
|
||||
use packjt
|
||||
use hashing
|
||||
character*85 pchk_file,gen_file
|
||||
character*512 pchk_file,gen_file
|
||||
character*22 msg0
|
||||
character*22 message !Message to be generated
|
||||
character*22 msgsent !Message as it will be received
|
||||
@@ -53,11 +53,8 @@ subroutine genmsk144(msg0,ichk,msgsent,i4tone,itype)
|
||||
if( first ) then
|
||||
first=.false.
|
||||
nsym=128
|
||||
!! Fix this
|
||||
! pchk_file="/Users/sfranke/Builds/wsjtx_install/peg-128-80-reg3.pchk"
|
||||
! gen_file="/Users/sfranke/Builds/wsjtx_install/peg-128-80-reg3.gen"
|
||||
pchk_file="./data/peg-128-80-reg3.pchk"
|
||||
gen_file="./data/peg-128-80-reg3.gen"
|
||||
i=index(pchk_file,".pchk")
|
||||
gen_file=pchk_file(1:i-1)//".gen"
|
||||
call init_ldpc(trim(pchk_file)//char(0),trim(gen_file)//char(0))
|
||||
pi=4.*atan(1.0)
|
||||
twopi=8.*atan(1.0)
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
subroutine msk144_decode(id2,npts,nutc,nprint,line)
|
||||
subroutine msk144_decode(id2,npts,nutc,nprint,pchk_file,line)
|
||||
|
||||
! Calls the experimental decoder for JTMSK 72ms ldpc messages
|
||||
|
||||
@@ -15,6 +15,7 @@ subroutine msk144_decode(id2,npts,nutc,nprint,line)
|
||||
complex cdat2(24000)
|
||||
character*22 msg,msg0 !Decoded message
|
||||
character*80 line(100) !Decodes passed back to caller
|
||||
character*512 pchk_file
|
||||
equivalence (hist,d)
|
||||
|
||||
nsnr0=-99
|
||||
@@ -58,7 +59,7 @@ subroutine msk144_decode(id2,npts,nutc,nprint,line)
|
||||
iz=ib-ia+1
|
||||
cdat2(1:iz)=c(ia:ib) !Select nlen complex samples
|
||||
t0=ia/12000.0
|
||||
call syncmsk144(cdat2,iz,msg,freq,nutc,t0)
|
||||
call syncmsk144(cdat2,iz,pchk_file,msg,freq,nutc,t0)
|
||||
if(msg(1:1).ne.' ') then
|
||||
if(msg.ne.msg0) then
|
||||
nline=nline+1
|
||||
|
||||
+5
-5
@@ -1,4 +1,5 @@
|
||||
subroutine syncmsk144(cdat,npts,msgreceived,fest,nutc,t0) !nutc and t0 are for debug output
|
||||
subroutine syncmsk144(cdat,npts,pchk_file,msgreceived,fest,nutc,t0)
|
||||
!nutc and t0 are for debug output
|
||||
use iso_c_binding, only: c_loc,c_size_t
|
||||
use packjt
|
||||
use hashing
|
||||
@@ -6,7 +7,7 @@ subroutine syncmsk144(cdat,npts,msgreceived,fest,nutc,t0) !nutc and t0 are for
|
||||
|
||||
parameter (NSPM=864)
|
||||
character*22 msgreceived
|
||||
character*85 pchk_file,gen_file
|
||||
character*512 pchk_file,gen_file
|
||||
complex cdat(npts) !Analytic signal
|
||||
complex cdat2(npts)
|
||||
complex c(NSPM)
|
||||
@@ -43,9 +44,8 @@ subroutine syncmsk144(cdat,npts,msgreceived,fest,nutc,t0) !nutc and t0 are for
|
||||
save first,cb,pi,twopi,dt,f0,f1
|
||||
|
||||
if(first) then
|
||||
! These files can be found in /lib/ldpc/jtmode_codes directory
|
||||
pchk_file="./data/peg-128-80-reg3.pchk"
|
||||
gen_file="./data/peg-128-80-reg3.gen"
|
||||
i=index(pchk_file,".pchk")
|
||||
gen_file=pchk_file(1:i-1)//".gen"
|
||||
call init_ldpc(trim(pchk_file)//char(0),trim(gen_file)//char(0))
|
||||
! define half-sine pulse and raised-cosine edge window
|
||||
pi=4d0*datan(1d0)
|
||||
|
||||
Reference in New Issue
Block a user