mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2025-06-24 22:25:17 -04:00
Various tweaks to test routines.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@7720 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
parent
38fdda4dc7
commit
1bf751f0d8
@ -2,7 +2,7 @@
|
|||||||
parameter (KK=87) !Information bits (75 + CRC12)
|
parameter (KK=87) !Information bits (75 + CRC12)
|
||||||
parameter (ND=58) !Data symbols
|
parameter (ND=58) !Data symbols
|
||||||
parameter (NS=21) !Sync symbols (3 @ Costas 7x7)
|
parameter (NS=21) !Sync symbols (3 @ Costas 7x7)
|
||||||
parameter (NN=NS+ND) !Total symbols (79)
|
parameter (NN=NS+ND) !Total channel symbols (79)
|
||||||
parameter (NSPS=2048) !Samples per symbol at 12000 S/s
|
parameter (NSPS=2048) !Samples per symbol at 12000 S/s
|
||||||
parameter (N7=7*NSPS) !Samples in Costas 7x7 array (14,336)
|
parameter (N7=7*NSPS) !Samples in Costas 7x7 array (14,336)
|
||||||
parameter (NZ=NSPS*NN) !Samples in full 15 s waveform (161,792)
|
parameter (NZ=NSPS*NN) !Samples in full 15 s waveform (161,792)
|
||||||
|
@ -51,7 +51,7 @@ program ft8d
|
|||||||
tstep=0.5*NSPS/12000.0
|
tstep=0.5*NSPS/12000.0
|
||||||
df=12000.0/NFFT1
|
df=12000.0/NFFT1
|
||||||
i0=nint(f1/df)
|
i0=nint(f1/df)
|
||||||
j0=nint((xdt+0.5)/tstep)
|
j0=nint(xdt/tstep)
|
||||||
fac=20.0/maxval(s)
|
fac=20.0/maxval(s)
|
||||||
s=fac*s
|
s=fac*s
|
||||||
|
|
||||||
@ -59,17 +59,18 @@ program ft8d
|
|||||||
ia=i0
|
ia=i0
|
||||||
ib=i0+14
|
ib=i0+14
|
||||||
do k=1,NN
|
do k=1,NN
|
||||||
n=j0+2*(k-1)+1
|
|
||||||
if(k.le.7) cycle
|
if(k.le.7) cycle
|
||||||
if(k.ge.37 .and. k.le.43) cycle
|
if(k.ge.37 .and. k.le.43) cycle
|
||||||
if(k.gt.72) cycle
|
if(k.gt.72) cycle
|
||||||
|
n=j0+2*(k-1)+1
|
||||||
|
if(n.lt.1) cycle
|
||||||
j=j+1
|
j=j+1
|
||||||
s1(0:7,j)=s(ia:ib:2,n)
|
s1(0:7,j)=s(ia:ib:2,n)
|
||||||
enddo
|
enddo
|
||||||
|
|
||||||
do j=1,ND
|
do j=1,ND
|
||||||
ps=s1(0:7,j)
|
ps=s1(0:7,j)
|
||||||
! ps=log(ps)
|
ps=log(ps)
|
||||||
r1=max(ps(1),ps(3),ps(5),ps(7))-max(ps(0),ps(2),ps(4),ps(6))
|
r1=max(ps(1),ps(3),ps(5),ps(7))-max(ps(0),ps(2),ps(4),ps(6))
|
||||||
r2=max(ps(2),ps(3),ps(6),ps(7))-max(ps(0),ps(1),ps(4),ps(5))
|
r2=max(ps(2),ps(3),ps(6),ps(7))-max(ps(0),ps(1),ps(4),ps(5))
|
||||||
r4=max(ps(4),ps(5),ps(6),ps(7))-max(ps(0),ps(1),ps(2),ps(3))
|
r4=max(ps(4),ps(5),ps(6),ps(7))-max(ps(0),ps(1),ps(2),ps(3))
|
||||||
@ -95,15 +96,12 @@ program ft8d
|
|||||||
message=' '
|
message=' '
|
||||||
if(ifer.eq.0) then
|
if(ifer.eq.0) then
|
||||||
call extractmessage174(decoded,message,ncrcflag,recent_calls,nrecent)
|
call extractmessage174(decoded,message,ncrcflag,recent_calls,nrecent)
|
||||||
nsnr=nint(xsnr)
|
|
||||||
nfdot=0
|
|
||||||
write(13,1110) datetime,0,nsnr,xdt,freq,message,nfdot
|
|
||||||
1110 format(a11,2i4,f6.2,f12.7,2x,a22,i3)
|
|
||||||
write(*,1112) datetime(8:11),nsnr,xdt,nint(f1),message
|
|
||||||
1112 format(a4,i4,f5.1,i6,2x,a22)
|
|
||||||
endif
|
endif
|
||||||
|
nsnr=nint(xsnr)
|
||||||
|
write(13,1110) datetime,0,nsnr,xdt,freq,message,nfdot
|
||||||
|
1110 format(a11,2i4,f6.2,f12.7,2x,a22,i3)
|
||||||
|
write(*,1112) datetime(8:11),nsnr,xdt,nint(f1),message
|
||||||
|
1112 format(a4,i4,f5.1,i6,2x,a22)
|
||||||
enddo ! ifile loop
|
enddo ! ifile loop
|
||||||
! write(*,1120)
|
|
||||||
!1120 format("<DecodeFinished>")
|
|
||||||
|
|
||||||
999 end program ft8d
|
999 end program ft8d
|
||||||
|
@ -53,7 +53,7 @@ program ft8sim
|
|||||||
|
|
||||||
phi=0.0
|
phi=0.0
|
||||||
c0=0.
|
c0=0.
|
||||||
k=-1 + nint((xdt+0.5)/dt) !Start audio at t=0.5 s
|
k=-1 + nint(xdt/dt)
|
||||||
do j=1,NN !Generate 8-FSK waveform from itone
|
do j=1,NN !Generate 8-FSK waveform from itone
|
||||||
dphi=twopi*(f0+itone(j)*baud)*dt
|
dphi=twopi*(f0+itone(j)*baud)*dt
|
||||||
if(k.eq.0) phi=-dphi
|
if(k.eq.0) phi=-dphi
|
||||||
|
@ -36,8 +36,6 @@ subroutine genft8(msg,msgsent,itone)
|
|||||||
1003 format(12b6.6,b3.3,b12.12)
|
1003 format(12b6.6,b3.3,b12.12)
|
||||||
read(cbits,1004) msgbits
|
read(cbits,1004) msgbits
|
||||||
1004 format(87i1)
|
1004 format(87i1)
|
||||||
print*,cbits
|
|
||||||
print*,icrc12
|
|
||||||
|
|
||||||
call encode174(msgbits,codeword) !Encode the test message
|
call encode174(msgbits,codeword) !Encode the test message
|
||||||
|
|
||||||
|
@ -2,17 +2,14 @@ subroutine sync8(iwave,xdt,f1,s)
|
|||||||
|
|
||||||
include 'ft8_params.f90'
|
include 'ft8_params.f90'
|
||||||
parameter (IZ=10,JZ=20)
|
parameter (IZ=10,JZ=20)
|
||||||
character*1 line(-JZ:JZ),mark(0:6)
|
|
||||||
complex cx(0:NH1)
|
complex cx(0:NH1)
|
||||||
real s(NH1,NHSYM)
|
real s(NH1,NHSYM)
|
||||||
real savg(NH1)
|
real savg(NH1)
|
||||||
real x(NFFT1)
|
real x(NFFT1)
|
||||||
real sync2d(-IZ:IZ,-JZ:JZ)
|
real sync2d(-IZ:IZ,-JZ:JZ)
|
||||||
integer*2 iwave(NMAX)
|
integer*2 iwave(NMAX)
|
||||||
integer iloc(1)
|
|
||||||
integer icos7(0:6)
|
integer icos7(0:6)
|
||||||
data icos7/2,5,6,0,4,1,3/ !Costas 7x7 tone pattern
|
data icos7/2,5,6,0,4,1,3/ !Costas 7x7 tone pattern
|
||||||
data mark/' ',' ','.','-','+','X','$'/
|
|
||||||
equivalence (x,cx)
|
equivalence (x,cx)
|
||||||
|
|
||||||
! Compute symbol spectra at half-symbol steps.
|
! Compute symbol spectra at half-symbol steps.
|
||||||
@ -50,7 +47,7 @@ subroutine sync8(iwave,xdt,f1,s)
|
|||||||
tmax=0.
|
tmax=0.
|
||||||
ipk=0
|
ipk=0
|
||||||
jpk=0
|
jpk=0
|
||||||
j0=1 + nint(0.5/tstep)
|
j0=1
|
||||||
do i=-IZ,IZ
|
do i=-IZ,IZ
|
||||||
do j=-JZ,JZ
|
do j=-JZ,JZ
|
||||||
t=0.
|
t=0.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user