diff options
| author | Christoph Berg <myon@debian.org> | 2021-09-09 22:49:00 +0200 |
|---|---|---|
| committer | Christoph Berg <myon@debian.org> | 2021-09-09 22:49:00 +0200 |
| commit | 85895feeaf88bcde26bbfc71e8f6b2047c0f5f41 (patch) | |
| tree | 79807e00771e4af4ce279e368262f2222806102f /map65/libm65/dpol.f90 | |
| parent | 2f095a04ed69d9aa14b47dc4acde6b3225b2d65e (diff) | |
New upstream version 2.5.0~rc6+repackupstream/2.5.0_rc6+repack
Diffstat (limited to 'map65/libm65/dpol.f90')
| -rw-r--r-- | map65/libm65/dpol.f90 | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/map65/libm65/dpol.f90 b/map65/libm65/dpol.f90 new file mode 100644 index 00000000..3f8085c0 --- /dev/null +++ b/map65/libm65/dpol.f90 @@ -0,0 +1,41 @@ +real function dpol(mygrid,hisgrid) + +! Compute spatial polartzation offset in degrees for the present +! time, between two specified grid locators. + + character*6 MyGrid,HisGrid + real lat,lon,LST + character cdate*8,ctime2*10,czone*5 + integer it(8) + data rad/57.2957795/ + + call date_and_time(cdate,ctime2,czone,it) + nyear=it(1) + month=it(2) + nday=it(3) + nh=it(5)-it(4)/60 + nm=it(6) + ns=it(7) + uth=nh + nm/60.0 + ns/3600.0 + + call grid2deg(MyGrid,lon,lat) + call MoonDop(nyear,month,nday,uth,-lon,lat,RAMoon,DecMoon, & + LST,HA,AzMoon,ElMoon,vr,dist) + xx=sin(lat/rad)*cos(ElMoon/rad) - cos(lat/rad)* & + cos(AzMoon/rad)*sin(ElMoon/rad) + yy=cos(lat/rad)*sin(AzMoon/rad) + poloffset1=rad*atan2(yy,xx) + + call grid2deg(hisGrid,lon,lat) + call MoonDop(nyear,month,nday,uth,-lon,lat,RAMoon,DecMoon, & + LST,HA,AzMoon,ElMoon,vr,dist) + xx=sin(lat/rad)*cos(ElMoon/rad) - cos(lat/rad)* & + cos(AzMoon/rad)*sin(ElMoon/rad) + yy=cos(lat/rad)*sin(AzMoon/rad) + poloffset2=rad*atan2(yy,xx) + + dpol=mod(poloffset2-poloffset1+720.0,180.0) + if(dpol.gt.90.0) dpol=dpol-180.0 + + return +end function dpol |
