diff options
| author | Christoph Berg <myon@debian.org> | 2025-09-15 23:04:23 +0200 |
|---|---|---|
| committer | Christoph Berg <myon@debian.org> | 2025-09-15 23:04:23 +0200 |
| commit | 0a13f1fdb9928b6d012569dd65f7f6ef18fac2f8 (patch) | |
| tree | d702795f99ac38e0cc17e25f0f7e50fa3e05baf9 /lib/ft8var/datacor.f90 | |
| parent | 310d05acf2c9233f7e336ae7dd9ffb7b54ca4e62 (diff) | |
New upstream version 3.0.0~rc1+repackupstream/3.0.0_rc1+repack
Diffstat (limited to 'lib/ft8var/datacor.f90')
| -rwxr-xr-x | lib/ft8var/datacor.f90 | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/lib/ft8var/datacor.f90 b/lib/ft8var/datacor.f90 new file mode 100755 index 00000000..c0fecebc --- /dev/null +++ b/lib/ft8var/datacor.f90 @@ -0,0 +1,39 @@ +
+subroutine datacor(datapwr,datacorr)
+
+ use jt65_mod2var, only : s3,correct
+
+ real datapwr,datacorr
+
+! calculate information tones power and datapower/syncpower ratio
+ datapwr=0.0
+ do i=1,63
+ datapwr=datapwr+s3(correct(i)+1,i)
+ enddo
+
+! use short correlation function in time and frequency domains
+ timeplus=0.; timeminus=0.; freqplus=0.; freqminus=0.
+ do i=1,63
+ k=i+1
+ m=i-1
+ if(i.eq.1) m=2
+ if(i.eq.63) k=62
+ timeplus=timeplus+s3(correct(i)+1,k)
+ timeminus=timeminus+s3(correct(i)+1,m)
+ if(correct(i).lt.63) then
+ j=1
+ else
+ j=-1
+ endif
+ if(correct(i).gt.1) then
+ n=-1
+ else
+ n=1
+ endif
+ freqplus=freqplus+s3(correct(i)+1+j,i)
+ freqminus=freqminus+s3(correct(i)+1+n,i)
+ enddo
+ datacorr=datapwr*4.0/(timeplus+timeminus+freqplus+freqminus)
+
+ return
+end subroutine datacor
|
