Merge branch 'develop' into feat-map65-integration

This commit is contained in:
Steven Franke 2021-05-06 08:18:10 -05:00
commit f864257838
2 changed files with 45 additions and 28 deletions

View File

@ -112,7 +112,7 @@ summarized in the following Table:
|=========================================== |===========================================
|Mode |Mode character|Sync character|End of line information |Mode |Mode character|Sync character|End of line information
|FST4 | ` | | ?   aP |FST4 | ` | | ?   aP
|FT4 | ~ | | ?   aP |FT4 | + | | ?   aP
|FT8 | ~ | | ?   aP |FT8 | ~ | | ?   aP
|JT4 | $ | *, # | f, fN, dCN |JT4 | $ | *, # | f, fN, dCN
|JT9 | @ | | |JT9 | @ | |

View File

@ -111,6 +111,10 @@ module q65_generator
end module q65_generator end module q65_generator
module q65_encoding
contains
subroutine q65_encode(message,codeword) subroutine q65_encode(message,codeword)
use gf64math use gf64math
use q65_generator use q65_generator
@ -161,33 +165,26 @@ subroutine get_q65crc12(mc2,ncrc1,ncrc2)
end subroutine get_q65crc12 end subroutine get_q65crc12
program q65code subroutine get_q65_tones(msg37,codeword,itone)
use packjt77 use packjt77
implicit none implicit none
character msg*37,msgsent*27,arg*12,c12*12,c6*6 character*37 msg37
character*77 c77
character*12 c12
character*6 c6
integer codeword(65)
integer sync(22)
integer message(15) integer message(15)
integer codeword(65), shortcodeword(63) integer shortcodeword(63)
integer isync(22)
integer itone(85) integer itone(85)
integer i,j,k integer i,j,k
integer nargs,ncrc1,ncrc2,ncrc
integer i3,n3
integer*1 mbits(90) integer*1 mbits(90)
integer msymbols(15) integer i3,n3,ncrc1,ncrc2
character*77 c77 data sync/1,9,12,13,15,22,23,26,27,33,35,38,46,50,55,60,62,66,69,74,76,85/
data isync/1,9,12,13,15,22,23,26,27,33,35,38,46,50,55,60,62,66,69,74,76,85/
nargs=iargc()
if(nargs .ne. 1) then
print*,'Usage: q65sf "msg"'
goto 999
endif
call getarg(1,msg)
i3=-1 i3=-1
n3=-1 n3=-1
call pack77(msg,i3,n3,c77) call pack77(msg37,i3,n3,c77)
mbits=0 mbits=0
read(c77,'(77i1)') mbits(1:77) read(c77,'(77i1)') mbits(1:77)
@ -205,13 +202,6 @@ program q65code
! Encode to create a 65-symbol codeword ! Encode to create a 65-symbol codeword
call q65_encode(message,codeword) call q65_encode(message,codeword)
write(*,*) 'Generated message plus CRC (90 bits)'
write(*,'(a8,15i4)') '6 bit : ',message
write(*,'(a8,90i1)') 'binary: ',mbits
write(*,*) ' '
write(*,*) 'Codeword with CRC symbols (65 symbols)'
write(*,'(20i3)') codeword
!Shorten the codeword by omitting the CRC symbols (symbols 14 and 15) !Shorten the codeword by omitting the CRC symbols (symbols 14 and 15)
shortcodeword(1:13)=codeword(1:13) shortcodeword(1:13)=codeword(1:13)
shortcodeword(14:63)=codeword(16:65) shortcodeword(14:63)=codeword(16:65)
@ -220,7 +210,7 @@ program q65code
j=1 j=1
k=0 k=0
do i=1,85 do i=1,85
if(i.eq.isync(j)) then if(i.eq.sync(j)) then
j=j+1 j=j+1
itone(i)=0 itone(i)=0
else else
@ -228,9 +218,36 @@ program q65code
itone(i)=shortcodeword(k)+1 itone(i)=shortcodeword(k)+1
endif endif
enddo enddo
end subroutine get_q65_tones
end module q65_encoding
program q65code
use q65_encoding
implicit none
character*37 msg37
integer nargs
integer codeword(65),tones(85)
nargs=iargc()
if(nargs .ne. 1) then
print*,'Usage: q65code "msg"'
goto 999
endif
call getarg(1,msg37)
call get_q65_tones(msg37,codeword,tones)
write(*,*) 'Generated message plus CRC (90 bits)'
write(*,'(a8,15i4)') '6 bit : ',codeword(1:15)
write(*,'(a8,15b6.6)') 'binary: ',codeword(1:15)
write(*,*) ' '
write(*,*) 'Codeword with CRC symbols (65 symbols)'
write(*,'(20i3)') codeword
write(*,*) ' ' write(*,*) ' '
write(*,*) 'Channel symbols (85 total)' write(*,*) 'Channel symbols (85 total)'
write(*,'(20i3)') itone write(*,'(20i3)') tones
999 end program q65code 999 end program q65code