Further work on code comparisons.

git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@6452 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
Steven Franke 2016-01-31 16:11:50 +00:00
parent 5d6a502a87
commit 541168cb15

View File

@ -8,7 +8,7 @@ program JTMSKfer
use iso_c_binding, only: c_loc,c_size_t
use hashing
use packjt
character msg*22,decoded*22,msgtype*13
character msg*22,decoded*22
integer*4 i4tone(234) !Channel symbols (values 0-1)
integer*1 e1(201)
integer*4 r1(201)
@ -18,7 +18,6 @@ program JTMSKfer
integer*1 i1hash(4)
integer*4 i4Msg6BitWords(12) !72-bit message as 6-bit words
character*72 c72
! real*8 twopi,dt,f0,f1,f,phi,dphi
real xp(29)
equivalence (ihash,i1hash)
data xp/0.500000, 0.401241, 0.309897, 0.231832, 0.168095, &
@ -27,7 +26,6 @@ program JTMSKfer
0.002481, 0.001710, 0.001052, 0.000789, 0.000469, &
0.000329, 0.000225, 0.000187, 0.000086, 0.000063, &
0.000017, 0.000091, 0.000032, 0.000045/
include 'testmsg.f90'
nmsg=1
@ -50,26 +48,13 @@ program JTMSKfer
mettab(256-i,1)=mettab(i,0)
enddo
rdscale=2.0 ! empirically optiized
rdscale=2.0 ! empirically optimized
ntrials=1000000
rate=72.0/198.0
msg="123"
! call sgran()
do idb=0,10
db=idb/2.0-0.5 ! Eb/N0=1/(2*R*sigma^2), so sigma= sqrt( 1/(2*R*Eb/N0) )
sigma=1/sqrt( 2*rate*(10**(db/10.0)) )
call fmtmsg(msg,iz) !To upper case, collapse multiple blanks
ichk=0
call genmsk(msg,ichk,decoded,i4tone,itype) !Encode message into tone #s
msgtype=""
if(itype.eq.1) msgtype="Std Msg"
if(itype.eq.2) msgtype="Type 1 prefix"
if(itype.eq.3) msgtype="Type 1 suffix"
if(itype.eq.4) msgtype="Type 2 prefix"
if(itype.eq.5) msgtype="Type 2 suffix"
if(itype.eq.6) msgtype="Free text"
! Extract the data symbols, skipping over sync and parity bits
n1=35
@ -80,6 +65,12 @@ program JTMSKfer
r1(n1+1:n1+n2)=i4tone(23+n1+1:23+n1+n2)
r1(n1+n2+1:n1+n2+n3)=i4tone(35+n1+n2+1:35+n1+n2+n3)
! call sgran()
do idb=0,11
db=idb/2.0-0.5 ! Eb/N0=1/(2*R*sigma^2), so sigma= sqrt( 1/(2*R*Eb/N0) )
sigma=1/sqrt( 2*rate*(10**(db/10.0)) )
ngood=0 ! decoded = msg
ngoodhash=0 ! will include undetected errors plus actual good ones
@ -125,4 +116,4 @@ program JTMSKfer
write(*,1023) db,sigma,ntrials,ngood,ngoodhash-ngood
1023 format("db:",f6.2," sigma:",f6.2," ntot:",i8," good:",i8," undet:",i8)
enddo
999 end program JTMSKfer
end program JTMSKfer