summaryrefslogtreecommitdiff
path: root/map65/libm65/trimlist.f90
diff options
context:
space:
mode:
authorChristoph Berg <myon@debian.org>2021-09-09 22:49:00 +0200
committerChristoph Berg <myon@debian.org>2021-09-09 22:49:00 +0200
commit85895feeaf88bcde26bbfc71e8f6b2047c0f5f41 (patch)
tree79807e00771e4af4ce279e368262f2222806102f /map65/libm65/trimlist.f90
parent2f095a04ed69d9aa14b47dc4acde6b3225b2d65e (diff)
New upstream version 2.5.0~rc6+repackupstream/2.5.0_rc6+repack
Diffstat (limited to 'map65/libm65/trimlist.f90')
-rw-r--r--map65/libm65/trimlist.f9028
1 files changed, 28 insertions, 0 deletions
diff --git a/map65/libm65/trimlist.f90 b/map65/libm65/trimlist.f90
new file mode 100644
index 00000000..9e8a36e6
--- /dev/null
+++ b/map65/libm65/trimlist.f90
@@ -0,0 +1,28 @@
+subroutine trimlist(sig,km,ftol,indx,nsiz,nz)
+
+ parameter (MAXMSG=1000) !Size of decoded message list
+ real sig(MAXMSG,30)
+ integer indx(MAXMSG),nsiz(MAXMSG)
+
+! 1 2 3 4 5 6 7 8
+! nfile nutc freq snr dt ipol flip sync
+
+ call indexx(sig(1,3),km,indx) !Sort list by frequency
+
+ n=1
+ i0=1
+ do i=2,km
+ j0=indx(i-1)
+ j=indx(i)
+ if(sig(j,3)-sig(j0,3).gt.ftol) then
+ nsiz(n)=i-i0
+ i0=i
+ n=n+1
+ endif
+ enddo
+ nz=n
+ nsiz(nz)=km+1-i0
+ nsiz(nz+1)=-1
+
+ return
+end subroutine trimlist