summaryrefslogtreecommitdiff
path: root/lib/demod64a.f90
diff options
context:
space:
mode:
authorIain R. Learmonth <irl@debian.org>2015-10-18 18:51:00 +0100
committerIain R. Learmonth <irl@debian.org>2015-10-18 18:51:00 +0100
commitd63dd8d081a6fcd0715cd13f26df59fb831769d2 (patch)
treeb9c1f6245147a310aac3762630bad389bbb57335 /lib/demod64a.f90
parentc720a3d55c5ec832c29cb7ce50b6fb4b70c55b11 (diff)
Imported Upstream version 1.5.0upstream/1.5.0
Diffstat (limited to 'lib/demod64a.f90')
-rw-r--r--lib/demod64a.f9021
1 files changed, 5 insertions, 16 deletions
diff --git a/lib/demod64a.f90 b/lib/demod64a.f90
index 9d1a3794..452140a2 100644
--- a/lib/demod64a.f90
+++ b/lib/demod64a.f90
@@ -1,4 +1,4 @@
-subroutine demod64a(s3,nadd,mrsym,mrprob,mr2sym,mr2prob,ntest,nlow)
+subroutine demod64a(s3,nadd,afac1,mrsym,mrprob,mr2sym,mr2prob,ntest,nlow)
! Demodulate the 64-bin spectra for each of 63 symbols in a frame.
@@ -10,23 +10,16 @@ subroutine demod64a(s3,nadd,mrsym,mrprob,mr2sym,mr2prob,ntest,nlow)
! mr2prob probability that mr2sym was the transmitted value
implicit real*8 (a-h,o-z)
- real*4 s3(64,63)
+ real*4 s3(64,63),afac1
real*8 fs(64)
integer mrsym(63),mrprob(63),mr2sym(63),mr2prob(63)
-! common/mrscom/ mrs(63),mrs2(63)
if(nadd.eq.-999) return
- afac=1.1 * float(nadd)**0.64
+ afac=afac1 * float(nadd)**0.64
scale=255.999
! Compute average spectral value
- sum=0.
- do j=1,63
- do i=1,64
- sum=sum+s3(i,j)
- enddo
- enddo
- ave=sum/(64.*63.)
+ ave=sum(s3)/(64.*63.)
i1=1 !Silence warning
i2=1
@@ -57,17 +50,13 @@ subroutine demod64a(s3,nadd,mrsym,mrprob,mr2sym,mr2prob,ntest,nlow)
mr2sym(j)=i2-1
mrprob(j)=scale*p1
mr2prob(j)=scale*p2
-! mrs(j)=i1
-! mrs2(j)=i2
enddo
- sum=0.
nlow=0
do j=1,63
- sum=sum+mrprob(j)
if(mrprob(j).le.5) nlow=nlow+1
enddo
- ntest=sum/63
+ ntest=sum(mrprob)/63.0
return
end subroutine demod64a