2007-06-26 16:04:39 -04:00
|
|
|
subroutine map65a(newdat)
|
2007-01-12 12:57:41 -05:00
|
|
|
|
|
|
|
! Processes timf2 data from Linrad to find and decode JT65 signals.
|
|
|
|
|
|
|
|
parameter (MAXMSG=1000) !Size of decoded message list
|
|
|
|
real tavg(-50:50) !Temp for finding local base level
|
|
|
|
real base(4) !Local basel level at 4 pol'ns
|
|
|
|
real tmp (200) !Temp storage for pctile sorting
|
|
|
|
real sig(MAXMSG,30) !Parameters of detected signals
|
|
|
|
real a(5)
|
|
|
|
character*22 msg(MAXMSG)
|
2008-09-11 12:10:55 -04:00
|
|
|
character*3 shmsg0(4)
|
2007-01-12 12:57:41 -05:00
|
|
|
integer indx(MAXMSG),nsiz(MAXMSG)
|
|
|
|
logical done(MAXMSG)
|
2007-01-13 19:44:34 -05:00
|
|
|
character decoded*22,blank*22
|
2007-06-29 10:45:15 -04:00
|
|
|
include 'spcom.f90'
|
|
|
|
real short(3,NFFT) !SNR dt ipol for potential shorthands
|
2007-07-12 10:25:08 -04:00
|
|
|
real qphi(12)
|
2007-06-28 20:21:31 -04:00
|
|
|
include 'gcom2.f90'
|
2007-06-29 10:45:15 -04:00
|
|
|
include 'datcom.f90'
|
2007-01-12 12:57:41 -05:00
|
|
|
data blank/' '/
|
|
|
|
data shmsg0/'ATT','RO ','RRR','73 '/
|
2007-10-24 15:46:45 -04:00
|
|
|
data nfile/0/,nutc0/-999/,nid/0/,ip000/1/,ip001/1/,mousefqso0/-999/
|
2007-01-12 16:31:16 -05:00
|
|
|
save
|
2007-01-12 12:57:41 -05:00
|
|
|
|
2007-10-24 15:46:45 -04:00
|
|
|
if(mousefqso.ne.mousefqso0 .and. nagain.eq.1) newspec=2
|
|
|
|
mousefqso0=mousefqso
|
2008-07-22 20:16:16 -04:00
|
|
|
nfoffset=nint(1000*(fcenter-144.125d0))
|
|
|
|
mfqso=mousefqso - nfoffset
|
2007-10-24 15:46:45 -04:00
|
|
|
|
2007-01-12 16:31:16 -05:00
|
|
|
rewind 11
|
|
|
|
rewind 12
|
2007-07-04 13:44:39 -04:00
|
|
|
if(nrw26.ne.0) then
|
|
|
|
endfile (26) !Compiler bug? Don't write "end file 26" !!!
|
|
|
|
rewind 26
|
|
|
|
nrw26=0
|
|
|
|
endif
|
2007-07-03 14:58:29 -04:00
|
|
|
|
2007-12-21 13:40:47 -05:00
|
|
|
#ifdef CVF
|
2007-07-05 12:08:20 -04:00
|
|
|
open(23,file='CALL3.TXT',status='unknown',share='denynone')
|
|
|
|
#else
|
|
|
|
open(23,file='CALL3.TXT',status='unknown')
|
|
|
|
#endif
|
|
|
|
|
2007-01-13 19:44:34 -05:00
|
|
|
if(nutc.ne.nutc0) nfile=nfile+1
|
|
|
|
nutc0=nutc
|
2007-10-24 13:39:52 -04:00
|
|
|
df=96000.0/NFFT !df = 96000/NFFT = 2.930 Hz
|
2007-01-12 12:57:41 -05:00
|
|
|
ftol=0.020 !Frequency tolerance (kHz)
|
2007-07-09 12:14:00 -04:00
|
|
|
foffset=0.001*(1270 + nfcal)
|
2008-07-22 20:16:16 -04:00
|
|
|
fselect=mfqso + foffset
|
2007-07-09 12:14:00 -04:00
|
|
|
dphi=idphi/57.2957795
|
2007-07-11 15:47:36 -04:00
|
|
|
|
|
|
|
do i=12,3,-1
|
|
|
|
if(hiscall(i:i).ne.' ') go to 1
|
|
|
|
enddo
|
|
|
|
i=0
|
|
|
|
1 len_hiscall=i
|
|
|
|
|
2007-07-09 12:14:00 -04:00
|
|
|
iloop=0
|
2007-07-11 15:47:36 -04:00
|
|
|
2 if(ndphi.eq.1) dphi=30*iloop/57.2957795
|
2007-06-28 11:14:35 -04:00
|
|
|
do nqd=1,0,-1
|
2007-10-24 13:39:52 -04:00
|
|
|
if(nqd.eq.1) then !Quick decode, at fQSO
|
2007-06-28 14:34:13 -04:00
|
|
|
fa=1000.0*(fselect+0.001*mousedf-100.0) - dftolerance
|
2007-10-24 15:10:35 -04:00
|
|
|
fb=1000.0*(fselect+0.001*mousedf-100.0) + dftolerance + 4*53.8330078
|
2007-06-28 11:14:35 -04:00
|
|
|
ia=nint((fa+23000.0)/df + 1.0) ! 23000 = 48000 - 25000
|
|
|
|
ib=nint((fb+23000.0)/df + 1.0)
|
2007-10-24 13:39:52 -04:00
|
|
|
else !Wideband decode at all freqs
|
2007-07-09 12:14:00 -04:00
|
|
|
fa=1000*(nfa-100)
|
|
|
|
fb=1000*(nfb-100)
|
2007-06-28 11:14:35 -04:00
|
|
|
ia=nint((fa+23000.0)/df + 1.0) ! 23000 = 48000 - 25000
|
|
|
|
ib=nint((fb+23000.0)/df + 1.0)
|
|
|
|
endif
|
2007-06-26 16:04:39 -04:00
|
|
|
|
2007-06-29 14:34:26 -04:00
|
|
|
km=0
|
|
|
|
nkm=1
|
2007-06-28 11:14:35 -04:00
|
|
|
nz=n/8
|
2007-01-12 12:57:41 -05:00
|
|
|
|
2007-06-28 11:14:35 -04:00
|
|
|
do i=1,NFFT
|
|
|
|
short(1,i)=0.
|
|
|
|
short(2,i)=0.
|
|
|
|
short(3,i)=0.
|
|
|
|
enddo
|
2007-01-12 12:57:41 -05:00
|
|
|
|
2007-06-28 11:14:35 -04:00
|
|
|
freq0=-999.
|
|
|
|
sync10=-999.
|
|
|
|
fshort0=-999.
|
|
|
|
sync20=-999.
|
|
|
|
ntry=0
|
|
|
|
do i=ia,ib !Search over freq range
|
2007-06-28 21:01:20 -04:00
|
|
|
call sleep_msec(0)
|
2007-06-28 11:14:35 -04:00
|
|
|
freq=0.001*((i-1)*df - 23000) + 100.0
|
2007-01-12 12:57:41 -05:00
|
|
|
! Find the local base level for each polarization; update every 10 bins.
|
2007-06-28 11:14:35 -04:00
|
|
|
if(mod(i-ia,10).eq.0) then
|
|
|
|
do jp=1,4
|
|
|
|
do ii=-50,50
|
|
|
|
tavg(ii)=savg(jp,i+ii)
|
|
|
|
enddo
|
|
|
|
call pctile(tavg,tmp,101,50,base(jp))
|
2007-01-12 12:57:41 -05:00
|
|
|
enddo
|
2007-12-28 17:05:12 -05:00
|
|
|
bmax=max(base(1),base(2),base(3),base(4))
|
2007-06-28 11:14:35 -04:00
|
|
|
endif
|
2007-01-12 12:57:41 -05:00
|
|
|
|
2007-12-28 17:05:12 -05:00
|
|
|
! Do not process extremely strong signals
|
2008-09-10 09:24:57 -04:00
|
|
|
if(nqd.eq.0 .and. bmax.gt.1000.0) go to 70
|
2007-12-28 17:05:12 -05:00
|
|
|
|
2007-01-12 12:57:41 -05:00
|
|
|
! Find max signal at this frequency
|
2007-06-28 11:14:35 -04:00
|
|
|
smax=0.
|
|
|
|
do jp=1,4
|
|
|
|
if(savg(jp,i)/base(jp).gt.smax) smax=savg(jp,i)/base(jp)
|
|
|
|
enddo
|
2007-01-12 12:57:41 -05:00
|
|
|
|
2007-06-28 11:14:35 -04:00
|
|
|
if(smax.gt.1.1) then
|
|
|
|
ntry=ntry+1
|
2007-01-12 12:57:41 -05:00
|
|
|
! Look for JT65 sync patterns and shorthand square-wave patterns.
|
2007-06-29 10:45:15 -04:00
|
|
|
call ccf65(ss(1,1,i),nhsym,sync1,ipol,dt,flipk, &
|
2007-06-28 11:14:35 -04:00
|
|
|
syncshort,snr2,ipol2,dt2)
|
2007-01-12 12:57:41 -05:00
|
|
|
|
2007-07-03 12:53:28 -04:00
|
|
|
! ########################### Search for Shorthand Messages #################
|
2007-01-12 12:57:41 -05:00
|
|
|
! Is there a shorthand tone above threshold?
|
2007-12-28 15:23:42 -05:00
|
|
|
thresh0=1.0
|
|
|
|
! Use lower thresh0 at fQSO
|
|
|
|
if(nqd.eq.1 .and. dftolerance.le.100) thresh0=0.
|
2007-07-18 10:13:16 -04:00
|
|
|
|
2007-12-28 15:23:42 -05:00
|
|
|
if(syncshort.gt.thresh0) then
|
2007-01-12 12:57:41 -05:00
|
|
|
! ### Do shorthand AFC here (or maybe after finding a pair?) ###
|
2007-06-28 11:14:35 -04:00
|
|
|
short(1,i)=syncshort
|
|
|
|
short(2,i)=dt2
|
|
|
|
short(3,i)=ipol2
|
2007-01-12 12:57:41 -05:00
|
|
|
! Check to see if lower tone of shorthand pair was found.
|
2007-06-28 11:14:35 -04:00
|
|
|
do j=2,4
|
|
|
|
i0=i-nint(j*53.8330078/df)
|
2007-01-12 12:57:41 -05:00
|
|
|
! Should this be i0 +/- 1, or just i0?
|
|
|
|
! Should we also insist that difference in DT be either 1.5 or -1.5 s?
|
2007-06-28 11:14:35 -04:00
|
|
|
if(short(1,i0).gt.1.0) then
|
|
|
|
fshort=0.001*((i0-1)*df - 23000) + 100.0
|
2007-01-12 12:57:41 -05:00
|
|
|
|
2007-12-28 15:23:42 -05:00
|
|
|
noffset=0
|
|
|
|
if(nqd.eq.1) noffset=nint(1000.0* &
|
2008-07-22 20:16:16 -04:00
|
|
|
(fshort-foffset-mfqso)-mousedf)
|
2007-12-28 15:23:42 -05:00
|
|
|
if(abs(noffset).le.dftolerance) then
|
2007-01-12 12:57:41 -05:00
|
|
|
! Keep only the best candidate within ftol.
|
2007-07-04 13:44:39 -04:00
|
|
|
!### NB: sync2 was not defined here!
|
2007-12-28 15:23:42 -05:00
|
|
|
sync2=syncshort !### try this ???
|
|
|
|
if(fshort-fshort0.le.ftol .and. sync2.gt.sync20 &
|
|
|
|
.and. nkm.eq.2) km=km-1
|
|
|
|
if(fshort-fshort0.gt.ftol .or. &
|
|
|
|
sync2.gt.sync20) then
|
|
|
|
km=km+1
|
|
|
|
sig(km,1)=nfile
|
|
|
|
sig(km,2)=nutc
|
|
|
|
sig(km,3)=fshort
|
|
|
|
sig(km,4)=syncshort
|
|
|
|
sig(km,5)=dt2
|
|
|
|
sig(km,6)=45*(ipol2-1)/57.2957795
|
|
|
|
sig(km,7)=0
|
|
|
|
sig(km,8)=snr2
|
|
|
|
sig(km,9)=0
|
|
|
|
sig(km,10)=0
|
2007-06-29 14:34:26 -04:00
|
|
|
! sig(km,11)=rms0
|
2007-12-28 15:23:42 -05:00
|
|
|
sig(km,12)=savg(ipol2,i)
|
|
|
|
sig(km,13)=0
|
|
|
|
sig(km,14)=0
|
|
|
|
sig(km,15)=0
|
|
|
|
sig(km,16)=0
|
2007-06-29 14:34:26 -04:00
|
|
|
! sig(km,17)=0
|
2007-12-28 15:23:42 -05:00
|
|
|
sig(km,18)=0
|
|
|
|
msg(km)=shmsg0(j)
|
|
|
|
fshort0=fshort
|
|
|
|
sync20=sync2
|
|
|
|
nkm=2
|
|
|
|
endif
|
2007-06-28 11:14:35 -04:00
|
|
|
endif
|
2007-01-12 12:57:41 -05:00
|
|
|
endif
|
2007-06-28 11:14:35 -04:00
|
|
|
enddo
|
|
|
|
endif
|
2007-07-03 12:53:28 -04:00
|
|
|
|
|
|
|
! ########################### Search for Normal Messages ###########
|
2007-01-12 12:57:41 -05:00
|
|
|
! Is sync1 above threshold?
|
2007-10-24 13:39:52 -04:00
|
|
|
thresh1=1.0
|
2007-12-28 15:23:42 -05:00
|
|
|
! Use lower thresh1 at fQSO
|
|
|
|
if(nqd.eq.1 .and. dftolerance.le.100) thresh1=0.
|
|
|
|
noffset=0
|
2008-07-22 20:16:16 -04:00
|
|
|
if(nqd.eq.1) noffset=nint(1000.0*(freq-foffset-mfqso)-mousedf)
|
2007-12-28 15:23:42 -05:00
|
|
|
if(sync1.gt.thresh1 .and. abs(noffset).le.dftolerance) then
|
2007-01-12 12:57:41 -05:00
|
|
|
! Keep only the best candidate within ftol.
|
2007-07-03 12:53:28 -04:00
|
|
|
! (Am I deleting any good decodes by doing this?)
|
2007-07-03 15:47:14 -04:00
|
|
|
if(freq-freq0.le.ftol .and. sync1.gt.sync10 .and. &
|
2007-07-09 15:27:58 -04:00
|
|
|
nkm.eq.1) km=km-1
|
|
|
|
if(freq-freq0.gt.ftol .or. sync1.gt.sync10) then
|
2007-06-28 11:14:35 -04:00
|
|
|
nflip=nint(flipk)
|
2008-09-11 11:41:05 -04:00
|
|
|
call decode1a(id(1,1,kbuf),newdat,freq,nflip, &
|
2007-07-11 15:47:36 -04:00
|
|
|
mycall,hiscall,hisgrid,neme,ndepth,nqd,dphi,ndphi, &
|
2007-06-28 11:14:35 -04:00
|
|
|
ipol,sync2,a,dt,pol,nkv,nhist,qual,decoded)
|
2007-07-11 15:47:36 -04:00
|
|
|
|
|
|
|
! If hiscall or hisgrid is in decoded message, save the pol'n angle.
|
|
|
|
i1=index(decoded,hiscall(1:len_hiscall))
|
|
|
|
i2=index(decoded,hisgrid(1:4))
|
|
|
|
if(i1.ge.5 .or. i2.ge.9) then
|
|
|
|
nhispol=nint(57.2957795*pol)
|
|
|
|
endif
|
2007-06-29 14:34:26 -04:00
|
|
|
km=km+1
|
|
|
|
sig(km,1)=nfile
|
|
|
|
sig(km,2)=nutc
|
|
|
|
sig(km,3)=freq
|
|
|
|
sig(km,4)=sync1
|
|
|
|
sig(km,5)=dt
|
|
|
|
sig(km,6)=pol
|
|
|
|
sig(km,7)=flipk
|
|
|
|
sig(km,8)=sync2
|
|
|
|
sig(km,9)=nkv
|
|
|
|
sig(km,10)=qual
|
2007-07-09 12:14:00 -04:00
|
|
|
! sig(km,11)=idphi
|
2007-06-29 14:34:26 -04:00
|
|
|
sig(km,12)=savg(ipol,i)
|
|
|
|
sig(km,13)=a(1)
|
|
|
|
sig(km,14)=a(2)
|
|
|
|
sig(km,15)=a(3)
|
|
|
|
sig(km,16)=a(4)
|
|
|
|
! sig(km,17)=a(5)
|
|
|
|
sig(km,18)=nhist
|
|
|
|
msg(km)=decoded
|
2007-06-28 11:14:35 -04:00
|
|
|
freq0=freq
|
|
|
|
sync10=sync1
|
2007-06-29 14:34:26 -04:00
|
|
|
nkm=1
|
2007-06-28 11:14:35 -04:00
|
|
|
endif
|
2007-01-12 12:57:41 -05:00
|
|
|
endif
|
|
|
|
endif
|
2007-12-28 17:05:12 -05:00
|
|
|
70 continue
|
2007-06-28 11:14:35 -04:00
|
|
|
enddo
|
|
|
|
if(nqd.eq.1) then
|
2007-06-28 21:01:20 -04:00
|
|
|
nwrite=0
|
2007-06-29 14:34:26 -04:00
|
|
|
do k=1,km
|
2007-06-28 14:34:13 -04:00
|
|
|
decoded=msg(k)
|
|
|
|
if(decoded.ne.' ') then
|
|
|
|
nutc=sig(k,2)
|
|
|
|
freq=sig(k,3)
|
|
|
|
sync1=sig(k,4)
|
|
|
|
dt=sig(k,5)
|
|
|
|
npol=nint(57.2957795*sig(k,6))
|
|
|
|
flip=sig(k,7)
|
|
|
|
sync2=sig(k,8)
|
|
|
|
nkv=sig(k,9)
|
|
|
|
nqual=sig(k,10)
|
2007-07-09 12:14:00 -04:00
|
|
|
! idphi=nint(sig(k,11))
|
2007-06-28 14:34:13 -04:00
|
|
|
if(flip.lt.0.0) then
|
|
|
|
do i=22,1,-1
|
|
|
|
if(decoded(i:i).ne.' ') go to 8
|
|
|
|
enddo
|
|
|
|
stop 'Error in message format'
|
|
|
|
8 if(i.le.18) decoded(i+2:i+4)='OOO'
|
2007-06-28 11:14:35 -04:00
|
|
|
endif
|
2008-07-12 14:11:36 -04:00
|
|
|
nkHz=nint(freq-foffset) + nfoffset
|
2007-06-28 14:34:13 -04:00
|
|
|
f0=144.0+0.001*nkHz
|
2008-07-22 20:16:16 -04:00
|
|
|
ndf=nint(1000.0*(freq-foffset-nkHz+nfoffset))
|
2007-12-28 15:23:42 -05:00
|
|
|
|
2007-06-28 14:34:13 -04:00
|
|
|
! ndf0=nint(a(1))
|
|
|
|
! ndf1=nint(a(2))
|
|
|
|
! ndf2=nint(a(3))
|
|
|
|
nsync1=sync1
|
|
|
|
nsync2=nint(10.0*log10(sync2)) - 40 !### empirical ###
|
2007-10-24 13:39:52 -04:00
|
|
|
if(decoded(1:4).eq.'RO ' .or. decoded(1:4).eq.'RRR ' .or. &
|
|
|
|
decoded(1:4).eq.'73 ') nsync2=nsync2-6
|
2007-06-28 21:01:20 -04:00
|
|
|
nwrite=nwrite+1
|
2007-07-09 15:27:58 -04:00
|
|
|
if(ndphi.eq.0) then
|
|
|
|
write(11,1010) nkHz,ndf,npol,nutc,dt,nsync2,decoded,nkv,nqual
|
|
|
|
1010 format(i3,i5,i4,i5.4,f5.1,i4,2x,a22,i5,i4,i4)
|
|
|
|
else
|
2007-07-12 12:09:28 -04:00
|
|
|
if(iloop.ge.1) qphi(iloop)=sig(k,10)
|
2007-07-09 15:27:58 -04:00
|
|
|
write(11,1010) nkHz,ndf,npol,nutc,dt,nsync2,decoded,nkv, &
|
|
|
|
nqual,30*iloop
|
|
|
|
write(27,1011) 30*iloop,nkHz,ndf,npol,nutc, &
|
|
|
|
dt,sync2,nkv,nqual,decoded
|
|
|
|
1011 format(i3,i4,i5,i4,i5.4,f5.1,f7.1,i3,i5,2x,a22)
|
|
|
|
endif
|
2007-06-28 14:34:13 -04:00
|
|
|
endif
|
|
|
|
enddo
|
2007-06-28 21:01:20 -04:00
|
|
|
if(nwrite.eq.0) then
|
2008-07-22 20:16:16 -04:00
|
|
|
nfqso=mfqso + nfoffset
|
2008-07-12 14:11:36 -04:00
|
|
|
write(11,1012) nfqso,nutc
|
2007-07-09 15:27:58 -04:00
|
|
|
1012 format(i3,9x,i5.4)
|
2007-06-28 21:01:20 -04:00
|
|
|
endif
|
|
|
|
|
2007-01-12 16:31:16 -05:00
|
|
|
endif
|
2007-07-09 12:14:00 -04:00
|
|
|
if(ndphi.eq.1 .and.iloop.lt.12) then
|
|
|
|
iloop=iloop+1
|
2007-07-11 15:47:36 -04:00
|
|
|
go to 2
|
2007-07-09 12:14:00 -04:00
|
|
|
endif
|
2007-07-12 10:25:08 -04:00
|
|
|
if(ndphi.eq.1 .and.iloop.eq.12) call getdphi(qphi)
|
2007-07-09 20:15:11 -04:00
|
|
|
if(nqd.eq.1) then
|
|
|
|
write(11,*) '$EOF'
|
|
|
|
call flushqqq(11)
|
|
|
|
ndecdone=1
|
|
|
|
endif
|
2007-06-28 11:14:35 -04:00
|
|
|
if(nagain.eq.1) go to 999
|
2007-01-12 16:31:16 -05:00
|
|
|
enddo
|
2007-01-12 12:57:41 -05:00
|
|
|
|
|
|
|
! Trim the list and produce a sorted index and sizes of groups.
|
|
|
|
! (Should trimlist remove all but best SNR for given UTC and message content?)
|
2007-06-29 14:34:26 -04:00
|
|
|
call trimlist(sig,km,indx,nsiz,nz)
|
2007-01-12 12:57:41 -05:00
|
|
|
|
2007-06-29 14:34:26 -04:00
|
|
|
do i=1,km
|
2007-01-12 16:31:16 -05:00
|
|
|
done(i)=.false.
|
|
|
|
enddo
|
|
|
|
j=0
|
|
|
|
ilatest=-1
|
|
|
|
do n=1,nz
|
|
|
|
ifile0=0
|
|
|
|
do m=1,nsiz(n)
|
|
|
|
i=indx(j+m)
|
|
|
|
ifile=sig(i,1)
|
|
|
|
if(ifile.gt.ifile0 .and.msg(i).ne.blank) then
|
|
|
|
ilatest=i
|
|
|
|
ifile0=ifile
|
|
|
|
endif
|
2007-01-12 12:57:41 -05:00
|
|
|
enddo
|
2007-01-12 16:31:16 -05:00
|
|
|
i=ilatest
|
2007-01-13 19:44:34 -05:00
|
|
|
|
2007-01-12 16:31:16 -05:00
|
|
|
if(i.ge.1) then
|
|
|
|
if(.not.done(i)) then
|
|
|
|
done(i)=.true.
|
|
|
|
nutc=sig(i,2)
|
|
|
|
freq=sig(i,3)
|
|
|
|
sync1=sig(i,4)
|
|
|
|
dt=sig(i,5)
|
|
|
|
npol=nint(57.2957795*sig(i,6))
|
|
|
|
flip=sig(i,7)
|
|
|
|
sync2=sig(i,8)
|
|
|
|
nkv=sig(i,9)
|
|
|
|
nqual=min(sig(i,10),10.0)
|
2007-01-12 12:57:41 -05:00
|
|
|
! rms0=sig(i,11)
|
2007-01-12 16:31:16 -05:00
|
|
|
do k=1,5
|
|
|
|
a(k)=sig(i,12+k)
|
|
|
|
enddo
|
|
|
|
nhist=sig(i,18)
|
|
|
|
decoded=msg(i)
|
|
|
|
|
|
|
|
if(flip.lt.0.0) then
|
|
|
|
do i=22,1,-1
|
|
|
|
if(decoded(i:i).ne.' ') go to 10
|
2007-01-12 12:57:41 -05:00
|
|
|
enddo
|
2007-01-12 16:31:16 -05:00
|
|
|
stop 'Error in message format'
|
|
|
|
10 if(i.le.18) decoded(i+2:i+4)='OOO'
|
|
|
|
endif
|
2008-07-12 14:11:36 -04:00
|
|
|
nkHz=nint(freq-foffset) + nfoffset
|
2007-01-12 16:31:16 -05:00
|
|
|
f0=144.0+0.001*nkHz
|
2008-07-22 20:16:16 -04:00
|
|
|
ndf=nint(1000.0*(freq-foffset-nkHz+nfoffset))
|
2007-01-12 16:31:16 -05:00
|
|
|
ndf0=nint(a(1))
|
|
|
|
ndf1=nint(a(2))
|
|
|
|
ndf2=nint(a(3))
|
|
|
|
nsync1=sync1
|
|
|
|
nsync2=nint(10.0*log10(sync2)) - 40 !### empirical ###
|
2007-07-04 13:44:39 -04:00
|
|
|
if(decoded(1:4).eq.'RO ' .or. decoded(1:4).eq.'RRR ' .or. &
|
|
|
|
decoded(1:4).eq.'73 ') nsync2=nsync2-6
|
2007-01-12 16:31:16 -05:00
|
|
|
write(26,1014) f0,ndf,ndf0,ndf1,ndf2,dt,npol,nsync1, &
|
|
|
|
nsync2,nutc,decoded,nkv,nqual,nhist
|
2007-06-24 19:26:17 -04:00
|
|
|
write(21,1014) f0,ndf,ndf0,ndf1,ndf2,dt,npol,nsync1, &
|
|
|
|
nsync2,nutc,decoded,nkv,nqual,nhist
|
2007-01-12 16:31:16 -05:00
|
|
|
1014 format(f7.3,i5,3i3,f5.1,i5,i3,i4,i5.4,2x,a22,3i3)
|
2007-01-12 12:57:41 -05:00
|
|
|
|
|
|
|
endif
|
2007-01-12 16:31:16 -05:00
|
|
|
endif
|
|
|
|
j=j+nsiz(n)
|
2007-01-12 12:57:41 -05:00
|
|
|
enddo
|
2007-07-10 12:02:04 -04:00
|
|
|
write(26,1015) nutc
|
|
|
|
1015 format(39x,i4.4)
|
|
|
|
call flushqqq(26)
|
2007-07-10 12:35:52 -04:00
|
|
|
call display(nkeep,ncsmin)
|
2007-01-13 19:44:34 -05:00
|
|
|
ndecdone=2
|
2007-06-25 16:18:43 -04:00
|
|
|
|
2008-09-18 10:58:59 -04:00
|
|
|
if(nsave.gt.0 .and. ndiskdat.eq.0) call savetf2(id(1,1,kbuf), &
|
|
|
|
fnamedate,savedir)
|
2007-07-09 16:36:44 -04:00
|
|
|
|
2007-07-03 10:50:03 -04:00
|
|
|
999 close(23)
|
2007-07-09 12:14:00 -04:00
|
|
|
ndphi=0
|
2007-06-29 14:34:26 -04:00
|
|
|
if(kbuf.eq.1) kkdone=60*96000
|
2007-06-30 10:28:31 -04:00
|
|
|
if(kbuf.eq.2 .or. ndiskdat.eq.1) kkdone=0
|
2007-06-29 14:34:26 -04:00
|
|
|
kk=kkdone
|
2007-07-03 10:50:03 -04:00
|
|
|
nagain=0
|
|
|
|
|
2007-06-21 13:38:30 -04:00
|
|
|
return
|
2007-01-12 12:57:41 -05:00
|
|
|
end subroutine map65a
|