Go to the documentation of this file. 1 subroutine sunangs(iyr,iday,gmt,xlon,ylat,sunz,suna)
14 real suni(3),sung(3),up(3),no(3),ea(3)
16 real*8 sec,gha,ghar,day
17 common /gconst/
pi,radeg,
re,rem,
f,
omf2,omegae
23 call sun2000(iyr,iday,sec,suni,rs)
26 day = iday + sec/86400.0d0
31 sung(1) = suni(1)*cos(ghar) + suni(2)*sin(ghar)
32 sung(2) = suni(2)*cos(ghar) - suni(1)*sin(ghar)
48 upxy = sqrt(up(1)*up(1)+up(2)*up(2))
51 no(1) = up(2)*ea(3) - up(3)*ea(2)
52 no(2) = up(3)*ea(1) - up(1)*ea(3)
53 no(3) = up(1)*ea(2) - up(2)*ea(1)
61 sunv = sunv + sung(j)*up(j)
62 sunn = sunn + sung(j)*no(j)
63 sune = sune + sung(j)*ea(j)
67 sunz = radeg*atan2(sqrt(sunn*sunn+sune*sune),sunv)
69 if (sunz .gt. 0.05d0)
then
70 suna = radeg*atan2(sune,sunn)
74 if (suna .lt. 0.0d0)suna = suna + 360.0d0
subroutine sunangs(iyr, iday, gmt, xlon, ylat, sunz, suna)
int sun2000(size_t sdim, int32_t iyr, int32_t idy, double *sec, orb_array *sun)