From 2cb70ed6b7a3cc812fd6756bffcfcf06b8748e9c Mon Sep 17 00:00:00 2001 From: Steven Franke Date: Thu, 1 Sep 2016 15:16:11 +0000 Subject: [PATCH] Fix up simulators. No changes to WSJT-X. git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@7049 ab8295b8-cf94-4d9e-aec4-7959e3be5d79 --- lib/ldpcsim144.f90 | 10 +++++----- lib/ldpcsim40.f90 | 9 +++++---- 2 files changed, 10 insertions(+), 9 deletions(-) diff --git a/lib/ldpcsim144.f90 b/lib/ldpcsim144.f90 index ccdf226ae..cc9ecf059 100644 --- a/lib/ldpcsim144.f90 +++ b/lib/ldpcsim144.f90 @@ -15,8 +15,8 @@ integer*1 msgbits(80) integer*1 bitseq(144) integer*4 i4Msg6BitWords(13) integer ihash -real*8, allocatable :: lratio(:), rxdata(:), llr(:) -real, allocatable :: yy(:) +real*8, allocatable :: lratio(:), rxdata(:) +real, allocatable :: yy(:), llr(:) equivalence(ihash,i1hash) nargs=iargc() @@ -93,7 +93,7 @@ msg="K9AN K1JT EN50" call encode_msk144(msgbits,codeword) call init_random_seed() -write(*,*) "Eb/N0 ngood nundetected nbadhash" +write(*,*) "Eb/N0 SNR2500 ngood nundetected nbadhash" do idb = -6, 14 db=idb/2.0-1.0 sigma=1/sqrt( 2*rate*(10**(db/10.0)) ) @@ -154,8 +154,8 @@ do idb = -6, 14 endif endif enddo - - write(*,"(f4.1,1x,i8,1x,i8,1x,i8,1x,f5.2)") db,ngood,nue,nbadhash,ss + snr2500=db-4.0 + write(*,"(f4.1,4x,f5.1,1x,i8,1x,i8,1x,i8,1x,f5.2)") db,snr2500,ngood,nue,nbadhash,ss enddo diff --git a/lib/ldpcsim40.f90 b/lib/ldpcsim40.f90 index db836125c..96a6ff767 100644 --- a/lib/ldpcsim40.f90 +++ b/lib/ldpcsim40.f90 @@ -9,7 +9,8 @@ character*80 prefix character*85 pchk_file,gen_file character*8 arg integer*1, allocatable :: codeword(:), decoded(:), message(:) -real*8, allocatable :: lratio(:), rxdata(:), llr(:) +real*8, allocatable :: lratio(:), rxdata(:) +real, allocatable :: llr(:) integer ihash integer*1 hardbits(32) @@ -64,9 +65,8 @@ call encode_msk40(message,codeword) write(*,'(32i1)') codeword call init_random_seed() -write(*,*) "Eb/N0 ngood nundetected nbadhash" +write(*,*) "Eb/N0 SNR2500 ngood nundetected nbadhash" do idb = -6, 14 -!do idb = 14, 14 db=idb/2.0-1.0 sigma=1/sqrt( 2*rate*(10**(db/10.0)) ) ngood=0 @@ -138,7 +138,8 @@ do idb = -6, 14 endif enddo avits=real(itsum)/real(ngood+0.1) - write(*,"(f4.1,1x,i8,1x,i8,1x,i8,1x,f8.2,1x,f8.1)") db,ngood,nue,nbadhash,ss,avits + snr2500=db-10.0 + write(*,"(f4.1,4x,f5.1,1x,i8,1x,i8,1x,i8,1x,f8.2,1x,f8.1)") db,snr2500,ngood,nue,nbadhash,ss,avits enddo