mirror of
https://github.com/saitohirga/WSJT-X.git
synced 2024-11-22 12:23:37 -05:00
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:
parent
8c9ed820c8
commit
9590ff5f43
11
GeoDist.f
11
GeoDist.f
@ -1,7 +1,7 @@
|
||||
subroutine geodist(Eplat, Eplon, Stlat, Stlon,
|
||||
+ Az, Baz, Dist)
|
||||
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 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
|
||||
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
|
||||
Deg = Dist/111.195
|
||||
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)
|
||||
HAPBR = ATan2(SDTM,(CTM*TDLPM))
|
||||
@ -77,8 +76,8 @@ c convert st/end pts to radians
|
||||
A2M1 = Pi2 - HAMBR - HAPBR
|
||||
|
||||
1 If ((A1M2 .ge. 0.0) .AND. (A1M2 .lt. Pi2)) GOTO 5
|
||||
2 If (A1M2 .lt. Pi2) GOTO 4
|
||||
3 A1M2 = A1M2 - Pi2
|
||||
If (A1M2 .lt. Pi2) GOTO 4
|
||||
A1M2 = A1M2 - Pi2
|
||||
GOTO 1
|
||||
4 A1M2 = A1M2 + Pi2
|
||||
GOTO 1
|
||||
@ -87,8 +86,8 @@ c all of this gens the proper az, baz (forward and back azimuth)
|
||||
c
|
||||
|
||||
5 If ((A2M1 .ge. 0.0) .AND. (A2M1 .lt. Pi2)) GOTO 9
|
||||
6 If (A2M1 .lt. Pi2) GOTO 8
|
||||
7 A2M1 = A2M1 - Pi2
|
||||
If (A2M1 .lt. Pi2) GOTO 8
|
||||
A2M1 = A2M1 - Pi2
|
||||
GOTO 5
|
||||
8 A2M1 = A2M1 + Pi2
|
||||
GOTO 5
|
||||
|
@ -29,7 +29,6 @@
|
||||
data rad/57.2957795130823d0/,twopi/6.28310530717959d0/
|
||||
|
||||
pi=0.5d0*twopi
|
||||
pio2=0.5d0*pi
|
||||
km=.true.
|
||||
dlat=lat4/rad
|
||||
dlong1=lon4/rad
|
||||
|
13
astro.F
13
astro.F
@ -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,
|
||||
+ 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
|
||||
|
||||
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.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
|
||||
doppler=-freq*vr/2.99792458e5 !One-way Doppler
|
||||
t408=ftsky(ldeg,bdeg) !Read sky map
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
!--------------------------------------------------- astro0
|
||||
subroutine astro0(nyear,month,nday,uth8,nfreq,grid,cauxra,cauxdec, &
|
||||
AzSun8,ElSun8,AzMoon8,ElMoon8,AzMoonB8,ElMoonB8,ntsky,ndop,ndop00, &
|
||||
|
@ -7,7 +7,6 @@ subroutine audio_init(ndin,ndout)
|
||||
external a2d,decode1
|
||||
#endif
|
||||
|
||||
integer brightness,contrast
|
||||
include 'gcom1.f90'
|
||||
include 'gcom2.f90'
|
||||
|
||||
@ -30,10 +29,6 @@ subroutine audio_init(ndin,ndout)
|
||||
nmax=nbufs*nspb
|
||||
nwave=60*nfsample
|
||||
ngo=1
|
||||
brightness=0
|
||||
contrast=0
|
||||
nsec=1
|
||||
df=11025.0/4096
|
||||
f0=800.0
|
||||
do i=1,nwave
|
||||
iwave(i)=nint(32767.0*sin(6.283185307*i*f0/nfsample))
|
||||
|
3
bzap.f
3
bzap.f
@ -45,8 +45,7 @@ C This is a kludge:
|
||||
enddo
|
||||
enddo
|
||||
|
||||
10 nzaps=izap
|
||||
ia=70/df
|
||||
10 ia=70/df
|
||||
do i=1,ia
|
||||
c(i)=0.
|
||||
enddo
|
||||
|
@ -69,8 +69,6 @@ subroutine decode1(iarg)
|
||||
mode0=mode
|
||||
endif
|
||||
|
||||
20 continue
|
||||
|
||||
#ifdef Win32
|
||||
call sleepqq(100)
|
||||
#else
|
||||
|
@ -1,4 +1,3 @@
|
||||
|
||||
!---------------------------------------------------- decode2
|
||||
subroutine decode2
|
||||
|
||||
@ -98,6 +97,6 @@ subroutine decode2
|
||||
endif
|
||||
fnameb=fnamea
|
||||
|
||||
999 return
|
||||
return
|
||||
|
||||
end subroutine decode2
|
||||
|
@ -26,7 +26,6 @@ subroutine decode3(d2,jz,istart,filename)
|
||||
endif
|
||||
if(mode.eq.'Echo') nmode=3
|
||||
if(mode.eq.'JT6M') nmode=4
|
||||
mode441=1
|
||||
|
||||
sum=0.
|
||||
do i=1,jz
|
||||
|
@ -43,13 +43,11 @@ C threshold. However, for the average message we want all FFTs computed.
|
||||
|
||||
call zero(ref,44)
|
||||
|
||||
nh=256
|
||||
nz=jz/512 - 1
|
||||
fac=1.0/512.0
|
||||
do j=1,nz
|
||||
i0=512*(j-1) + 1
|
||||
do i=0,511
|
||||
c fac=1.0/512.0 * abs(i-nh)/float(nh) !Window OK?
|
||||
ct(i)=fac*c(i0+i)
|
||||
enddo
|
||||
call four2a(ct,512,1,-1,1)
|
||||
|
13
fivehz.F90
13
fivehz.F90
@ -17,10 +17,10 @@ subroutine fivehz
|
||||
parameter (NTRING=64)
|
||||
real*8 tt1(0:NTRING-1)
|
||||
real*8 tstart,tstop,t60
|
||||
logical first,txtime,debug,filled
|
||||
logical first,txtime,filled
|
||||
integer ptt
|
||||
integer TxOKz
|
||||
real*8 fs,fsample,tt,tt0,u
|
||||
real*8 fs,fsample,tt,u
|
||||
include 'gcom1.f90'
|
||||
include 'gcom2.f90'
|
||||
data first/.true./,nc0/1/,nc1/1/
|
||||
@ -37,14 +37,11 @@ subroutine fivehz
|
||||
first=.false.
|
||||
iptt=0
|
||||
ntr0=-99
|
||||
debug=.false.
|
||||
rxdone=.false.
|
||||
ibuf00=-99
|
||||
ncall=-1
|
||||
tt0=tt
|
||||
u=0.05d0
|
||||
fsample=11025.d0
|
||||
maxms=0
|
||||
mfsample=110250
|
||||
filled=.false.
|
||||
endif
|
||||
@ -54,7 +51,6 @@ subroutine fivehz
|
||||
! Measure average sampling frequency over a recent interval
|
||||
ncall=ncall+1
|
||||
if(ncall.eq.9) then
|
||||
tt0=tt
|
||||
ntt0=0
|
||||
ntt1=0
|
||||
tt1(ntt1)=tt
|
||||
@ -199,7 +195,7 @@ subroutine fivehztx
|
||||
parameter (NTRING=64)
|
||||
real*8 tt1(0:NTRING-1)
|
||||
logical first,filled
|
||||
real*8 fs,fsample,tt,tt0,u
|
||||
real*8 fs,fsample,tt,u
|
||||
include 'gcom1.f90'
|
||||
data first/.true./
|
||||
save
|
||||
@ -212,17 +208,14 @@ subroutine fivehztx
|
||||
first=.false.
|
||||
ncall=-1
|
||||
fsample=11025.d0
|
||||
nsec0=-999
|
||||
u=0.05d0
|
||||
mfsample2=110250
|
||||
tt0=tt
|
||||
filled=.false.
|
||||
endif
|
||||
|
||||
! Measure average sampling frequency over a recent interval
|
||||
ncall=ncall+1
|
||||
if(ncall.eq.9) then
|
||||
tt0=tt
|
||||
ntt0=0
|
||||
ntt1=0
|
||||
tt1(ntt1)=tt
|
||||
|
1
gen65.f
1
gen65.f
@ -41,7 +41,6 @@ C Set up necessary constants
|
||||
dt=1.0/(samfac*11025.0)
|
||||
f0=118*11025.d0/1024
|
||||
dfgen=mode65*11025.0/4096.0
|
||||
xn=0.
|
||||
t=0.d0
|
||||
phi=0.d0
|
||||
k=0
|
||||
|
@ -18,7 +18,6 @@
|
||||
tdit=1.2d0/wpm !Key-down dit time, seconds
|
||||
dt=1.d0/(11025.d0*samfac)
|
||||
nwave=ndits*tdit/dt
|
||||
k=0
|
||||
pha=0.
|
||||
dpha=twopi*freqcw*dt
|
||||
t=0.d0
|
||||
@ -28,8 +27,6 @@
|
||||
t=t+dt
|
||||
pha=pha+dpha
|
||||
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)
|
||||
iwave(i)=nint(s*32767.d0*sin(pha))
|
||||
enddo
|
||||
|
@ -15,9 +15,7 @@ subroutine horizspec(x,brightness,contrast,a)
|
||||
nfft=512
|
||||
nq=nfft/4
|
||||
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+60.0)
|
||||
df=11025.0/512.0
|
||||
if(ntr.ne.ntr0) then
|
||||
if(lauto.eq.0 .or. ntr.eq.TxFirst) then
|
||||
@ -30,9 +28,6 @@ subroutine horizspec(x,brightness,contrast,a)
|
||||
i0=0
|
||||
do iter=1,5
|
||||
if(nx.lt.750) nx=nx+1
|
||||
if(nx.eq.1) then
|
||||
t0curr=Tsec
|
||||
endif
|
||||
do i=1,nfft
|
||||
y(i)=1.4*x(i+i0)
|
||||
enddo
|
||||
@ -46,9 +41,7 @@ subroutine horizspec(x,brightness,contrast,a)
|
||||
do i=21,120
|
||||
p=p+ss(i)
|
||||
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=(0.2*ss(i))**gamma + offset
|
||||
n=min(252,max(0,n))
|
||||
j=121-i
|
||||
a(nx,j)=n
|
||||
|
@ -24,9 +24,7 @@ C Decode Multi-Tone FSK441 mesages.
|
||||
nf1=-DFTolerance
|
||||
nf2=DFTolerance
|
||||
msg3=' '
|
||||
nq=64
|
||||
dt=1.0/11025.0
|
||||
df=11025.0/256.0
|
||||
|
||||
C Find signal power at suitable intervals to search for pings.
|
||||
istep=221
|
||||
@ -137,7 +135,6 @@ C If it's the best ping yet, save the spectrum:
|
||||
cf=' '
|
||||
if(nline.le.99) nline=nline+1
|
||||
tping(nline)=tstart
|
||||
snr=10.0*log10(10.0**(0.1*peak)-1.0)
|
||||
write(line(nline),1050) cfile6,tstart,mswidth,int(peak),
|
||||
+ nwidth,nstrength,noffset,msg3,msg,cf
|
||||
1050 format(a6,f5.1,i5,i3,1x,2i1,i5,1x,a3,1x,a40,1x,a1)
|
||||
|
@ -13,7 +13,6 @@ subroutine pix2d65(d2,jz)
|
||||
nadd=nint(53.0*11025.0/500.0)
|
||||
ngreen=min(jz/nadd,500)
|
||||
k=0
|
||||
j=0
|
||||
do i=1,ngreen
|
||||
sq=0.
|
||||
do n=1,nadd
|
||||
|
@ -29,7 +29,6 @@ subroutine savedata
|
||||
ibuf2=ibuf0-1
|
||||
1 jza=2048*(ibuf2-ibuf1)
|
||||
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.gt.60*11025) go to 999 !Don't save if something's fishy
|
||||
k=2048*(ibuf1-1)
|
||||
@ -127,7 +126,6 @@ subroutine savedata
|
||||
|
||||
999 if(mode(1:4).ne.'JT65') then
|
||||
ibuf0z=ibuf0
|
||||
ntime0=ntime
|
||||
call get_fname(hiscall,ntime,trperiod,lauto,fname0)
|
||||
endif
|
||||
|
||||
|
@ -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.gt.10) nstest=10
|
||||
dfsh=nint(xdf)
|
||||
fdotbest=fdotsh
|
||||
iderrbest=iderr
|
||||
idiffbest=idiff
|
||||
idriftbest=idrift
|
||||
snrdb=db(snr) - db(2500.0/df) - db(sqrt(nsteps/4.0))+1.8
|
||||
n1=nbest
|
||||
|
4
spec.f90
4
spec.f90
@ -170,9 +170,7 @@ subroutine spec(brightness,contrast,logmap,ngain,nspeed,a)
|
||||
smax=max(ss(2*i+i0),ss(2*i+i0-1))
|
||||
a0(i)=5*smax/nsum
|
||||
endif
|
||||
xdb=-40.
|
||||
if(a0(i).gt.0.) xdb=10*log10(a0(i))
|
||||
20 enddo
|
||||
enddo
|
||||
nsum=0
|
||||
newdat=1 !Flag for new spectrum available
|
||||
do i=1,nh !Zero the accumulating array
|
||||
|
@ -26,7 +26,6 @@ C Peak up in frequency and time, and compute ftrack.
|
||||
call ftpeak65(dat,jz,istart,f0,flip,pr,nafc,ftrack)
|
||||
|
||||
nfft=2048/mode65 !Size of FFTs
|
||||
nh=nfft/2
|
||||
dt=2.0/11025.0
|
||||
df=0.5*11025.0/nfft
|
||||
call zero(ps,77)
|
||||
|
@ -43,7 +43,6 @@ C second best peak (excluding points around the first peak).
|
||||
do i=ia,ib
|
||||
if((abs(i-ipk).gt.iwidth) .and. s2(i,j).gt.smax2) then
|
||||
smax2=s2(i,j)
|
||||
ipk2=i
|
||||
endif
|
||||
enddo
|
||||
|
||||
|
10
sync65.f
10
sync65.f
@ -52,9 +52,6 @@ C Find the best frequency channel for CCF
|
||||
ib=fb/df
|
||||
|
||||
i0=nint(1270.46/df)
|
||||
ired0=ia-i0
|
||||
ired1=ib-i0
|
||||
|
||||
lag1=-5
|
||||
lag2=59
|
||||
syncbest=-1.e30
|
||||
@ -77,7 +74,6 @@ C Find the best sync value
|
||||
ipk2=i
|
||||
lagpk2=lagpk0
|
||||
syncbest2=sync
|
||||
flippk2=flip
|
||||
endif
|
||||
|
||||
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
|
||||
lagpk=lagpk0
|
||||
syncbest=sync
|
||||
flippk=flip
|
||||
endif
|
||||
endif
|
||||
enddo
|
||||
@ -96,7 +91,6 @@ C If we found nothing with snrx > -30 dB, take the best sync that *was* found.
|
||||
ipk=ipk2
|
||||
lagpk=lagpk2
|
||||
syncbest=syncbest2
|
||||
flippk=flippk2
|
||||
endif
|
||||
|
||||
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=max(0.0,min(99.0,width))
|
||||
|
||||
ic=600/df
|
||||
nn=1800/df
|
||||
nred=448
|
||||
|
||||
return
|
||||
end
|
||||
|
||||
|
5
wsjt1.F
5
wsjt1.F
@ -37,23 +37,18 @@
|
||||
real yellow(216)
|
||||
real yellow0(216)
|
||||
real fzap(200)
|
||||
|
||||
integer resample
|
||||
real*8 samfacin,samratio
|
||||
real dat2(NP2)
|
||||
|
||||
integer*1 dtmp
|
||||
character msg3*3
|
||||
character cfile6*6
|
||||
logical lcum
|
||||
integer indx(100)
|
||||
character*90 line
|
||||
|
||||
common/avecom/dat(NP2),labdat,jza,modea
|
||||
common/ccom/nline,tping(100),line(100)
|
||||
common/limcom/ nslim2a
|
||||
common/clipcom/ nclip
|
||||
equivalence (dtmp,ntmp)
|
||||
save
|
||||
|
||||
lcum=.true.
|
||||
|
4
wsjt65.f
4
wsjt65.f
@ -55,13 +55,11 @@ C already been done.
|
||||
C Attempt to synchronize: look for sync tone, get DF and DT.
|
||||
call sync65(dat,npts,DFTolerance,NFreeze,MouseDF,
|
||||
+ mode65,dtx,dfx,snrx,snrsync,ccfblue,ccfred,flip,width)
|
||||
f0=1270.46 + dfx
|
||||
csync=' '
|
||||
decoded=' '
|
||||
deepmsg=' '
|
||||
special=' '
|
||||
cooo=' '
|
||||
itry=0
|
||||
ncount=-1 !Flag for RS decode of current record
|
||||
ncount1=-1 !Flag for RS Decode of ave1
|
||||
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
|
||||
call flushqqq(12)
|
||||
|
||||
800 if(lumsg.ne.6) end file 11
|
||||
if(lumsg.ne.6) end file 11
|
||||
|
||||
900 continue
|
||||
|
||||
|
@ -200,7 +200,6 @@ subroutine wsjtgen
|
||||
k=0
|
||||
df=11025.0/NSPD
|
||||
do m=1,ndits
|
||||
j=itone(m)
|
||||
freq=(LTone-1+itone(m))*df
|
||||
dpha=twopi*freq*dt
|
||||
do i=1,NSPD
|
||||
|
Loading…
Reference in New Issue
Block a user