2012-11-15 11:34:14 -05:00
|
|
|
program jt9code
|
|
|
|
|
|
|
|
! Generate simulated data for testing of WSJT-X
|
|
|
|
|
2015-04-22 13:48:03 -04:00
|
|
|
character msg*22,decoded*22,bad*1,msgtype*13
|
2013-05-20 10:09:02 -04:00
|
|
|
integer*4 i4tone(85) !Channel symbols (values 0-8)
|
2015-04-22 13:48:03 -04:00
|
|
|
include 'testmsg.f90'
|
2012-11-15 11:34:14 -05:00
|
|
|
include 'jt9sync.f90'
|
|
|
|
|
|
|
|
nargs=iargc()
|
|
|
|
if(nargs.ne.1) then
|
|
|
|
print*,'Usage: jt9code "message"'
|
2014-10-18 21:31:17 -04:00
|
|
|
print*,' jt9code -t'
|
2012-11-15 11:34:14 -05:00
|
|
|
go to 999
|
|
|
|
endif
|
|
|
|
|
2014-10-18 20:56:41 -04:00
|
|
|
call getarg(1,msg)
|
2014-10-18 21:29:30 -04:00
|
|
|
nmsg=1
|
2015-04-22 13:48:03 -04:00
|
|
|
if(msg(1:2).eq."-t") nmsg=NTEST
|
2014-10-18 20:56:41 -04:00
|
|
|
|
|
|
|
write(*,1010)
|
2015-04-22 13:48:03 -04:00
|
|
|
1010 format(" Message Decoded Err? Type"/ &
|
|
|
|
74("-"))
|
2014-10-18 21:29:30 -04:00
|
|
|
do imsg=1,nmsg
|
|
|
|
if(nmsg.gt.1) msg=testmsg(imsg)
|
2015-04-22 13:48:03 -04:00
|
|
|
call fmtmsg(msg,iz) !To upper case, collapse multiple blanks
|
2014-10-18 21:29:30 -04:00
|
|
|
ichk=0
|
2015-04-22 13:48:03 -04:00
|
|
|
call gen9(msg,ichk,decoded,i4tone,itype) !Encode message into tone #s
|
2014-10-18 21:29:30 -04:00
|
|
|
|
|
|
|
msgtype=""
|
|
|
|
if(itype.eq.1) msgtype="Std Msg"
|
2015-04-22 13:48:03 -04:00
|
|
|
if(itype.eq.2) msgtype="Type 1 prefix"
|
|
|
|
if(itype.eq.3) msgtype="Type 1 suffix"
|
|
|
|
if(itype.eq.4) msgtype="Type 2 prefix"
|
|
|
|
if(itype.eq.5) msgtype="Type 2 suffix"
|
2014-10-18 21:29:30 -04:00
|
|
|
if(itype.eq.6) msgtype="Free text"
|
|
|
|
|
|
|
|
bad=" "
|
2015-04-22 13:48:03 -04:00
|
|
|
if(decoded.ne.msg) bad="*"
|
|
|
|
write(*,1020) imsg,msg,decoded,bad,itype,msgtype
|
|
|
|
1020 format(i2,'.',2x,a22,2x,a22,3x,a1,i3,": ",a13)
|
2014-10-18 21:29:30 -04:00
|
|
|
enddo
|
2014-10-18 20:56:41 -04:00
|
|
|
|
2014-10-18 21:29:30 -04:00
|
|
|
if(nmsg.eq.1) write(*,1030) i4tone
|
2014-10-18 20:56:41 -04:00
|
|
|
1030 format(/'Channel symbols'/(30i2))
|
2012-11-15 11:34:14 -05:00
|
|
|
|
|
|
|
999 end program jt9code
|