mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-11-15 08:31:57 -05:00
Fix msk144sim - thanks Joe.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@6797 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
parent
969efaca14
commit
d1ad5c63a3
@ -169,6 +169,8 @@ subroutine detectmsk144(cbig,n,pchk_file,lines,nmessages,nutc)
|
|||||||
|
|
||||||
do ip=1,ndet !run through the candidates and try to sync/demod/decode
|
do ip=1,ndet !run through the candidates and try to sync/demod/decode
|
||||||
imid=times(ip)*fs
|
imid=times(ip)*fs
|
||||||
|
if( imid .lt. NPTS/2 ) imid=NPTS/2
|
||||||
|
if( imid .gt. n-NPTS/2 ) imid=n-NPTS/2
|
||||||
t0=times(ip)
|
t0=times(ip)
|
||||||
cdat=cbig(imid-NPTS/2+1:imid+NPTS/2)
|
cdat=cbig(imid-NPTS/2+1:imid+NPTS/2)
|
||||||
ferr=ferrs(ip)
|
ferr=ferrs(ip)
|
||||||
|
@ -3,7 +3,7 @@ program msk144sim
|
|||||||
use wavhdr
|
use wavhdr
|
||||||
parameter (NMAX=15*12000)
|
parameter (NMAX=15*12000)
|
||||||
real pings(0:NMAX-1)
|
real pings(0:NMAX-1)
|
||||||
real waveform(0:864-1)
|
real waveform(0:NMAX-1)
|
||||||
character arg*8,msg*22,msgsent*22,fname*40
|
character arg*8,msg*22,msgsent*22,fname*40
|
||||||
character*512 pchk_file
|
character*512 pchk_file
|
||||||
character*3 rpt(0:7)
|
character*3 rpt(0:7)
|
||||||
@ -12,8 +12,6 @@ program msk144sim
|
|||||||
type(hdr) h !Header for .wav file
|
type(hdr) h !Header for .wav file
|
||||||
integer*2 iwave(0:NMAX-1)
|
integer*2 iwave(0:NMAX-1)
|
||||||
integer itone(144) !Message bits
|
integer itone(144) !Message bits
|
||||||
integer b11(11) !Barker-11 code
|
|
||||||
data b11/1,1,1,0,0,0,1,0,0,1,0/
|
|
||||||
data rpt /'26 ','27 ','28 ','R26','R27','R28','RRR','73 '/
|
data rpt /'26 ','27 ','28 ','R26','R27','R28','RRR','73 '/
|
||||||
|
|
||||||
pchk_file='./peg-128-80-reg3.pchk'
|
pchk_file='./peg-128-80-reg3.pchk'
|
||||||
@ -47,16 +45,20 @@ program msk144sim
|
|||||||
dphi1=twopi*(freq+500)/12000.0
|
dphi1=twopi*(freq+500)/12000.0
|
||||||
phi=0.0
|
phi=0.0
|
||||||
indx=0
|
indx=0
|
||||||
do i=1,144
|
nreps=NMAX/(144*6)
|
||||||
if( itone(i) .eq. 0 ) then
|
do jrep=1,nreps
|
||||||
dphi=dphi0
|
do i=1,144
|
||||||
else
|
jj=mod(i,864)
|
||||||
dphi=dphi1
|
if( itone(i) .eq. 0 ) then
|
||||||
endif
|
dphi=dphi0
|
||||||
do j=1,6
|
else
|
||||||
waveform(indx)=cos(phi);
|
dphi=dphi1
|
||||||
indx=indx+1
|
endif
|
||||||
phi=mod(phi+dphi,twopi)
|
do j=1,6
|
||||||
|
waveform(indx)=cos(phi);
|
||||||
|
indx=indx+1
|
||||||
|
phi=mod(phi+dphi,twopi)
|
||||||
|
enddo
|
||||||
enddo
|
enddo
|
||||||
enddo
|
enddo
|
||||||
|
|
||||||
@ -73,12 +75,12 @@ program msk144sim
|
|||||||
1002 format('000000_',i6.6)
|
1002 format('000000_',i6.6)
|
||||||
open(10,file=fname(1:13)//'.wav',access='stream',status='unknown')
|
open(10,file=fname(1:13)//'.wav',access='stream',status='unknown')
|
||||||
|
|
||||||
|
wave=0.0
|
||||||
|
iwave=0
|
||||||
fac=sqrt(6000.0/2500.0)
|
fac=sqrt(6000.0/2500.0)
|
||||||
j=-1
|
|
||||||
do i=0,NMAX-1
|
do i=0,NMAX-1
|
||||||
j=mod(j+1,864)
|
|
||||||
xx=gran()
|
xx=gran()
|
||||||
wave(i)=pings(i)*waveform(j) + fac*xx
|
wave(i)=pings(i)*waveform(i) + fac*xx
|
||||||
iwave(i)=30.0*wave(i)
|
iwave(i)=30.0*wave(i)
|
||||||
enddo
|
enddo
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user