mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-11-25 21:58:38 -05:00
Generate experimental shorthand messages in JTMSK mode. No decoder yet.
git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@6400 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
parent
8909ea5637
commit
1d6737ee8e
@ -330,6 +330,7 @@ set (wsjt_FSRCS
|
||||
lib/gen9.f90
|
||||
lib/geniscat.f90
|
||||
lib/genmsk.f90
|
||||
lib/genmsk_short.f90
|
||||
lib/genwspr.f90
|
||||
lib/geodist.f90
|
||||
lib/getlags.f90
|
||||
|
@ -50,6 +50,13 @@ subroutine genmsk(msg0,ichk,msgsent,i4tone,itype)
|
||||
message=message(i+1:)
|
||||
enddo
|
||||
|
||||
if(message(1:1).eq.'<') then
|
||||
call genmsk_short(message,msgsent,i4tone,itype)
|
||||
if(itype.lt.0) go to 999
|
||||
itone(38)=-37
|
||||
go to 900
|
||||
endif
|
||||
|
||||
call packmsg(message,i4Msg6BitWords,itype) !Pack into 12 6-bit bytes
|
||||
call unpackmsg(i4Msg6BitWords,msgsent) !Unpack to get msgsent
|
||||
if(ichk.ne.0) go to 999
|
||||
@ -93,7 +100,7 @@ subroutine genmsk(msg0,ichk,msgsent,i4tone,itype)
|
||||
if(mod(nn3,2).eq.0) i4tone(36+n1+n2+n3)=1 !1 parity bit
|
||||
endif
|
||||
|
||||
n=count(i4tone.eq.0)
|
||||
900 n=count(i4tone.eq.0)
|
||||
if(mod(n,2).ne.0) stop 'Parity error in genmsk.'
|
||||
|
||||
999 return
|
||||
|
45
lib/genmsk_short.f90
Normal file
45
lib/genmsk_short.f90
Normal file
@ -0,0 +1,45 @@
|
||||
subroutine genmsk_short(msg,msgsent,itone,itype)
|
||||
|
||||
use hashing
|
||||
character*22 msg0,msg,msgsent
|
||||
character*3 crpt,rpt(0:7)
|
||||
integer itone(37)
|
||||
integer b11(11)
|
||||
integer golay_15_3(0:7)
|
||||
data b11/1,1,1,0,0,0,1,0,0,1,0/ !Barker 11 code
|
||||
data rpt /'26 ','27 ','28 ','R26','R27','R28','RRR','73 '/
|
||||
data golay_15_3/00000,07025,11704,14025,19164,20909,26468,31765/
|
||||
|
||||
itype=-1
|
||||
msgsent='*** bad message ***'
|
||||
itone=0
|
||||
i1=index(msg,'>')
|
||||
if(i1.lt.9) go to 900
|
||||
crpt=msg(i1+2:i1+5)
|
||||
do i=0,7
|
||||
if(crpt.eq.rpt(i)) go to 10
|
||||
enddo
|
||||
go to 900
|
||||
|
||||
10 itone(1:11)=b11
|
||||
irpt=i
|
||||
ncodeword=golay_15_3(irpt) !Save the 15-bit codeword for report
|
||||
do i=26,12,-1 !Insert codeword into itone array
|
||||
itone(i)=iand(ncodeword,1)
|
||||
ncodeword=ncodeword/2
|
||||
enddo
|
||||
call hash(msg(2:i1-1),i1-2,ihash)
|
||||
ihash=iand(ihash,1023) !10-bit hash for the two callsigns
|
||||
n=ihash
|
||||
do i=36,27,-1
|
||||
itone(i)=iand(n,1)
|
||||
n=n/2
|
||||
enddo
|
||||
n=count(itone(1:36).eq.0)
|
||||
itone(37)=1
|
||||
if(iand(n,1).eq.1) itone(37)=0
|
||||
msgsent=msg
|
||||
itype=7
|
||||
|
||||
900 return
|
||||
end subroutine genmsk_short
|
Loading…
Reference in New Issue
Block a user