15bf364e5e
commit dbca224ee15f598ba86b860c19e902b594f6b888 Author: Jordan Sherer <jordan@widefido.com> Date: Wed Aug 14 21:10:17 2019 -0400 Cleanup decoder with easy parameters commit 427a6ac6bf02a7de80e76b921bbd48ec23dab0c4 Author: Jordan Sherer <jordan@widefido.com> Date: Tue Aug 13 22:56:32 2019 -0400 Working on downsampling commit ef5e1fb9cdafb6069b6f67377c3bc9e073d2785e Author: Jordan Sherer <jordan@widefido.com> Date: Tue Aug 13 22:01:34 2019 -0400 Fixed NN parameters commit 216dbc83a931127540fb028d3365a205b4ef1d28 Author: Jordan Sherer <jordan@widefido.com> Date: Tue Aug 13 21:40:20 2019 -0400 Fixed dupe during sync commit 9505d50ba6c42b05e5fff1a059864a643d9e7558 Author: Jordan Sherer <jordan@widefido.com> Date: Tue Aug 13 16:54:37 2019 -0400 Tweaking downsampling commit 86cd07e1ac8ce8d64cdd2d4321cf295cd867f80e Author: Jordan Sherer <jordan@widefido.com> Date: Tue Aug 13 10:11:07 2019 -0400 Working with logging commit 0de3849a442d20081f545c6fef5fadf2def6e0d2 Author: Jordan Sherer <jordan@widefido.com> Date: Tue Aug 13 03:46:51 2019 -0400 250 millisecond startup delay commit a35cc5302b6f8532a424d504a4e2feaacf74ef99 Author: Jordan Sherer <jordan@widefido.com> Date: Tue Aug 13 03:39:20 2019 -0400 1200 sps, 10 seconds, 80Hz commit 6f36db20f90c510336b497605d9d7667d6f0f44f Author: Jordan Sherer <jordan@widefido.com> Date: Tue Aug 13 03:27:12 2019 -0400 Working word count commit 741c55ac0840512d68e1fbdb2f1fff6adfcd4612 Author: Jordan Sherer <jordan@widefido.com> Date: Tue Aug 13 02:40:40 2019 -0400 Updated LDPC simulator commit ce0992644315402503f44bdae4131bacf2cc3e21 Author: Jordan Sherer <jordan@widefido.com> Date: Tue Aug 13 02:34:01 2019 -0400 Weird. Apparently symbol stop is the only way to get decodes to work in app...need to figure out why commit 8b330fbff6574f2ee6d7a471dd93a2cb57b492dd Author: Jordan Sherer <jordan@widefido.com> Date: Tue Aug 13 01:50:37 2019 -0400 More parameter fixups (downsampling) and first decode commit 37c780b45e6579294b5a4692b8e8d0602d9bd8b1 Author: Jordan Sherer <jordan@widefido.com> Date: Mon Aug 12 23:20:58 2019 -0400 More params fixing commit bc8547e1e8f55bfb4bce5f95890f3cf6798e36d7 Author: Jordan Sherer <jordan@widefido.com> Date: Mon Aug 12 22:48:00 2019 -0400 Fixed params in fortran code commit 10fbf9f4a78c6244e0082a31819ee26aeae39325 Author: Jordan Sherer <jordan@widefido.com> Date: Mon Aug 12 16:08:32 2019 -0400 Using constants in place of literals in a few places to make it easier to change
57 lines
1.8 KiB
Fortran
57 lines
1.8 KiB
Fortran
subroutine sync8d(cd0,i0,ctwk,itwk,sync)
|
|
|
|
! Compute sync power for a complex, downsampled FT8 signal.
|
|
|
|
include 'ft8_params.f90'
|
|
|
|
parameter(NP2=2812)
|
|
complex cd0(3125)
|
|
complex csync(0:6,NDOWNSPS)
|
|
complex csync2(NDOWNSPS)
|
|
complex ctwk(NDOWNSPS)
|
|
complex z1,z2,z3
|
|
logical first
|
|
integer icos7(0:6)
|
|
data icos7/4,2,5,6,1,3,0/
|
|
data first/.true./
|
|
save first,twopi,fs2,dt2,taus,baud,csync
|
|
|
|
p(z1)=real(z1)**2 + aimag(z1)**2 !Statement function for power
|
|
|
|
! Set some constants and compute the csync array.
|
|
if( first ) then
|
|
twopi=8.0*atan(1.0)
|
|
fs2=12000.0/NDOWN !Sample rate after downsampling
|
|
dt2=1/fs2 !Corresponding sample interval
|
|
taus=NDOWNSPS*dt2 !Symbol duration
|
|
baud=1.0/taus !Keying rate
|
|
do i=0,6
|
|
phi=0.0
|
|
dphi=twopi*icos7(i)*baud*dt2
|
|
do j=1,NDOWNSPS
|
|
csync(i,j)=cmplx(cos(phi),sin(phi)) !Waveform for 7x7 Costas array
|
|
phi=mod(phi+dphi,twopi)
|
|
enddo
|
|
enddo
|
|
first=.false.
|
|
endif
|
|
|
|
sync=0
|
|
do i=0,6 !Sum over 7 Costas frequencies and
|
|
i1=i0+i*NDOWNSPS !three Costas arrays
|
|
i2=i1+36*NDOWNSPS
|
|
i3=i1+72*NDOWNSPS
|
|
csync2=csync(i,1:NDOWNSPS)
|
|
if(itwk.eq.1) csync2=ctwk*csync2 !Tweak the frequency
|
|
z1=0.
|
|
z2=0.
|
|
z3=0.
|
|
if(i1.ge.1 .and. i1+(NDOWNSPS-1).le.NP2) z1=sum(cd0(i1:i1+(NDOWNSPS-1))*conjg(csync2))
|
|
if(i2.ge.1 .and. i2+(NDOWNSPS-1).le.NP2) z2=sum(cd0(i2:i2+(NDOWNSPS-1))*conjg(csync2))
|
|
if(i3.ge.1 .and. i3+(NDOWNSPS-1).le.NP2) z3=sum(cd0(i3:i3+(NDOWNSPS-1))*conjg(csync2))
|
|
sync = sync + p(z1) + p(z2) + p(z3)
|
|
enddo
|
|
|
|
return
|
|
end subroutine sync8d
|