2012-11-15 11:34:14 -05:00
|
|
|
program jt9code
|
|
|
|
|
|
|
|
! Generate simulated data for testing of WSJT-X
|
|
|
|
|
|
|
|
parameter (NMAX=1800*12000)
|
|
|
|
character msg*22,msg0*22,decoded*22
|
|
|
|
|
|
|
|
integer*4 i4tone(85) !Channel symbols (values 0-8)
|
|
|
|
integer*1 i1
|
|
|
|
equivalence (i1,i4)
|
|
|
|
include 'jt9sync.f90'
|
|
|
|
common/acom/dat(NMAX),iwave(NMAX)
|
|
|
|
|
|
|
|
nargs=iargc()
|
|
|
|
if(nargs.ne.1) then
|
|
|
|
print*,'Usage: jt9code "message"'
|
|
|
|
go to 999
|
|
|
|
endif
|
|
|
|
|
|
|
|
call getarg(1,msg0)
|
|
|
|
write(*,1000) msg0
|
|
|
|
1000 format('Message:',3x,a22)
|
|
|
|
msg=msg0
|
2012-12-11 13:50:07 -05:00
|
|
|
ichk=0
|
|
|
|
itext=0
|
|
|
|
call genjt9(msg,ichk,decoded,i4tone,itext) !Encode message into tone #s
|
2012-11-15 11:34:14 -05:00
|
|
|
write(*,1002) i4tone
|
|
|
|
1002 format('Channel symbols:'/(30i2))
|
2012-12-11 13:50:07 -05:00
|
|
|
if(itext.eq.0) write(*,1004) decoded
|
2012-11-15 11:34:14 -05:00
|
|
|
1004 format('Decoded message:',1x,a22)
|
2012-12-11 13:50:07 -05:00
|
|
|
if(itext.ne.0) write(*,1005) decoded
|
|
|
|
1005 format('Decoded message:',1x,a22,3x,'(free text)')
|
2012-11-15 11:34:14 -05:00
|
|
|
|
|
|
|
999 end program jt9code
|