From a51df664707f51377e66f47b1555f6bd58604c9e Mon Sep 17 00:00:00 2001 From: Joe Taylor Date: Mon, 10 Apr 2006 20:43:44 +0000 Subject: [PATCH] fivehz.F90: increased txdelay and fixed a T/R timing bug. deep65.f: detect logical end of data in CALL3.TXT astro.f: remove refraction adjustments from sun/moon elevation MoonDop.f: fixed 100 s offset in epoch of moon Az/El wsjt.py: Increased text height for CW mode git-svn-id: svn+ssh://svn.code.sf.net/p/wsjt/wsjt/trunk@156 ab8295b8-cf94-4d9e-aec4-7959e3be5d79 --- MoonDop.f | 4 ++-- astro.F | 20 ++++++++++---------- deep65.F | 7 ++----- fivehz.F90 | 37 +++++++++++++++++++++---------------- wsjt.py | 2 +- wsjtrc.win | 6 +++--- 6 files changed, 39 insertions(+), 37 deletions(-) diff --git a/MoonDop.f b/MoonDop.f index bef0f73f7..49ae97bad 100644 --- a/MoonDop.f +++ b/MoonDop.f @@ -43,11 +43,11 @@ C NB: geodetic latitude used here, but geocentric latitude used when C determining Earth-rotation contribution to Doppler. call moon2(nyear,month,nDay,UT-dt/3600.d0,dlong1*rad,dlat*rad, - + RA,Dec,topRA,topDec,LST,HA,Az,El,dist) + + RA,Dec,topRA,topDec,LST,HA,Az0,El0,dist) call toxyz(RA/rad,Dec/rad,dist,rme0) !Convert to rectangular coords call moon2(nyear,month,nDay,UT,dlong1*rad,dlat*rad, - + RA,Dec,topRA,topDec,LST,HA,Az0,El0,dist) + + RA,Dec,topRA,topDec,LST,HA,Az,El,dist) call toxyz(RA/rad,Dec/rad,dist,rme) !Convert to rectangular coords phi=LST*twopi/24.d0 diff --git a/astro.F b/astro.F index 992582658..a6b2ebc61 100644 --- a/astro.F +++ b/astro.F @@ -52,11 +52,11 @@ 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 +! 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 @@ -71,11 +71,11 @@ 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 +! 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 diff --git a/deep65.F b/deep65.F index 8a084297b..9a6c63676 100644 --- a/deep65.F +++ b/deep65.F @@ -42,12 +42,9 @@ if(ichar(grid(3:3)).eq.0) grid(3:3)=' ' if(ichar(grid(4:4)).eq.0) grid(4:4)=' ' else -C read(23,'A80',END=20) line !FIXME: Segfault happened here. - read(23,1002,end=20) line !FIXME: Segfault happened here. + read(23,1002,end=20) line 1002 format (A80) -C Probably due to line only being 80 chars long, and the read not -C limiting the read. -C 1002 format(A80) + if(line(1:4).eq.'ZZZZ') go to 20 if(line(1:2).eq.'//') go to 10 i1=index(line,',') if(i1.lt.4) go to 10 diff --git a/fivehz.F90 b/fivehz.F90 index 8bcd53857..53ba447e1 100644 --- a/fivehz.F90 +++ b/fivehz.F90 @@ -30,7 +30,7 @@ subroutine fivehz if(first) then rxdelay=0.2 - txdelay=0.2 + txdelay=0.4 tlatency=1.0 first=.false. iptt=0 @@ -63,7 +63,8 @@ subroutine fivehz tx2=trperiod-(tlatency+txdelay) !Time to turn TX off if(mode(1:4).eq.'JT65') then if(nwave.lt.126*4096) nwave=126*4096 - tx2=nwave/11025.0 + tlatency + tx2=txdelay + nwave/11025.0 + if(tx2.gt.(trperiod-2.0)) tx2=trperiod-tlatency-1.0 endif if(TxFirst.eq.0) then @@ -120,15 +121,14 @@ subroutine fivehz ! If PTT was just raised, start a countdown for raising TxOK: nc1a=txdelay/0.18576 if(nc1a.lt.2) nc1a=2 - if(mode(1:4).eq.'JT65') nc1a=2 !No extra delay for JT65 - if(iptt.eq.1 .and. iptt0.eq.0) nc1=-nc1a + if(iptt.eq.1 .and. iptt0.eq.0) nc1=-nc1a-1 if(nc1.le.0) nc1=nc1+1 if(nc1.eq.0) TxOK=1 ! We are transmitting ! If TxOK was just lowered, start a countdown for lowering PTT: nc0a=(tlatency+txdelay)/0.18576 - if(nc0a.lt.4) nc0a=4 - if(TxOK.eq.0 .and. TxOKz.eq.1 .and. iptt.eq.1) nc0=-nc0a + if(nc0a.lt.5) nc0a=5 + if(TxOK.eq.0 .and. TxOKz.eq.1 .and. iptt.eq.1) nc0=-nc0a-1 if(nc0.le.0) nc0=nc0+1 if(nc0.eq.0) i3=ptt(nport,0,iptt) @@ -146,18 +146,23 @@ subroutine fivehz ibuf00=ibuf0 endif -! if(ndebug.ne.0) then -! t60=mod(tsec,60.d0) -! if(iptt.ne.iptt0) then -! if(iptt.eq.1) tstart=tsec -! if(iptt.eq.0) write(*,1101) tsec-tstop,t60,t,tx1,tx2 -!1101 format('Delay1:',2f7.2,3f10.1) +! Diagnostic timing information: +! t60=mod(tsec,60.d0) +! t120=mod(tsec,120.d0) +! if(TxOK.ne.TxOKz) then +! if(TxOK.eq.1) write(*,1101) 'D2:',t120,t +!1101 format(a3,2f8.1,i8) +! if(TxOK.eq.0) then +! tstop=tsec +! write(*,1101) 'D3:',t120,t,nc0a ! endif -! if(TxOK.ne.TxOKz) then -! if(TxOK.eq.0) tstop=tsec -! if(TxOK.eq.1) write(*,1102) tsec-tstart,t60,t,tx1,tx2 -!1102 format('Delay2:',2f7.2,3f10.1) +! endif +! if(iptt.ne.iptt0) then +! if(iptt.eq.1) then +! tstart=tsec +! write(*,1101) 'D1:',t120,t,nc1a ! endif +! if(iptt.eq.0) write(*,1101) 'D4:',t120,t ! endif iptt0=iptt diff --git a/wsjt.py b/wsjt.py index 1baed18e8..8660cc5a9 100644 --- a/wsjt.py +++ b/wsjt.py @@ -606,7 +606,7 @@ def ModeCW(event=NONE): mode.set("CW") Audio.gcom1.trperiod=ncwtrperiod iframe4b.pack_forget() - text.configure(height=1) + text.configure(height=9) bclravg.configure(state=DISABLED) binclude.configure(state=DISABLED) bexclude.configure(state=DISABLED) diff --git a/wsjtrc.win b/wsjtrc.win index 045f70637..878089ec8 100644 --- a/wsjtrc.win +++ b/wsjtrc.win @@ -1,6 +1,6 @@ -*font: Arial 8 -*Label*font: Arial 8 -*Text*font: "Courier New" 9 +*font: Arial 9 +*Label*font: Arial 9 +*Text*font: "Courier New" 10 *background: gray85 *Text*background: white *Entry*background: white