1program emedop
2
3  real*8 txfreq8
4  real*8 rxfreq8
5  real*4 LST
6  real*4 lat_a
7  real*4 lat_b
8  character*80 infile
9  character*256 jpleph_file_name
10  common/jplcom/jpleph_file_name
11  data jpleph_file_name/'JPLEPH'/
12
13  nargs=iargc()
14  if(nargs.ne.1) then
15     print*,'Usage: emedop <infile>'
16     go to 999
17  endif
18
19  call getarg(1,infile)
20  open(10,file=infile,status='old',err=900)
21  read(10,1001) lat_a
221001 format(10x,f12.0)
23  read(10,1001) wlon_a
24  read(10,1001) lat_b
25  read(10,1001) wlon_b
26  read(10,1001) txfreq8
27  read(10,1002) nyear,month,nday,ih,im,is
281002 format(10x,i4,2i2,1x,i2,1x,i2,1x,i2)
29  sec_start=3600.0*ih + 60.0*im + is
30  read(10,1002) nyear,month,nday,ih,im,is
31  sec_stop=3600.0*ih + 60.0*im + is
32  read(10,1001) sec_step
33
34  write(*,1005)
351005 format('  Date       UTC      Tx Freq      Rx Freq    Doppler'/    &
36            '------------------------------------------------------')
37
38  sec=sec_start
39  ncalc=(sec_stop - sec_start)/sec_step
40
41  do icalc=1,ncalc
42     uth=sec/3600.0
43     call MoonDopJPL(nyear,month,nday,uth,-wlon_a,lat_a,RAMoon,DecMoon,    &
44          LST,HA,AzMoon,ElMoon,vr_a,techo)
45
46     call MoonDopJPL(nyear,month,nday,uth,-wlon_b,lat_b,RAMoon,DecMoon,    &
47          LST,HA,AzMoon,ElMoon,vr_b,techo)
48
49     dop_a=-txfreq8*vr_a/2.99792458e5                 !One-way Doppler from a
50     dop_b=-txfreq8*vr_b/2.99792458e5                 !One-way Doppler to b
51     doppler=1.e6*(dop_a + dop_b)
52     rxfreq8=txfreq8 + dop_a + dop_b
53
54     ih=sec/3600.0
55     im=(sec-ih*3600.0)/60.0
56     is=nint(mod(sec,60.0))
57     write(*,1010) nyear,month,nday,ih,im,is,txFreq8,rxFreq8,doppler
581010 format(i4,2i2.2,2x,i2.2,':',i2.2,':',i2.2,2f13.7,f8.1)
59
60     sec=sec + sec_step
61  enddo
62  go to 999
63900 print*,'Cannot open file ',trim(infile)
64999 end program emedop
65
66
67
68