From ff5180d06713b8f015c9d11d19a64d13f1aedf97 Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Thu, 21 Jun 2007 18:59:43 +0000 Subject: [PATCH] Account for lost packets, substituting zeros. git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/branches/map65@399 ab8295b8-cf94-4d9e-aec4-7959e3be5d79 --- map65a.f90 | 11 ++--------- recvpkt.F90 | 15 +++++++++++---- 2 files changed, 13 insertions(+), 13 deletions(-) diff --git a/map65a.f90 b/map65a.f90 index 5b3147ac0..276b8ec20 100644 --- a/map65a.f90 +++ b/map65a.f90 @@ -24,9 +24,9 @@ subroutine map65a include 'gcom2.f90' save -! print*,'A',newdat2,nutc,nfile - if(newdat2.eq.0) newdat2=1 !### + print*,'nlost:',nlost + if(newdat2.eq.0) newdat2=1 !### if(newdat2.gt.0) nid=1 if(nid.eq.0) go to 999 rewind 11 @@ -70,15 +70,8 @@ subroutine map65a nfilt=2 !nfilt=2 is faster for selected freq freq=fselect dt=2.314240 !Not needed? -! print*,'B',newdat2,nfilt,freq,nflip,ip0 - - write(*,3001) newdat2,nfilt,nflip,ip0,freq, & - (id(1,i,kbuf),id(2,i,kbuf),id(3,i,kbuf),id(4,i,kbuf),i=1,2) - 3001 format(4i5,f10.3,8i5) - call decode1a(id(1,1,kbuf),newdat2,nfilt,freq,nflip,ip0,sync2, & a,dt,pol,nkv,nhist,qual,decoded) -! print*,'C',nkv,qual,decoded nsync1=0 nsync2=nint(10.0*log10(sync2)) - 40 !### empirical ### ndf=nint(a(1)) diff --git a/recvpkt.F90 b/recvpkt.F90 index 0a1de1782..4f5a56911 100644 --- a/recvpkt.F90 +++ b/recvpkt.F90 @@ -30,14 +30,19 @@ subroutine recvpkt(iarg) nsec0=-999 10 call recv_pkt(center_freq) - if((nblock-nblock0).ne.1 .and. .not.first) then - print*,'Lost packets?',nblock-nblock0,nblock,nblock0 + lost=nblock-nblock0-1 + if(lost.ne.0 .and. .not.first) then + print*,'Lost packets?',nblock,nblock0,lost + nlost=nlost + lost + do i=1,174*lost + k=k+1 + d8(k)=0 + enddo endif first=.false. nblock0=nblock if(monitoring.eq.1) then - nsec=msec/1000 if(mod(nsec,60).eq.1) nreset=1 if(mod(nsec,60).eq.0 .and. nreset.eq.1) then @@ -46,6 +51,7 @@ subroutine recvpkt(iarg) kb=3-kb k=0 if(kb.eq.2) k=NSZ + nlost=0 endif do i=1,174 @@ -64,9 +70,10 @@ subroutine recvpkt(iarg) nsec0=nsec endif - if(mod(nsec,60).eq.59) then + if(mod(nsec,60).eq.52) then kbuf=kb nutc=mutc + klost=nlost ndecoding=1 endif endif