summaryrefslogtreecommitdiff
path: root/lib/jt65sim.f90
diff options
context:
space:
mode:
authorChristoph Berg <myon@debian.org>2020-05-11 22:17:58 +0200
committerChristoph Berg <myon@debian.org>2020-05-11 22:17:58 +0200
commit32a41b1abe1a4aab0892c9c2051be6ba5b379f1e (patch)
treec6e107c1ee4d70610e43a7912e57c720334a08c7 /lib/jt65sim.f90
parent08299e8b2bf50ba90daf570f57def529dd29d6e7 (diff)
New upstream version 2.2.0~rc1+repackupstream/2.2.0_rc1+repack
Diffstat (limited to 'lib/jt65sim.f90')
-rw-r--r--lib/jt65sim.f9020
1 files changed, 9 insertions, 11 deletions
diff --git a/lib/jt65sim.f90 b/lib/jt65sim.f90
index 6f7030cf..623a0fca 100644
--- a/lib/jt65sim.f90
+++ b/lib/jt65sim.f90
@@ -169,23 +169,19 @@ program jt65sim
if(csubmode.eq.'B' .and. snrdb.eq.0.0) xsnr=-21 - isig
if(csubmode.eq.'C' .and. snrdb.eq.0.0) xsnr=-21 - isig
-!###
-! call1="K1ABC"
-! ic3=65+mod(isig-1,26)
-! ic2=65+mod((isig-1)/26,26)
-! ic1=65
-! call2="W9"//char(ic1)//char(ic2)//char(ic3)
-! write(msg,1010) call1,call2,nint(xsnr)
-!1010 format(a5,1x,a5,1x,i3.2)
-!###
call packmsg(msg,dgen,itype) !Pack message into 12 six-bit bytes
call rs_encode(dgen,sent) !Encode using RS(63,12)
call interleave63(sent,1) !Interleave channel symbols
call graycode65(sent,63,1) !Apply Gray code
+ nprc_test=0
+ i1=len(trim(msg))
+ if(i1.gt.10) then
+ if(msg(i1-3:i1).eq.' OOO') nprc_test=1
+ endif
k=0
do j=1,nsym !Insert sync and data into itone()
- if(nprc(j).eq.0) then
+ if(nprc(j).eq.nprc_test) then
k=k+1
itone(j)=sent(k)+2
else
@@ -200,9 +196,11 @@ program jt65sim
if(msg(1:2).eq.'73') nshorthand=4
if(nshorthand.gt.0) then
ntoggle=0
- do i=1,nsym,2
+ do i=1,nsym,4
itone(i)=ntoggle*10*nshorthand
if(i+1.le.126) itone(i+1)=ntoggle*10*nshorthand
+ if(i+2.le.126) itone(i+2)=ntoggle*10*nshorthand
+ if(i+3.le.126) itone(i+3)=ntoggle*10*nshorthand
ntoggle=mod(ntoggle+1,2)
enddo
endif