Change from even to odd parity. Code for <space> is now 1011000.

git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/jtms3@2525 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
Joe Taylor 2012-07-18 20:13:58 +00:00
parent 4e539e4ab0
commit bcb97a148a
3 changed files with 13 additions and 11 deletions

View File

@ -18,7 +18,7 @@ subroutine decodemsk(cdat,npts,cw,i1,nchar,s2,msg)
smax=0. smax=0.
do k=0,40 do k=0,40
kk=k kk=k
if(k.eq.40) kk=57 if(k.eq.40) kk=44
z=0. z=0.
do i=1,168 do i=1,168
z=z + cdat(ia+i)*conjg(cw(i,kk)) z=z + cdat(ia+i)*conjg(cw(i,kk))
@ -32,7 +32,7 @@ subroutine decodemsk(cdat,npts,cw,i1,nchar,s2,msg)
endif endif
enddo enddo
msg(j:j)=cc(kpk+1:kpk+1) msg(j:j)=cc(kpk+1:kpk+1)
if(kpk.eq.57) msg(j:j)=' ' if(kpk.eq.44) msg(j:j)=' '
enddo enddo
return return

View File

@ -35,12 +35,14 @@ subroutine genmsk(msg28,iwave,nwave)
i=8 i=8
2 msglen=np(i) 2 msglen=np(i)
! Convert message to a bit sequence, 7 bits per character (6 + even parity) ! Convert message to a bit sequence, 7 bits per character (6 + odd parity)
! Use odd parity because then code 44 (from a 0-63 range) is the 7-bit
! Barker code.
3 sent=0 3 sent=0
k=0 k=0
do j=1,msglen do j=1,msglen
if(msg(j:j).eq.' ') then if(msg(j:j).eq.' ') then
i=58 i=1 + 44
go to 5 go to 5
else else
do i=1,64 do i=1,64
@ -54,7 +56,7 @@ subroutine genmsk(msg28,iwave,nwave)
m=m+sent(k) m=m+sent(k)
enddo enddo
k=k+1 k=k+1
sent(k)=iand(m,1) !Insert parity bit sent(k) = 1 - iand(m,1) !Insert odd parity bit
enddo enddo
nsym=k nsym=k

View File

@ -28,7 +28,7 @@ subroutine setupmsk(cw,cwb)
m=m+nb(k) m=m+nb(k)
enddo enddo
k=k+1 k=k+1
nb(k)=iand(m,1) !Insert parity bit nb(k) = 1 - iand(m,1) !Insert odd parity bit
phi=0. phi=0.
j=0 j=0
@ -45,7 +45,7 @@ subroutine setupmsk(cw,cwb)
enddo enddo
enddo enddo
enddo enddo
cwb=cw(1:168,57) cwb=cw(1:168,44)
return return
end subroutine setupmsk end subroutine setupmsk