summaryrefslogtreecommitdiff
path: root/lib/fil4.f90
diff options
context:
space:
mode:
authorhibby <d@vehibberd.com>2026-10-06 21:24:40 +0100
committerhibby <d@vehibberd.com>2026-10-06 21:24:40 +0100
commitc25cbdf6fb6d946175f4335fab77bfea601b56db (patch)
tree6f7a94b7b81f999e434f61b73d47e337dfd26bf2 /lib/fil4.f90
parent71f5689252c9f13e70e1c24856904475b2307809 (diff)
parent0685fcada9f95fe90f70b387cd7d757da8209624 (diff)
Merge tag 'debian/3.2.0_rc1+dfsg-2' into debian/trixie-backportsdebian/trixie-backports
tagging wsjtx 3.2.0~rc1+dfsg-2
Diffstat (limited to 'lib/fil4.f90')
-rw-r--r--lib/fil4.f9019
1 files changed, 16 insertions, 3 deletions
diff --git a/lib/fil4.f90 b/lib/fil4.f90
index 4946da2f..da98ded6 100644
--- a/lib/fil4.f90
+++ b/lib/fil4.f90
@@ -1,5 +1,19 @@
subroutine fil4(id1,n1,id2,n2)
+ parameter (NTAPS=49)
+ integer*2 id1(n1)
+ integer*2 id2(*)
+ real t(NTAPS)
+ data t/NTAPS*0.0/
+ save t
+
+ call fil4_state(id1,n1,id2,n2,t)
+
+ return
+end subroutine fil4
+
+subroutine fil4_state(id1,n1,id2,n2,t)
+
! FIR lowpass filter designed using ScopeFIR
! fsample = 48000 Hz
@@ -15,7 +29,6 @@ subroutine fil4(id1,n1,id2,n2)
integer*2 id1(n1)
integer*2 id2(*)
real t(NTAPS)
- data t/NTAPS*0.0/
! Filter coefficients:
real w(NTAPS)
@@ -33,7 +46,7 @@ subroutine fil4(id1,n1,id2,n2)
-0.013752163325,-0.011720748164,-0.005202883094, 0.002613872664, &
0.008706594219, 0.011363155076, 0.010161983649, 0.010051920210, &
0.000861074040/
- save w,t
+ save w
n2=n1/NDOWN
if(n2*NDOWN.ne.n1) stop 'Error in fil4'
@@ -46,4 +59,4 @@ subroutine fil4(id1,n1,id2,n2)
enddo
return
-end subroutine fil4
+end subroutine fil4_state