More code cleanup: silenced many g95 warning messages about variables "set

but not used".


git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/trunk@275 ab8295b8-cf94-4d9e-aec4-7959e3be5d79
This commit is contained in:
Joe Taylor 2006-09-06 19:51:52 +00:00
parent 8c9ed820c8
commit 9590ff5f43
25 changed files with 12 additions and 88 deletions

View File

@ -1,7 +1,7 @@
subroutine geodist(Eplat, Eplon, Stlat, Stlon, subroutine geodist(Eplat, Eplon, Stlat, Stlon,
+ Az, Baz, Dist) + Az, Baz, Dist)
implicit none implicit none
real eplat, eplon, stlat, stlon, az, baz, dist, deg real eplat, eplon, stlat, stlon, az, baz, dist
C JHT: In actual fact, I use the first two arguments for "My Location", C JHT: In actual fact, I use the first two arguments for "My Location",
C the second two for "His location"; West longitude is positive. C the second two for "His location"; West longitude is positive.
@ -68,7 +68,6 @@ c convert st/end pts to radians
FF64 = F * F / 64.0 FF64 = F * F / 64.0
Dist = AL*SD*(T -(F/4.0)*(T*X-Y)+FF64*(X*(A+(T-(A+E) Dist = AL*SD*(T -(F/4.0)*(T*X-Y)+FF64*(X*(A+(T-(A+E)
+ /2.0)*X)+Y*(-2.0*D+E*Y)+D*X*Y))/1000.0 + /2.0)*X)+Y*(-2.0*D+E*Y)+D*X*Y))/1000.0
Deg = Dist/111.195
TDLPM = Tan((DLR+(-((E*(4.0-X)+2.0*Y)*((F/2.0)*T+FF64* TDLPM = Tan((DLR+(-((E*(4.0-X)+2.0*Y)*((F/2.0)*T+FF64*
+ (32.0*T+(A-20.0*T)*X-2.0*(D+2.0)*Y))/4.0)*Tan(DLR)))/2.0) + (32.0*T+(A-20.0*T)*X-2.0*(D+2.0)*Y))/4.0)*Tan(DLR)))/2.0)
HAPBR = ATan2(SDTM,(CTM*TDLPM)) HAPBR = ATan2(SDTM,(CTM*TDLPM))
@ -77,8 +76,8 @@ c convert st/end pts to radians
A2M1 = Pi2 - HAMBR - HAPBR A2M1 = Pi2 - HAMBR - HAPBR
1 If ((A1M2 .ge. 0.0) .AND. (A1M2 .lt. Pi2)) GOTO 5 1 If ((A1M2 .ge. 0.0) .AND. (A1M2 .lt. Pi2)) GOTO 5
2 If (A1M2 .lt. Pi2) GOTO 4 If (A1M2 .lt. Pi2) GOTO 4
3 A1M2 = A1M2 - Pi2 A1M2 = A1M2 - Pi2
GOTO 1 GOTO 1
4 A1M2 = A1M2 + Pi2 4 A1M2 = A1M2 + Pi2
GOTO 1 GOTO 1
@ -87,8 +86,8 @@ c all of this gens the proper az, baz (forward and back azimuth)
c c
5 If ((A2M1 .ge. 0.0) .AND. (A2M1 .lt. Pi2)) GOTO 9 5 If ((A2M1 .ge. 0.0) .AND. (A2M1 .lt. Pi2)) GOTO 9
6 If (A2M1 .lt. Pi2) GOTO 8 If (A2M1 .lt. Pi2) GOTO 8
7 A2M1 = A2M1 - Pi2 A2M1 = A2M1 - Pi2
GOTO 5 GOTO 5
8 A2M1 = A2M1 + Pi2 8 A2M1 = A2M1 + Pi2
GOTO 5 GOTO 5

View File

@ -29,7 +29,6 @@
data rad/57.2957795130823d0/,twopi/6.28310530717959d0/ data rad/57.2957795130823d0/,twopi/6.28310530717959d0/
pi=0.5d0*twopi pi=0.5d0*twopi
pio2=0.5d0*pi
km=.true. km=.true.
dlat=lat4/rad dlat=lat4/rad
dlong1=lon4/rad dlong1=lon4/rad

