summaryrefslogtreecommitdiff
path: root/lib/superfox/qpc_snr.f90
blob: b2c807f0ec16266279fd9b179e2281b867cfc167 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
subroutine qpc_snr(s3,y,snr)

  use qpc_mod
!  real s2(0:NQ-1,0:151)               !Symbol spectra, including sync
  real s3(0:127,0:127)                !Synchronized symbol spectra
  integer*1 y(0:127)                  !Encoded symbols
!  integer isync(24)

  p=0.
  do j=1,127
     i=y(j)
     p=p + s3(i,j)
  enddo
  snr=db(p/127.0) - db(127.0) - 4.0

  return
end subroutine qpc_snr