Changeset 1719 in Sophya for trunk/SophyaExt/XephemAstroLib/plans.c
- Timestamp:
- Oct 22, 2001, 2:08:28 PM (24 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/SophyaExt/XephemAstroLib/plans.c
r1457 r1719 108 108 * [planet][0] = angular size at 1 AU 109 109 * [planet][1] = magnitude at 1 AU from sun and earth and 0 deg phase angle 110 */ 111 static double vis_elements[8][2] = { 112 /* Mercury */ { 6.74, -0.42, }, 113 /* Venus */ { 16.92, -4.34, }, 114 /* Mars */ { 9.36, -1.20, }, 115 /* Jupiter */ { 196.74, -9.4, }, 116 /* Saturn */ { 165.6, -8.88, }, 117 /* Uranus */ { 65.8, -7.19, }, 118 /* Neptune */ { 62.2, -6.87, }, 119 /* Pluto */ { 8.2, -1.0, } 110 * [planet][2] = A 111 * [planet][3] = B 112 * [planet][4] = C 113 * where mag correction = A*(i/100) + B*(i/100)^2 + C*(i/100)^3 114 * i = angle between sun and earth from planet, degrees 115 * from Explanatory Supplement, 1992 116 */ 117 static double vis_elements[8][5] = { 118 /* Mercury */ { 6.74, -0.36, 3.8, -2.73, 2.00}, 119 /* Venus */ { 16.92, -4.29, 0.09, 2.39, -.65}, 120 /* Mars */ { 9.36, -1.52, 1.60, 0., 0.}, 121 /* Jupiter */ { 196.74, -9.25, 0.50, 0., 0.}, 122 /* Saturn */ { 165.6, -8.88, 4.40, 0., 0.}, 123 /* Uranus */ { 65.8, -7.19, 0.28, 0., 0.}, 124 /* Neptune */ { 62.2, -6.87, 0., 0., 0.}, 125 /* Pluto */ { 8.2, -1.01, 4.1, 0., 0.} 120 126 }; 121 127 … … 132 138 * seen from the center of the Earth for the given instant. 133 139 * dia: angular diameter in arcsec at 1 AU, 134 * mag: visual magnitude when 1 AU from sun and earth at 0 phase angle.140 * mag: visual magnitude 135 141 * 136 142 * all angles are in radians, all distances in AU. … … 148 154 { 149 155 static double lastmjd = -10000; 150 static double lsn, bsn, rsn; /* geo metric geocentric coords of sun */151 static double xsn, ysn, zsn; 156 static double lsn, bsn, rsn; /* geocentric coords of sun */ 157 static double xsn, ysn, zsn; /* cartesian " */ 152 158 double lp, bp, rp; /* heliocentric coords of planet */ 153 159 double xp, yp, zp, rho; /* rect. coords and geocentric dist. */ 154 160 double dt; /* light time */ 161 double *vp; /* vis_elements[p] */ 162 double ci, i; /* sun/earth angle: cos, degrees */ 155 163 int pass; 156 164 … … 202 210 } 203 211 204 *dia = vis_elements[p][0]; 205 *mag = vis_elements[p][1]; 212 vp = vis_elements[p]; 213 *dia = vp[0]; 214 215 /* solve plane triangle, assume sun/earth dist == 1 */ 216 ci = (rp*rp + rho*rho - 1)/(2*rp*rho); 217 218 /* expl supp equation for mag */ 219 if (ci < -1) ci = -1; 220 if (ci > 1) ci = 1; 221 i = raddeg(acos(ci))/100.; 222 *mag = vp[1] + 5*log10(rho*rp) + i*(vp[2] + i*(vp[3] + i*vp[4])); 223 224 /* rings contribution if SATURN */ 225 if (p == SATURN) { 226 double et, st, set; 227 satrings (bp, lp, rp, lsn+PI, rsn, mjd+MJD0, &et, &st); 228 set = sin(fabs(et)); 229 *mag += (-2.60 + 1.25*set)*set; 230 } 206 231 } 207 232 208 233 /* For RCS Only -- Do Not Edit */ 209 static char *rcsid[2] = {(char *)rcsid, "@(#) $RCSfile: plans.c,v $ $Date: 2001- 04-10 14:40:47 $ $Revision: 1.1.1.1$ $Name: not supported by cvs2svn $"};234 static char *rcsid[2] = {(char *)rcsid, "@(#) $RCSfile: plans.c,v $ $Date: 2001-10-22 12:08:27 $ $Revision: 1.2 $ $Name: not supported by cvs2svn $"};
Note:
See TracChangeset
for help on using the changeset viewer.