2018-07-03 10:28:16 -04:00
|
|
|
subroutine genft8_174_91(msg,mygrid,bcontest,i3,n3,msgsent,msgbits,itone)
|
2018-06-05 09:40:00 -04:00
|
|
|
|
|
|
|
! Encode an FT8 message, producing array itone().
|
|
|
|
|
|
|
|
use packjt
|
|
|
|
include 'ft8_params.f90'
|
2018-07-03 16:08:38 -04:00
|
|
|
character msg*37,msgsent*37
|
2018-06-05 09:40:00 -04:00
|
|
|
character*6 mygrid
|
2018-07-03 16:08:38 -04:00
|
|
|
character*77 c77
|
2018-06-17 13:11:32 -04:00
|
|
|
logical bcontest
|
|
|
|
integer*1 msgbits(77),codeword(174)
|
2018-06-05 09:40:00 -04:00
|
|
|
integer itone(79)
|
|
|
|
integer icos7(0:6)
|
2018-06-08 17:21:21 -04:00
|
|
|
integer graymap(0:7)
|
2018-06-05 09:40:00 -04:00
|
|
|
data icos7/3,1,4,0,6,5,2/ !Costas 7x7 tone pattern
|
2018-06-08 17:21:21 -04:00
|
|
|
data graymap/0,1,3,2,7,6,4,5/
|
2018-06-05 09:40:00 -04:00
|
|
|
|
2018-07-03 16:08:38 -04:00
|
|
|
call pack77(msg,i3,n3,c77)
|
|
|
|
call unpack77(c77,msgsent)
|
2018-06-05 09:40:00 -04:00
|
|
|
|
2018-07-03 16:08:38 -04:00
|
|
|
read(c77,'(77i1)') msgbits
|
2018-06-05 09:40:00 -04:00
|
|
|
call encode174_91(msgbits,codeword) !Encode the test message
|
|
|
|
|
|
|
|
! Message structure: S7 D29 S7 D29 S7
|
|
|
|
itone(1:7)=icos7
|
|
|
|
itone(36+1:36+7)=icos7
|
|
|
|
itone(NN-6:NN)=icos7
|
|
|
|
k=7
|
|
|
|
do j=1,ND
|
|
|
|
i=3*j -2
|
|
|
|
k=k+1
|
|
|
|
if(j.eq.30) k=k+7
|
2018-06-08 17:21:21 -04:00
|
|
|
indx=codeword(i)*4 + codeword(i+1)*2 + codeword(i+2)
|
2018-06-09 14:05:11 -04:00
|
|
|
itone(k)=graymap(indx)
|
2018-06-05 09:40:00 -04:00
|
|
|
enddo
|
|
|
|
|
|
|
|
return
|
|
|
|
end subroutine genft8_174_91
|