2007-01-15 08:31:50 -05:00
|
|
|
subroutine getfile2(fname,len)
|
|
|
|
|
2007-12-21 13:40:47 -05:00
|
|
|
#ifdef CVF
|
2007-01-15 08:31:50 -05:00
|
|
|
use dflib
|
|
|
|
#endif
|
|
|
|
|
|
|
|
character*(*) fname
|
2007-07-10 11:02:56 -04:00
|
|
|
real*8 sq
|
2007-06-21 13:38:30 -04:00
|
|
|
|
|
|
|
include 'datcom.f90'
|
2007-01-15 08:31:50 -05:00
|
|
|
include 'gcom1.f90'
|
|
|
|
include 'gcom2.f90'
|
|
|
|
include 'gcom4.f90'
|
|
|
|
|
|
|
|
1 if(ndecoding.eq.0) go to 2
|
2007-12-21 13:40:47 -05:00
|
|
|
#ifdef CVF
|
2007-01-15 08:31:50 -05:00
|
|
|
call sleepqq(100)
|
|
|
|
#else
|
|
|
|
call usleep(100*1000)
|
|
|
|
#endif
|
|
|
|
|
|
|
|
go to 1
|
|
|
|
|
|
|
|
2 do i=len,1,-1
|
|
|
|
if(fname(i:i).eq.'/' .or. fname(i:i).eq.'\\') go to 10
|
|
|
|
enddo
|
|
|
|
i=0
|
|
|
|
10 filename=fname(i+1:)
|
|
|
|
ierr=0
|
|
|
|
|
2007-06-13 13:05:57 -04:00
|
|
|
n=8*NSMAX
|
2007-06-30 16:22:12 -04:00
|
|
|
ndecoding=4
|
2007-06-21 14:21:21 -04:00
|
|
|
monitoring=0
|
|
|
|
kbuf=1
|
2007-12-28 12:33:18 -05:00
|
|
|
|
2007-01-15 08:31:50 -05:00
|
|
|
call rfile3a(fname,id,n,ierr)
|
|
|
|
if(ierr.ne.0) then
|
|
|
|
print*,'Error opening or reading file: ',fname,ierr
|
|
|
|
go to 999
|
|
|
|
endif
|
|
|
|
|
2007-07-10 11:02:56 -04:00
|
|
|
sq=0.
|
|
|
|
ka=0.1*NSMAX
|
|
|
|
kb=0.8*NSMAX
|
|
|
|
do k=ka,kb
|
2008-09-11 16:05:58 -04:00
|
|
|
sq=sq + float(int(id(1,k,1)))**2 + float(int(id(2,k,1)))**2 + &
|
|
|
|
float(int(id(3,k,1)))**2 + float(int(id(4,k,1)))**2
|
2007-07-10 11:02:56 -04:00
|
|
|
enddo
|
|
|
|
sqave=174*sq/(kb-ka+1)
|
|
|
|
rxnoise=10.0*log10(sqave) - 48.0
|
2008-09-19 13:25:58 -04:00
|
|
|
read(filename(8:11),*,err=20,end=20) nutc
|
|
|
|
go to 30
|
|
|
|
20 nutc=0
|
|
|
|
|
|
|
|
30 ndiskdat=1
|
2007-01-15 08:31:50 -05:00
|
|
|
mousebutton=0
|
|
|
|
|
2008-09-11 16:05:58 -04:00
|
|
|
999 return
|
2007-01-15 08:31:50 -05:00
|
|
|
end subroutine getfile2
|