diff options
| author | Christoph Berg <myon@debian.org> | 2025-09-16 12:37:12 +0200 |
|---|---|---|
| committer | Christoph Berg <myon@debian.org> | 2025-09-16 12:57:29 +0200 |
| commit | 5a4967c577ad245a2117b7b2f71c13b1212fe285 (patch) | |
| tree | 4d09343cfe757239895a0dd9b399242d2a07d7c2 /lib/ft8var/rms_augapvar.f90 | |
| parent | 23c903a09fb1d73fd20b50323cd80cfb3aba8799 (diff) | |
Merge 2.7 changes, I had uploaded -1 from the wrong branch.debian/3.0.0_rc1+repack-2
Diffstat (limited to 'lib/ft8var/rms_augapvar.f90')
| -rwxr-xr-x | lib/ft8var/rms_augapvar.f90 | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/lib/ft8var/rms_augapvar.f90 b/lib/ft8var/rms_augapvar.f90 new file mode 100755 index 00000000..c845900f --- /dev/null +++ b/lib/ft8var/rms_augapvar.f90 @@ -0,0 +1,42 @@ +
+subroutine rms_augapvar(nutc,lowrms)
+
+ use jt65_mod6, only : dd
+
+ logical lowrms,baddatavar
+
+ rms1=sqrt(dot_product(dd(100000:100099),dd(100000:100099))/100.0)
+ rms2=sqrt(dot_product(dd(200000:200099),dd(200000:200099))/100.0)
+ rms3=sqrt(dot_product(dd(300000:300099),dd(300000:300099))/100.0)
+ rms4=sqrt(dot_product(dd(400000:400099),dd(400000:400099))/100.0)
+ rms5=sqrt(dot_product(dd(500000:500099),dd(500000:500099))/100.0)
+ rms=(rms1+rms2+rms3+rms4+rms5)/5.0
+ if(rms.lt.2.0) then
+ write(*,1016) nutc,'input signal low rms','d'
+1016 format(i4.4,2x,a20,19x,a1)
+ call flush(6)
+ lowrms=.true.
+ return
+ endif
+
+ if(baddatavar()) then
+ write(*,1017) nutc,'audio gap detected','d'
+1017 format(i4.4,2x,a18,21x,a1)
+ call flush(6)
+
+ j=0
+ do i=1,490
+ sq=0.
+ do n=1,1200,60
+ j=j+60
+ x=dd(j)
+ sq=sq + abs(x)
+ enddo
+ if(sq.lt.1.0) then
+ dd(j)=1.0; dd(j-600)=1.0
+ endif
+ enddo
+ endif
+
+ return
+end subroutine rms_augapvar
\ No newline at end of file |
