mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2026-06-09 09:24:59 -04:00
Improve the way messages with compound calls are automatically generated.
Routine packmsg now tries the shortlist (Type 1 prefix or suffix) first. Then it tries to to make a valid message using a Type 2 prefix or suffix. If both fail, it packs the first 13 characters as a free-text message. The GUI now generates the most useful messages with compound callsigns of all valid types. git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/wsjtx@4533 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
+25
-13
@@ -2,7 +2,7 @@ program jt9code
|
||||
|
||||
! Generate simulated data for testing of WSJT-X
|
||||
|
||||
character msg*22,msg0*22,decoded*22
|
||||
character msg*22,msg0*22,decoded*22,bad*1,msgtype*10
|
||||
integer*4 i4tone(85) !Channel symbols (values 0-8)
|
||||
include 'jt9sync.f90'
|
||||
|
||||
@@ -12,18 +12,30 @@ program jt9code
|
||||
go to 999
|
||||
endif
|
||||
|
||||
call getarg(1,msg0)
|
||||
write(*,1000) msg0
|
||||
1000 format('Message:',3x,a22)
|
||||
msg=msg0
|
||||
call getarg(1,msg)
|
||||
call fmtmsg(msg,iz) !To upper, collapse mult blanks
|
||||
msg0=msg !Input message
|
||||
|
||||
ichk=0
|
||||
itext=0
|
||||
call genjt9(msg,ichk,decoded,i4tone,itext) !Encode message into tone #s
|
||||
write(*,1002) i4tone
|
||||
1002 format('Channel symbols:'/(30i2))
|
||||
if(itext.eq.0) write(*,1004) decoded
|
||||
1004 format('Decoded message:',1x,a22)
|
||||
if(itext.ne.0) write(*,1005) decoded
|
||||
1005 format('Decoded message:',1x,a22,3x,'(free text)')
|
||||
call genjt9(msg,ichk,decoded,i4tone,itype) !Encode message into tone #s
|
||||
|
||||
msgtype=""
|
||||
if(itype.eq.1) msgtype="Std Msg"
|
||||
if(itype.eq.2) msgtype="Type 1 pfx"
|
||||
if(itype.eq.3) msgtype="Type 1 sfx"
|
||||
if(itype.eq.4) msgtype="Type 2 pfx"
|
||||
if(itype.eq.5) msgtype="Type 2 sfx"
|
||||
if(itype.eq.6) msgtype="Free text"
|
||||
|
||||
write(*,1010)
|
||||
1010 format("Message Decoded Err"/ &
|
||||
"-----------------------------------------------------------------")
|
||||
bad=" "
|
||||
if(decoded.ne.msg0) bad="*"
|
||||
write(*,1020) msg0,decoded,bad,itype,msgtype
|
||||
1020 format(a22,2x,a22,3x,a1,i3,": ",a10)
|
||||
|
||||
write(*,1030) i4tone
|
||||
1030 format(/'Channel symbols'/(30i2))
|
||||
|
||||
999 end program jt9code
|
||||
|
||||
Reference in New Issue
Block a user