summaryrefslogtreecommitdiff
path: root/lib/superfox/sfrx_sub.f90
diff options
context:
space:
mode:
authorChristoph Berg <myon@debian.org>2024-09-30 22:36:11 +0200
committerChristoph Berg <myon@debian.org>2024-09-30 22:36:11 +0200
commit4320ce238aae1fe87fc9f379cdd816e9317885fa (patch)
treeb9d97364486fc8b7f79e8e877d5d491bb061740f /lib/superfox/sfrx_sub.f90
parentfbaeaa72f63f22bf0b53d634f6809cbdfbb46c9f (diff)
New upstream version 2.7.0~rc7+repackupstream/2.7.0_rc7+repack
Diffstat (limited to 'lib/superfox/sfrx_sub.f90')
-rwxr-xr-xlib/superfox/sfrx_sub.f9054
1 files changed, 54 insertions, 0 deletions
diff --git a/lib/superfox/sfrx_sub.f90 b/lib/superfox/sfrx_sub.f90
new file mode 100755
index 00000000..1168610a
--- /dev/null
+++ b/lib/superfox/sfrx_sub.f90
@@ -0,0 +1,54 @@
+subroutine sfrx_sub(nyymmdd,nutc,nfqso,ntol,iwave)
+
+ use sfox_mod
+ use julian
+
+ integer*2 iwave(NMAX)
+ integer*8 secday,ntime8
+ integer*1 xdec(0:49)
+ character*13 foxcall
+ complex c0(NMAX) !Complex form of signal as received
+ real dd(NMAX)
+ logical crc_ok
+ data secday/86400/
+
+ fsync=nfqso
+ ftol=ntol
+ fsample=12000.0
+ call sfox_init(7,127,50,'no',fspread,delay,fsample,24)
+ npts=15*12000
+
+ if(nyymmdd.eq.-1) then
+ ntime8=itime8()/30
+ ntime8=30*ntime8
+ else
+ iyr=2000+nyymmdd/10000
+ imo=mod(nyymmdd/100,100)
+ iday=mod(nyymmdd,100)
+ ih=nutc/10000
+ im=mod(nutc/100,100)
+ is=mod(nutc,100)
+ ntime8=secday*(JD(iyr,imo,iday)-2440588) + 3600*ih + 60*im + is
+ endif
+
+ dd=iwave
+ call sfox_remove_ft8(dd,npts)
+
+ call sfox_ana(dd,npts,c0,npts)
+
+ call sfox_remove_tone(c0,fsync) ! Needs testing
+
+ ndepth=3
+ dth=0.5
+ damp=1.0
+
+ call qpc_decode2(c0,fsync,ftol, xdec,ndepth,dth,damp,crc_ok, &
+ snrsync,fbest,tbest,snr)
+ if(crc_ok) then
+ nsnr=nint(snr)
+ nsignature = 1
+ call sfox_unpack(nutc,xdec,nsnr,fbest-750.0,tbest,foxcall,nsignature)
+ endif
+
+ return
+end subroutine sfrx_sub