Merge branch 'hotfix-2.0.0-rc4' of bitbucket.org:k1jt/wsjtx into hotfix-2.0.0-rc4

This commit is contained in:
Joe Taylor 2018-10-19 21:17:01 -04:00
commit 2815a7c1b9
5 changed files with 102 additions and 44 deletions

View File

@ -496,7 +496,7 @@ set (wsjt_FSRCS
lib/moondopjpl.f90
lib/morse.f90
lib/move.f90
lib/msk144d2.f90
lib/msk144d.f90
lib/msk40decodeframe.f90
lib/msk144decodeframe.f90
lib/msk144sd.f90
@ -1255,8 +1255,8 @@ target_link_libraries (msk144sd wsjt_fort wsjt_cxx)
add_executable (msk144sim lib/msk144sim.f90 wsjtx.rc)
target_link_libraries (msk144sim wsjt_fort wsjt_cxx)
add_executable (msk144d2 lib/msk144d2.f90 wsjtx.rc)
target_link_libraries (msk144d2 wsjt_fort wsjt_cxx)
add_executable (msk144d lib/msk144d.f90 wsjtx.rc)
target_link_libraries (msk144d wsjt_fort wsjt_cxx)
endif(WSJT_BUILD_UTILS)
# build the main application

View File

@ -1,4 +1,4 @@
program ft8sim2
program ft8sim
! Generate simulated "type 2" ft8 files
! Output is saved to a *.wav file.
@ -21,10 +21,10 @@ program ft8sim2
! Get command-line argument(s)
nargs=iargc()
if(nargs.ne.8) then
print*,'Usage: ft8sim2 "message" f0 DT fdop del width nfiles snr'
print*,'Examples: ft8sim2 "K1ABC W9XYZ EN37" 1500.0 0.0 0.1 1.0 0 10 -18'
print*,' ft8sim2 "WA9XYZ/R KA1ABC/R FN42" 1500.0 0.0 0.1 1.0 0 10 -18'
print*,' ft8sim2 "K1ABC RR73; W9XYZ <KH1/KH7Z> -11" 300 0 0 0 25 1 -10'
print*,'Usage: ft8sim "message" f0 DT fdop del width nfiles snr'
print*,'Examples: ft8sim "K1ABC W9XYZ EN37" 1500.0 0.0 0.1 1.0 0 10 -18'
print*,' ft8sim "WA9XYZ/R KA1ABC/R FN42" 1500.0 0.0 0.1 1.0 0 10 -18'
print*,' ft8sim "K1ABC RR73; W9XYZ <KH1/KH7Z> -11" 300 0 0 0 25 1 -10'
go to 999
endif
call getarg(1,msg37) !Message to be transmitted
@ -133,4 +133,4 @@ program ft8sim2
write(*,1110) ifile,xdt,f0,snrdb,fname
1110 format(i4,f7.2,f8.2,f7.1,2x,a17)
enddo
999 end program ft8sim2
999 end program ft8sim

47
lib/msk144_testmsg.f90 Normal file
View File

@ -0,0 +1,47 @@
parameter (MAXTEST=75,NTEST=43)
character*37 testmsg(MAXTEST)
data testmsg(1:NTEST)/ &
"CQ K1ABC FN42", &
"K1ABC W9XYZ EN37", &
"W9XYZ K1ABC -11", &
"K1ABC W9XYZ R-09", &
"W9XYZ K1ABC RRR", &
"K1ABC W9XYZ 73", &
"K1ABC W9XYZ RR73", &
"CQ KH1/KH7Z", &
"CQ TEST K1ABC/R FN42", &
"K1ABC/R W9XYZ EN37", &
"W9XYZ K1ABC/R R FN42", &
"K1ABC/R W9XYZ RR73", &
"CQ TEST K1ABC FN42", &
"K1ABC/R W9XYZ/R R FN42", &
"CQ G4ABC/P IO91", &
"G4ABC/P PA9XYZ JO22", &
"PA9XYZ 590003 IO91NP", &
"G4ABC/P R 570007 JO22DB", &
"PA9XYZ G4ABC/P RR73", &
"CQ PJ4/K1ABC", &
"PJ4/K1ABC <W9XYZ>", &
"W9XYZ <PJ4/K1ABC> -11", &
"<PJ4/K1ABC> W9XYZ R-09", &
"<W9XYZ> PJ4/K1ABC RRR", &
"PJ4/K1ABC <W9XYZ> 73", &
"CQ W9XYZ EN37", &
"<W9XYZ> YW18FIFA", &
"<YW18FIFA> W9XYZ -11", &
"W9XYZ <YW18FIFA> R-09", &
"YW18FIFA <W9XYZ> RRR", &
"<W9XYZ> YW18FIFA 73", &
"TNX BOB 73 GL", &
"CQ YW18FIFA", &
"<YW18FIFA> KA1ABC", &
"KA1ABC <YW18FIFA> -11", &
"<YW18FIFA> KA1ABC R-17", &
"<KA1ABC> YW18FIFA RR73", &
"<YW18FIFA> KA1ABC 73", &
"123456789ABCDEF012", &
"<KA1ABC WB9XYZ> -03", &
"<KA1ABC WB9XYZ> R+03", &
"<KA1ABC WB9XYZ> RRR", &
"<KA1ABC WB9XYZ> 73"/

View File

@ -3,11 +3,11 @@ program msk144code
! Provides examples of message packing, bit and symbol ordering,
! LDPC encoding, and other necessary details of the MSK144 protocol.
use packjt
character msg*37,msgsent*37,decoded,bad*1,msgtype*13
use packjt77
character*77 c77
character msg*37,msgsent*37,decoded,bad*1,msgtype*16
integer*4 i4tone(144)
logical*1 bcontest
include 'testmsg.f90'
include 'msk144_testmsg.f90'
nargs=iargc()
if(nargs.ne.1) then
@ -24,44 +24,57 @@ program msk144code
call getarg(1,msg)
nmsg=1
if(msg(1:2).eq."-t") then
testmsg(NTEST+1)="<KA1ABC WB9XYZ> -03"
testmsg(NTEST+2)="<KA1ABC WB9XYZ> R+03"
testmsg(NTEST+3)="<KA1ABC WB9XYZ> RRR"
testmsg(NTEST+4)="<KA1ABC WB9XYZ> 73"
testmsg(NTEST+5)="KA1ABC WB9XYZ R EN37"
nmsg=NTEST+5
nmsg=NTEST
endif
write(*,1010)
1010 format(" Message Decoded Err? Type"/ &
74("-"))
1010 format(4x,"Message",31x,"Decoded",29x,"Err i3.n3"/100("-"))
do imsg=1,nmsg
if(nmsg.gt.1) msg=testmsg(imsg)
call fmtmsg(msg,iz) !To upper case, collapse multiple blanks
i1=len(trim(msg))-5
bcontest=.false.
if(msg(i1:i1+1).eq.'R ') bcontest=.true.
ichk=0
call genmsk_128_90(msg,ichk,bcontest,msgsent,i4tone,itype)
call genmsk_128_90(msg,ichk,msgsent,i4tone,itype)
i3=-1
n3=-1
call pack77(msg,i3,n3,c77)
msgtype=""
if(itype.eq.1) msgtype="Std Msg"
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"
if(itype.eq.6) msgtype="Free text"
if(itype.eq.7) msgtype="Hashed calls"
if(i3.eq.0) then
if(n3.eq.0) msgtype="Free text"
if(n3.eq.1) msgtype="DXpedition mode"
if(n3.eq.2) msgtype="EU VHF Contest"
if(n3.eq.3) msgtype="ARRL Field Day"
if(n3.eq.4) msgtype="ARRL Field Day"
if(n3.eq.5) msgtype="Telemetry"
if(n3.ge.6) msgtype="Undefined type"
endif
if(i3.eq.1) msgtype="Standard msg"
if(i3.eq.2) msgtype="EU VHF Contest"
if(i3.eq.3) msgtype="ARRL RTTY Roundup"
if(i3.eq.4) msgtype="Nonstandard calls"
if(i3.ge.5) msgtype="Undefined msg type"
if(i3.ge.1) n3=-1
if(i4tone(41).lt.0) then
msgtype="Sh msg"
i3=-1
endif
bad=" "
if(msgsent.ne.msg) bad="*"
write(*,1020) imsg,msg,msgsent,bad,itype,msgtype
1020 format(i2,'.',2x,a37,2x,a37,3x,a1,i3,": ",a13)
if(msg.ne.msgsent) bad="*"
if(i3.eq.0.and.n3.ge.0) then
write(*,1020) imsg,msg,msgsent,bad,i3,n3,msgtype
1020 format(i2,'.',1x,a37,1x,a37,1x,a1,2x,i1,'.',i1,1x,a16)
elseif(i3.ge.1) then
write(*,1022) imsg,msg,msgsent,bad,i3,msgtype
1022 format(i2,'.',1x,a37,1x,a37,1x,a1,2x,i1,'.',1x,1x,a16)
elseif(i3.lt.0) then
write(*,1024) imsg,msg,msgsent,bad,msgtype
1024 format(i2,'.',1x,a37,1x,a37,1x,a1,6x,a16)
endif
enddo
if(nmsg.eq.1) then
n=144
if(msg(1:1).eq."<") n=40
if(i4tone(41).lt.0) n=40
write(*,1030) i4tone(1:n)
1030 format(/'Channel symbols'/(72i1))
endif

View File

@ -1,4 +1,4 @@
program msk144d2
program msk144d
! Test the msk144 decoder for WSJT-X
@ -17,7 +17,6 @@ program msk144d2
logical :: display_help=.false.
logical*1 bShMsgs
logical*1 bcontest
logical*1 btrain
logical*1 bswl
@ -47,7 +46,6 @@ program msk144d2
mygrid='EN50WC'
hiscall=''
bShMsgs=.false.
bcontest=.false.
btrain=.false.
bswl=.false.
datadir='.'
@ -116,7 +114,7 @@ program msk144d2
tt=sum(float(abs(id2(i:i+7*512-1))))
if( tt .ne. 0.0 ) then
call mskrtd(ichunk,nutc,tsec,ntol,nrxfreq,ndepth,mycall,mygrid,hiscall,bShMsgs, &
bcontest,btrain,pcoeffs,bswl,datadir,line)
btrain,pcoeffs,bswl,datadir,line)
if( index(line,"&") .ne. 0 .or. &
index(line,"^") .ne. 0 .or. &
index(line,"!") .ne. 0 .or. &
@ -135,4 +133,4 @@ program msk144d2
print*,infile
999 continue
end program msk144d2
end program msk144d