6 double pturbl, pturbb, pturbr;
8 double dele, enom, vnom, nd, sl;
10 double capj, capn, eye, comg, omg;
11 double sb, su, cu, u, b, up;
14 ecc = .0558900 - .000347*capt;
15 incl = 2.49256 - .0044*capt;
16 node = 112.78364 + .87306*capt;
17 argp = 91.08897 + 1.95917*capt;
19 anom = 175.47630 + .03345972*eday - .56527*capt;
20 motion = 120.4550/3600.;
25 anom = fmod(anom, 360.)*radian;
27 enom = anom + ecc*sin(anom);
29 dele = (anom - enom + ecc * sin(enom)) /
32 } while(fabs(dele) > converge);
33 vnom = 2.*atan2(sqrt((1.+ecc)/(1.-ecc))*sin(enom/2.),
35 rad = mrad*(1. - ecc*cos(enom));
39 lambda += pturbl*radsec;
44 * reduce to the ecliptic
48 lambda = node + atan2(sin(nd)*cos(incl),cos(nd));
50 sl = sin(incl)*sin(nd) + pturbb*radsec;
51 beta = atan2(sl, pyth(sl));
53 lograd = pturbr*2.30258509;
57 lambda -= 1185.*radsec;
60 motion *= radian*mrad*mrad/(rad*rad);
64 * here begins the computation of magnitude
65 * first find the geocentric equatorial coordinates of Saturn
68 sd = rad*(cos(beta)*sin(lambda)*sin(obliq) +
69 sin(beta)*cos(obliq));
70 sa = rad*(cos(beta)*sin(lambda)*cos(obliq) -
71 sin(beta)*sin(obliq));
72 ca = rad*cos(beta)*cos(lambda);
77 delta = atan2(sd,sqrt(sa*sa+ca*ca));
80 * here are the necessary elements of Saturn's rings
81 * cf. Exp. Supp. p. 363ff.
84 capj = 6.9056 - 0.4322*capt;
85 capn = 126.3615 + 3.9894*capt + 0.2403*capt2;
86 eye = 28.0743 - 0.0128*capt;
87 comg = 168.1179 + 1.3936*capt;
88 omg = 42.9236 - 2.7390*capt - 0.2344*capt2;
97 * now find saturnicentric ring-plane coords of the earth
100 sb = sin(capj)*cos(delta)*sin(alpha-capn) -
101 cos(capj)*sin(delta);
102 su = cos(capj)*cos(delta)*sin(alpha-capn) +
103 sin(capj)*sin(delta);
104 cu = cos(delta)*cos(alpha-capn);
106 b = atan2(sb,sqrt(su*su+cu*cu));
109 * and then the saturnicentric ring-plane coords of the sun
112 su = sin(eye)*sin(beta) +
113 cos(eye)*cos(beta)*sin(lambda-comg);
114 cu = cos(beta)*cos(lambda-comg);
118 * at last, the magnitude
123 mag = -8.68 +2.52*fabs(up+omg-u)-
124 2.60*fabs(sb) + 1.25*(sb*sb);