summaryrefslogtreecommitdiff
path: root/lib/jtty/gen_syncwave.f90
blob: 07c0ae439656a0605d09a7888b3b4138b0e6ab97 (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
subroutine gen_syncwave(csync,nss)
  use jtty_fec, only: is13                 ! sync sequence
  implicit none
  integer, intent(in)  :: nss              ! samples/symbol at 6000 samples/sec
  integer              :: i,j,k
  real                 :: twopi, fsample, dt, baud, phi, dphi
  complex, intent(out) :: csync(13*nss)

  twopi=8.0*atan(1.0)
  fsample = 6000.0
  dt=1.0/fsample
  baud=fsample/nss 
  csync=cmplx(0.,0.)
  k=1
  phi=0.0
  do i=1,13
   dphi=twopi*baud*is13(i)*dt
   do j=1,nss
      csync(k)=cmplx(cos(phi),sin(phi))
      k=k+1
      phi=phi+dphi
   enddo
  enddo

  return
end subroutine gen_syncwave