13
astro.F
View File

@ -48,13 +48,6 @@ C NB: may want to smooth the Tsky map to 10 degrees or so.
call sun(nyear,month,nday,uth,lon,lat,RASun,DecSun,LST, call sun(nyear,month,nday,uth,lon,lat,RASun,DecSun,LST,
+ AzSun,ElSun,mjd) + AzSun,ElSun,mjd)
! If(NStation.eq.1 .and. ElSun.gt.-2.0) then
! arg=ElSun + 8.6/(ElSun+4.4)
! refraction=0.0167/tan(arg/rad) !Refraction in degrees
! ElSun=ElSun+refraction
! endif
mjd2=mjd
freq=nfreq*1.e6 freq=nfreq*1.e6
call MoonDop(nyear,month,nday,uth,lon,lat,RAMoon,DecMoon, call MoonDop(nyear,month,nday,uth,lon,lat,RAMoon,DecMoon,
@ -67,12 +60,6 @@ C Compute spatial polarization offset
if(NStation.eq.1) poloffset1=rad*atan2(yy,xx) if(NStation.eq.1) poloffset1=rad*atan2(yy,xx)
if(NStation.eq.2) poloffset2=rad*atan2(yy,xx) if(NStation.eq.2) poloffset2=rad*atan2(yy,xx)
! If(NStation.eq.1 .and. ElMoon.gt.-2.0) then
! arg=ElMoon + 8.6/(ElMoon+4.4)
! refraction=0.0167/tan(arg/rad) !Refraction in degrees
! ElMoon=ElMoon+refraction
! endif
techo=2.0 * dist/2.99792458e5 !Echo delay time techo=2.0 * dist/2.99792458e5 !Echo delay time
doppler=-freq*vr/2.99792458e5 !One-way Doppler doppler=-freq*vr/2.99792458e5 !One-way Doppler
t408=ftsky(ldeg,bdeg) !Read sky map t408=ftsky(ldeg,bdeg) !Read sky map

View File

@ -1,4 +1,3 @@
!--------------------------------------------------- astro0 !--------------------------------------------------- astro0
subroutine astro0(nyear,month,nday,uth8,nfreq,grid,cauxra,cauxdec, & subroutine astro0(nyear,month,nday,uth8,nfreq,grid,cauxra,cauxdec, &
AzSun8,ElSun8,AzMoon8,ElMoon8,AzMoonB8,ElMoonB8,ntsky,ndop,ndop00, & AzSun8,ElSun8,AzMoon8,ElMoon8,AzMoonB8,ElMoonB8,ntsky,ndop,ndop00, &

View File

@ -7,7 +7,6 @@ subroutine audio_init(ndin,ndout)
external a2d,decode1 external a2d,decode1
#endif #endif
integer brightness,contrast
include 'gcom1.f90' include 'gcom1.f90'
include 'gcom2.f90' include 'gcom2.f90'
@ -30,10 +29,6 @@ subroutine audio_init(ndin,ndout)
nmax=nbufs*nspb nmax=nbufs*nspb
nwave=60*nfsample nwave=60*nfsample
ngo=1 ngo=1
brightness=0
contrast=0
nsec=1
df=11025.0/4096
f0=800.0 f0=800.0
do i=1,nwave do i=1,nwave
iwave(i)=nint(32767.0*sin(6.283185307*i*f0/nfsample)) iwave(i)=nint(32767.0*sin(6.283185307*i*f0/nfsample))

3
bzap.f
View File

@ -45,8 +45,7 @@ C This is a kludge:
enddo enddo
enddo enddo
10 nzaps=izap 10 ia=70/df
ia=70/df
do i=1,ia do i=1,ia
c(i)=0. c(i)=0.
enddo enddo

View File

@ -69,8 +69,6 @@ subroutine decode1(iarg)
mode0=mode mode0=mode
endif endif
20 continue
#ifdef Win32 #ifdef Win32
call sleepqq(100) call sleepqq(100)
#else #else

View File

@ -1,4 +1,3 @@
!---------------------------------------------------- decode2 !---------------------------------------------------- decode2
subroutine decode2 subroutine decode2
@ -98,6 +97,6 @@ subroutine decode2
endif endif
fnameb=fnamea fnameb=fnamea
999 return return
end subroutine decode2 end subroutine decode2

View File

@ -26,7 +26,6 @@ subroutine decode3(d2,jz,istart,filename)
endif endif
if(mode.eq.'Echo') nmode=3 if(mode.eq.'Echo') nmode=3
if(mode.eq.'JT6M') nmode=4 if(mode.eq.'JT6M') nmode=4
mode441=1
sum=0. sum=0.
do i=1,jz do i=1,jz

View File

@ -43,13 +43,11 @@ C threshold. However, for the average message we want all FFTs computed.
call zero(ref,44) call zero(ref,44)
nh=256
nz=jz/512 - 1 nz=jz/512 - 1
fac=1.0/512.0 fac=1.0/512.0
do j=1,nz do j=1,nz
i0=512*(j-1) + 1 i0=512*(j-1) + 1
do i=0,511 do i=0,511
c fac=1.0/512.0 * abs(i-nh)/float(nh) !Window OK?
ct(i)=fac*c(i0+i) ct(i)=fac*c(i0+i)
enddo enddo
call four2a(ct,512,1,-1,1) call four2a(ct,512,1,-1,1)

View File

@ -17,10 +17,10 @@ subroutine fivehz
parameter (NTRING=64) parameter (NTRING=64)
real*8 tt1(0:NTRING-1) real*8 tt1(0:NTRING-1)
real*8 tstart,tstop,t60 real*8 tstart,tstop,t60
logical first,txtime,debug,filled logical first,txtime,filled
integer ptt integer ptt
integer TxOKz integer TxOKz
real*8 fs,fsample,tt,tt0,u real*8 fs,fsample,tt,u
include 'gcom1.f90' include 'gcom1.f90'
include 'gcom2.f90' include 'gcom2.f90'
data first/.true./,nc0/1/,nc1/1/ data first/.true./,nc0/1/,nc1/1/
@ -37,14 +37,11 @@ subroutine fivehz
first=.false. first=.false.
iptt=0 iptt=0
ntr0=-99 ntr0=-99
debug=.false.
rxdone=.false. rxdone=.false.
ibuf00=-99 ibuf00=-99
ncall=-1 ncall=-1
tt0=tt
u=0.05d0 u=0.05d0
fsample=11025.d0 fsample=11025.d0
maxms=0
mfsample=110250 mfsample=110250
filled=.false. filled=.false.
endif endif
@ -54,7 +51,6 @@ subroutine fivehz
! Measure average sampling frequency over a recent interval ! Measure average sampling frequency over a recent interval
ncall=ncall+1 ncall=ncall+1
if(ncall.eq.9) then if(ncall.eq.9) then
tt0=tt
ntt0=0 ntt0=0
ntt1=0 ntt1=0
tt1(ntt1)=tt tt1(ntt1)=tt
@ -199,7 +195,7 @@ subroutine fivehztx
parameter (NTRING=64) parameter (NTRING=64)
real*8 tt1(0:NTRING-1) real*8 tt1(0:NTRING-1)
logical first,filled logical first,filled
real*8 fs,fsample,tt,tt0,u real*8 fs,fsample,tt,u
include 'gcom1.f90' include 'gcom1.f90'
data first/.true./ data first/.true./
save save
@ -212,17 +208,14 @@ subroutine fivehztx
first=.false. first=.false.
ncall=-1 ncall=-1
fsample=11025.d0 fsample=11025.d0
nsec0=-999
u=0.05d0 u=0.05d0
mfsample2=110250 mfsample2=110250
tt0=tt
filled=.false. filled=.false.
endif endif
! Measure average sampling frequency over a recent interval ! Measure average sampling frequency over a recent interval
ncall=ncall+1 ncall=ncall+1
if(ncall.eq.9) then if(ncall.eq.9) then
tt0=tt
ntt0=0 ntt0=0
ntt1=0 ntt1=0
tt1(ntt1)=tt tt1(ntt1)=tt

View File

@ -41,7 +41,6 @@ C Set up necessary constants
dt=1.0/(samfac*11025.0) dt=1.0/(samfac*11025.0)
f0=118*11025.d0/1024 f0=118*11025.d0/1024
dfgen=mode65*11025.0/4096.0 dfgen=mode65*11025.0/4096.0
xn=0.
t=0.d0 t=0.d0
phi=0.d0 phi=0.d0
k=0 k=0

View File

@ -18,7 +18,6 @@
tdit=1.2d0/wpm !Key-down dit time, seconds tdit=1.2d0/wpm !Key-down dit time, seconds
dt=1.d0/(11025.d0*samfac) dt=1.d0/(11025.d0*samfac)
nwave=ndits*tdit/dt nwave=ndits*tdit/dt
k=0
pha=0. pha=0.
dpha=twopi*freqcw*dt dpha=twopi*freqcw*dt
t=0.d0 t=0.d0
@ -28,8 +27,6 @@
t=t+dt t=t+dt
pha=pha+dpha pha=pha+dpha
j=t/tdit + 1 j=t/tdit + 1
! iwave(k)=0
! if(idat(j).ne.0) iwave(i)=nint(32767.d0*sin(pha))
s=s + u*(idat(j)-s) s=s + u*(idat(j)-s)
iwave(i)=nint(s*32767.d0*sin(pha)) iwave(i)=nint(s*32767.d0*sin(pha))
enddo enddo

View File

@ -15,9 +15,7 @@ subroutine horizspec(x,brightness,contrast,a)
nfft=512 nfft=512
nq=nfft/4 nq=nfft/4
gain=50.0 * 3.0**(0.36+0.01*contrast) gain=50.0 * 3.0**(0.36+0.01*contrast)
gamma=1.3 + 0.01*contrast
offset=0.5*(brightness+30.0) offset=0.5*(brightness+30.0)
! offset=0.5*(brightness+60.0)
df=11025.0/512.0 df=11025.0/512.0
if(ntr.ne.ntr0) then if(ntr.ne.ntr0) then
if(lauto.eq.0 .or. ntr.eq.TxFirst) then if(lauto.eq.0 .or. ntr.eq.TxFirst) then
@ -30,9 +28,6 @@ subroutine horizspec(x,brightness,contrast,a)
i0=0 i0=0
do iter=1,5 do iter=1,5
if(nx.lt.750) nx=nx+1 if(nx.lt.750) nx=nx+1
if(nx.eq.1) then
t0curr=Tsec
endif
do i=1,nfft do i=1,nfft
y(i)=1.4*x(i+i0) y(i)=1.4*x(i+i0)
enddo enddo
@ -46,9 +41,7 @@ subroutine horizspec(x,brightness,contrast,a)
do i=21,120 do i=21,120
p=p+ss(i) p=p+ss(i)
n=0 n=0
! Use the gamma formula here!
if(ss(i).gt.0.) n=gain*log10(0.05*ss(i)) + offset if(ss(i).gt.0.) n=gain*log10(0.05*ss(i)) + offset
! if(ss(i).gt.0.) n=(0.2*ss(i))**gamma + offset
n=min(252,max(0,n)) n=min(252,max(0,n))
j=121-i j=121-i
a(nx,j)=n a(nx,j)=n

View File

@ -24,9 +24,7 @@ C Decode Multi-Tone FSK441 mesages.
nf1=-DFTolerance nf1=-DFTolerance
nf2=DFTolerance nf2=DFTolerance
msg3=' ' msg3=' '
nq=64
dt=1.0/11025.0 dt=1.0/11025.0
df=11025.0/256.0
C Find signal power at suitable intervals to search for pings. C Find signal power at suitable intervals to search for pings.
istep=221 istep=221
@ -137,7 +135,6 @@ C If it's the best ping yet, save the spectrum:
cf=' ' cf=' '
if(nline.le.99) nline=nline+1 if(nline.le.99) nline=nline+1
tping(nline)=tstart tping(nline)=tstart
snr=10.0*log10(10.0**(0.1*peak)-1.0)
write(line(nline),1050) cfile6,tstart,mswidth,int(peak), write(line(nline),1050) cfile6,tstart,mswidth,int(peak),
+ nwidth,nstrength,noffset,msg3,msg,cf + nwidth,nstrength,noffset,msg3,msg,cf
1050 format(a6,f5.1,i5,i3,1x,2i1,i5,1x,a3,1x,a40,1x,a1) 1050 format(a6,f5.1,i5,i3,1x,2i1,i5,1x,a3,1x,a40,1x,a1)

View File

@ -13,7 +13,6 @@ subroutine pix2d65(d2,jz)
nadd=nint(53.0*11025.0/500.0) nadd=nint(53.0*11025.0/500.0)
ngreen=min(jz/nadd,500) ngreen=min(jz/nadd,500)
k=0 k=0
j=0
do i=1,ngreen do i=1,ngreen
sq=0. sq=0.
do n=1,nadd do n=1,nadd

View File

@ -29,7 +29,6 @@ subroutine savedata
ibuf2=ibuf0-1 ibuf2=ibuf0-1
1 jza=2048*(ibuf2-ibuf1) 1 jza=2048*(ibuf2-ibuf1)
if(jza.lt.0) jza=jza+NRxMax if(jza.lt.0) jza=jza+NRxMax
lenok=1
if(jza.lt.110250) go to 999 !Don't save files less than 10 s if(jza.lt.110250) go to 999 !Don't save files less than 10 s
if(jza.gt.60*11025) go to 999 !Don't save if something's fishy if(jza.gt.60*11025) go to 999 !Don't save if something's fishy
k=2048*(ibuf1-1) k=2048*(ibuf1-1)
@ -127,7 +126,6 @@ subroutine savedata
999 if(mode(1:4).ne.'JT65') then 999 if(mode(1:4).ne.'JT65') then
ibuf0z=ibuf0 ibuf0z=ibuf0
ntime0=ntime
call get_fname(hiscall,ntime,trperiod,lauto,fname0) call get_fname(hiscall,ntime,trperiod,lauto,fname0)
endif endif

View File

@ -114,9 +114,7 @@ C Find strongest line in each of the 4 phases, repeating for each drift rate.
if(nstest.lt.0) nstest=0 if(nstest.lt.0) nstest=0
if(nstest.gt.10) nstest=10 if(nstest.gt.10) nstest=10
dfsh=nint(xdf) dfsh=nint(xdf)
fdotbest=fdotsh
iderrbest=iderr iderrbest=iderr
idiffbest=idiff
idriftbest=idrift idriftbest=idrift
snrdb=db(snr) - db(2500.0/df) - db(sqrt(nsteps/4.0))+1.8 snrdb=db(snr) - db(2500.0/df) - db(sqrt(nsteps/4.0))+1.8
n1=nbest n1=nbest

View File

@ -170,9 +170,7 @@ subroutine spec(brightness,contrast,logmap,ngain,nspeed,a)
smax=max(ss(2*i+i0),ss(2*i+i0-1)) smax=max(ss(2*i+i0),ss(2*i+i0-1))
a0(i)=5*smax/nsum a0(i)=5*smax/nsum
endif endif
xdb=-40. enddo
if(a0(i).gt.0.) xdb=10*log10(a0(i))
20 enddo
nsum=0 nsum=0
newdat=1 !Flag for new spectrum available newdat=1 !Flag for new spectrum available
do i=1,nh !Zero the accumulating array do i=1,nh !Zero the accumulating array

View File

@ -26,7 +26,6 @@ C Peak up in frequency and time, and compute ftrack.
call ftpeak65(dat,jz,istart,f0,flip,pr,nafc,ftrack) call ftpeak65(dat,jz,istart,f0,flip,pr,nafc,ftrack)
nfft=2048/mode65 !Size of FFTs nfft=2048/mode65 !Size of FFTs
nh=nfft/2
dt=2.0/11025.0 dt=2.0/11025.0
df=0.5*11025.0/nfft df=0.5*11025.0/nfft
call zero(ps,77) call zero(ps,77)

View File

@ -43,7 +43,6 @@ C second best peak (excluding points around the first peak).
do i=ia,ib do i=ia,ib
if((abs(i-ipk).gt.iwidth) .and. s2(i,j).gt.smax2) then if((abs(i-ipk).gt.iwidth) .and. s2(i,j).gt.smax2) then
smax2=s2(i,j) smax2=s2(i,j)
ipk2=i
endif endif
enddo enddo

View File

@ -52,9 +52,6 @@ C Find the best frequency channel for CCF
ib=fb/df ib=fb/df
i0=nint(1270.46/df) i0=nint(1270.46/df)
ired0=ia-i0
ired1=ib-i0
lag1=-5 lag1=-5
lag2=59 lag2=59
syncbest=-1.e30 syncbest=-1.e30
@ -77,7 +74,6 @@ C Find the best sync value
ipk2=i ipk2=i
lagpk2=lagpk0 lagpk2=lagpk0
syncbest2=sync syncbest2=sync
flippk2=flip
endif endif
C We are most interested if snrx will be more than -30 dB. C We are most interested if snrx will be more than -30 dB.
@ -86,7 +82,6 @@ C We are most interested if snrx will be more than -30 dB.
ipk=i ipk=i
lagpk=lagpk0 lagpk=lagpk0
syncbest=sync syncbest=sync
flippk=flip
endif endif
endif endif
enddo enddo
@ -96,7 +91,6 @@ C If we found nothing with snrx > -30 dB, take the best sync that *was* found.
ipk=ipk2 ipk=ipk2
lagpk=lagpk2 lagpk=lagpk2
syncbest=syncbest2 syncbest=syncbest2
flippk=flippk2
endif endif
C Peak up in frequency to fraction of channel C Peak up in frequency to fraction of channel
@ -166,10 +160,6 @@ C Compute width of sync tone to outermost -3 dB points
width=df*width width=df*width
width=max(0.0,min(99.0,width)) width=max(0.0,min(99.0,width))
ic=600/df
nn=1800/df
nred=448
return return
end end

View File

@ -37,23 +37,18 @@
real yellow(216) real yellow(216)
real yellow0(216) real yellow0(216)
real fzap(200) real fzap(200)
integer resample integer resample
real*8 samfacin,samratio real*8 samfacin,samratio
real dat2(NP2) real dat2(NP2)
integer*1 dtmp
character msg3*3 character msg3*3
character cfile6*6 character cfile6*6
logical lcum logical lcum
integer indx(100) integer indx(100)
character*90 line character*90 line
common/avecom/dat(NP2),labdat,jza,modea common/avecom/dat(NP2),labdat,jza,modea
common/ccom/nline,tping(100),line(100) common/ccom/nline,tping(100),line(100)
common/limcom/ nslim2a common/limcom/ nslim2a
common/clipcom/ nclip common/clipcom/ nclip
equivalence (dtmp,ntmp)
save save
lcum=.true. lcum=.true.

View File

@ -55,13 +55,11 @@ C already been done.
C Attempt to synchronize: look for sync tone, get DF and DT. C Attempt to synchronize: look for sync tone, get DF and DT.
call sync65(dat,npts,DFTolerance,NFreeze,MouseDF, call sync65(dat,npts,DFTolerance,NFreeze,MouseDF,
+ mode65,dtx,dfx,snrx,snrsync,ccfblue,ccfred,flip,width) + mode65,dtx,dfx,snrx,snrsync,ccfblue,ccfred,flip,width)
f0=1270.46 + dfx
csync=' ' csync=' '
decoded=' ' decoded=' '
deepmsg=' ' deepmsg=' '
special=' ' special=' '
cooo=' ' cooo=' '
itry=0
ncount=-1 !Flag for RS decode of current record ncount=-1 !Flag for RS decode of current record
ncount1=-1 !Flag for RS Decode of ave1 ncount1=-1 !Flag for RS Decode of ave1
ncount2=-1 !Flag for RS Decode of ave2 ncount2=-1 !Flag for RS Decode of ave2
@ -204,7 +202,7 @@ C If Monitor segment #2 is available, write that line also
write(12,1011) ave2 write(12,1011) ave2
call flushqqq(12) call flushqqq(12)
800 if(lumsg.ne.6) end file 11 if(lumsg.ne.6) end file 11
900 continue 900 continue

View File

@ -200,7 +200,6 @@ subroutine wsjtgen
k=0 k=0
df=11025.0/NSPD df=11025.0/NSPD
do m=1,ndits do m=1,ndits
j=itone(m)
freq=(LTone-1+itone(m))*df freq=(LTone-1+itone(m))*df
dpha=twopi*freq*dt dpha=twopi*freq*dt
do i=1,NSPD do i=1,NSPD