2005-12-23 12:07:54 -05:00
|
|
|
subroutine decode1(iarg)
|
|
|
|
|
|
|
|
! Get data and parameters from gcom, then call the decoders when needed.
|
|
|
|
! This routine runs in a background thread and will never return.
|
|
|
|
|
|
|
|
#ifdef Win32
|
|
|
|
use dflib
|
|
|
|
#endif
|
|
|
|
|
2006-09-06 14:09:05 -04:00
|
|
|
character sending0*28,mode0*6,cshort*11
|
2005-12-23 12:07:54 -05:00
|
|
|
integer sendingsh0
|
2007-06-21 13:38:30 -04:00
|
|
|
|
|
|
|
include 'datcom.f90'
|
2007-06-20 11:43:35 -04:00
|
|
|
include 'gcom1.f90'
|
2005-12-23 12:07:54 -05:00
|
|
|
include 'gcom2.f90'
|
|
|
|
include 'gcom3.f90'
|
|
|
|
include 'gcom4.f90'
|
2007-11-01 15:03:01 -04:00
|
|
|
data kbuf0/0/,ns00/-999/
|
2005-12-23 12:07:54 -05:00
|
|
|
data sending0/' '/
|
|
|
|
save
|
|
|
|
|
2007-06-30 16:22:12 -04:00
|
|
|
kkdone=-99
|
2005-12-23 12:07:54 -05:00
|
|
|
ntr0=ntr
|
|
|
|
ns0=999999
|
|
|
|
|
|
|
|
10 continue
|
2007-01-13 19:44:34 -05:00
|
|
|
if(newdat2.gt.0) then
|
|
|
|
call getfile2(fname80,nlen)
|
2007-06-29 09:21:49 -04:00
|
|
|
newdat2=0
|
|
|
|
kbuf=1
|
|
|
|
kk=NSMAX
|
2007-06-30 10:28:31 -04:00
|
|
|
kkdone=0
|
2007-06-26 16:04:39 -04:00
|
|
|
newdat=1
|
2007-01-13 19:44:34 -05:00
|
|
|
endif
|
2007-06-28 11:14:35 -04:00
|
|
|
|
2007-11-02 16:05:44 -04:00
|
|
|
if(kbuf.ne.kbuf0) kkdone=0
|
2007-07-13 11:47:35 -04:00
|
|
|
kbuf0=kbuf
|
|
|
|
kkk=kk
|
|
|
|
if(kbuf.eq.2) kkk=kk-5760000
|
2007-11-02 10:50:18 -04:00
|
|
|
|
2007-11-01 15:03:01 -04:00
|
|
|
n=Tsec
|
2007-11-02 10:50:18 -04:00
|
|
|
if(ndebug.eq.2 .and. n.ne.ns00) then
|
2007-11-01 15:03:01 -04:00
|
|
|
write(29,3101) nutc,mod(n,60),ndiskdat,ndecoding,kbuf, &
|
|
|
|
newdat,kk,kkdone
|
|
|
|
3101 format('d1:',i5.4,i3.2,4i5,2i10)
|
|
|
|
ns00=n
|
|
|
|
endif
|
2007-11-02 10:50:18 -04:00
|
|
|
|
2007-11-01 15:03:01 -04:00
|
|
|
if((ndiskdat.eq.1 .or. ndecoding.eq.0) .and. ((kkk-kkdone).gt.32768)) then
|
|
|
|
call symspec(id,kbuf,kk,kkdone,nutc,newdat)
|
|
|
|
call sleep_msec(10)
|
|
|
|
endif
|
2007-06-28 11:14:35 -04:00
|
|
|
|
2007-06-26 10:20:11 -04:00
|
|
|
if(ndecoding.gt.0 .and. mode(1:4).eq.'JT65') then
|
2005-12-23 12:07:54 -05:00
|
|
|
ndecdone=0
|
2007-06-26 16:04:39 -04:00
|
|
|
call map65a(newdat)
|
2005-12-23 12:07:54 -05:00
|
|
|
if(mousebutton.eq.0) ndecoding0=ndecoding
|
|
|
|
ndecoding=0
|
|
|
|
endif
|
|
|
|
|
|
|
|
if(ns0.lt.0) then
|
|
|
|
rewind 21
|
|
|
|
ns0=999999
|
|
|
|
endif
|
|
|
|
if(n.lt.ns0 .and. utcdate(1:1).eq.'2') then
|
|
|
|
write(21,1001) utcdate(:11)
|
|
|
|
1001 format(/'UTC Date: ',a11/'---------------------')
|
|
|
|
ns0=n
|
|
|
|
endif
|
|
|
|
|
|
|
|
if(transmitting.eq.1 .and. (sending.ne.sending0 .or. &
|
|
|
|
sendingsh.ne.sendingsh0 .or. mode.ne.mode0)) then
|
|
|
|
ih=n/3600
|
|
|
|
im=mod(n/60,60)
|
|
|
|
is=mod(n,60)
|
|
|
|
cshort=' '
|
|
|
|
if(sendingsh.eq.1) cshort='(Shorthand)'
|
|
|
|
write(21,1010) ih,im,is,mode,sending,cshort
|
|
|
|
1010 format(3i2.2,' Transmitting: ',a6,2x,a28,2x,a11)
|
|
|
|
sending0=sending
|
|
|
|
sendingsh0=sendingsh
|
|
|
|
mode0=mode
|
|
|
|
endif
|
2007-06-28 21:01:20 -04:00
|
|
|
|
2007-11-01 15:03:01 -04:00
|
|
|
call sleep_msec(100) !### was 100
|
2007-06-28 21:01:20 -04:00
|
|
|
go to 10
|
|
|
|
|
|
|
|
end subroutine decode1
|