summaryrefslogtreecommitdiff
path: root/lib/qra/q65/q65code.f90
blob: d61cba91659a70a1821e9b48b1f731f65c66594c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
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(*,*) 'Channel symbols (85 total)'
   write(*,'(20i3)') tones

999 end program q65code