summaryrefslogtreecommitdiff
path: root/lib/ft8/sync8d.f90
diff options
context:
space:
mode:
Diffstat (limited to 'lib/ft8/sync8d.f90')
-rw-r--r--lib/ft8/sync8d.f9010
1 files changed, 5 insertions, 5 deletions
diff --git a/lib/ft8/sync8d.f90 b/lib/ft8/sync8d.f90
index d0d1c63b..798f2831 100644
--- a/lib/ft8/sync8d.f90
+++ b/lib/ft8/sync8d.f90
@@ -3,14 +3,14 @@ subroutine sync8d(cd0,i0,ctwk,itwk,sync)
! Compute sync power for a complex, downsampled FT8 signal.
parameter(NP2=2812,NDOWN=60)
- complex cd0(3125)
+ complex cd0(0:3199)
complex csync(0:6,32)
complex csync2(32)
complex ctwk(32)
complex z1,z2,z3
logical first
integer icos7(0:6)
- data icos7/2,5,6,0,4,1,3/
+ data icos7/3,1,4,0,6,5,2/
data first/.true./
save first,twopi,fs2,dt2,taus,baud,csync
@@ -44,9 +44,9 @@ subroutine sync8d(cd0,i0,ctwk,itwk,sync)
z1=0.
z2=0.
z3=0.
- if(i1.ge.1 .and. i1+31.le.NP2) z1=sum(cd0(i1:i1+31)*conjg(csync2))
- if(i2.ge.1 .and. i2+31.le.NP2) z2=sum(cd0(i2:i2+31)*conjg(csync2))
- if(i3.ge.1 .and. i3+31.le.NP2) z3=sum(cd0(i3:i3+31)*conjg(csync2))
+ if(i1.ge.0 .and. i1+31.le.NP2-1) z1=sum(cd0(i1:i1+31)*conjg(csync2))
+ if(i2.ge.0 .and. i2+31.le.NP2-1) z2=sum(cd0(i2:i2+31)*conjg(csync2))
+ if(i3.ge.0 .and. i3+31.le.NP2-1) z3=sum(cd0(i3:i3+31)*conjg(csync2))
sync = sync + p(z1) + p(z2) + p(z3)
enddo