summaryrefslogtreecommitdiff
path: root/lib/genwspr.f90
blob: d1d5183b6003153398b6734a5fb54b3ff4bc2590 (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
30
subroutine genwspr(message,msgsent,itone)
! Encode a WSPR message and generate the array of channel symbols.

  character*22 message,msgsent
  parameter (MAXSYM=176)
  integer*1 symbol(MAXSYM)
  integer*1 data0(11)
  integer*4 itone(162)
  integer npr3(162)
  data npr3/                                      &
      1,1,0,0,0,0,0,0,1,0,0,0,1,1,1,0,0,0,1,0,    &
      0,1,0,1,1,1,1,0,0,0,0,0,0,0,1,0,0,1,0,1,    &
      0,0,0,0,0,0,1,0,1,1,0,0,1,1,0,1,0,0,0,1,    &
      1,0,1,0,0,0,0,1,1,0,1,0,1,0,1,0,1,0,0,1,    &
      0,0,1,0,1,1,0,0,0,1,1,0,1,0,1,0,0,0,1,0,    &
      0,0,0,0,1,0,0,1,0,0,1,1,1,0,1,1,0,0,1,1,    &
      0,1,0,0,0,1,1,1,0,0,0,0,0,1,0,1,0,0,1,1,    &
      0,0,0,0,0,0,0,1,1,0,1,0,1,1,0,0,0,1,1,0,    &
      0,0/

  call wqencode(message,ntype,data0)          !Source encoding
  call encode232(data0,162,symbol)            !Convolutional encoding
  call inter_wspr(symbol,1)                   !Interleaving
  do i=1,162
     itone(i)=npr3(i) + 2*symbol(i)
  enddo
  msgsent=message                             !### To be fixed... ?? ###

  return
end subroutine genwspr