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

@ -13,9 +13,9 @@ subroutine genmsk(msg28,iwave,nwave)
real*8 dt,phi,f,f0,dfgen,dphi,twopi,foffset,samfac real*8 dt,phi,f,f0,dfgen,dphi,twopi,foffset,samfac
integer np(9) integer np(9)
data np/5,7,9,11,13,17,19,23,29/ !Permissible message lengths data np/5,7,9,11,13,17,19,23,29/ !Permissible message lengths
! 1 2 3 4 5 6 ! 1 2 3 4 5 6
! 0123456789012345678901234567890123456789012345678901234567890123 ! 0123456789012345678901234567890123456789012345678901234567890123
data cc/'0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ./?- _ @'/ data cc/'0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ./?- _ @'/
!### !###
samfac=1.d0 samfac=1.d0
@ -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

@ -7,9 +7,9 @@ subroutine setupmsk(cw,cwb)
integer nb(7) integer nb(7)
! real*8 twopi,dt,f0,f1 ! real*8 twopi,dt,f0,f1
character cc*64 character cc*64
! 1 2 3 4 5 6 ! 1 2 3 4 5 6
! 0123456789012345678901234567890123456789012345678901234567890123 ! 0123456789012345678901234567890123456789012345678901234567890123
data cc/'0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ./?- _ @'/ data cc/'0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ./?- _ @'/
nsps=24 nsps=24
twopi=8.d0*atan(1.d0) twopi=8.d0*atan(1.d0)
@ -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