/* Orbits of the five minor planets as implemented in the * JPL DE102 and DE118/DE200 numerical integrations. * This program was written with the aid of documentation * kindly supplied by E. M. Standish of JPL. * * Note that in this model the orbits are fixed Keplerian ellipses. * Each is specified by a perihelion date and period * of revolution, together with a set of Chebyshev * expansions for the x, y, and z coordinates covering * one period. The result is in 1950 coordinates, which * are then rotated into the J2000 FK5 system. */ /*include "ssystem.h"*/ /* Julian date of perihelion */ DOUBLE mpperihd[] = { 2439727.61747, /* Ceres */ 2439781.98561, /* Pallas */ 2439687.09607, /* Vesta */ 2437877.10408, /* Iris */ 2437318.78050 /* Bamberga */ }; /* Orbital period, in days */ DOUBLE mpperiod[] = { 1680.56984, 1682.67764, 1325.87596, 1346.30048, 1608.124 }; /* Chebyshev coefficients for one complete revolution */ DOUBLE ch[] = { /* Ceres, X coordinate */ -4.586999684620e-1, 7.946057787660e-1, -2.338071216029e0, -8.994494077228e-1, 6.505967522417e-1, 1.006144777607e-1, -1.854568643327e-2, 5.534212809533e-3, -6.708702547208e-3, -1.249295092718e-3, 2.588279743209e-4, -7.597732320643e-5, 9.984328008949e-5, 2.021080252791e-5, -2.661871914125e-6, /* Ceres, Y coordinate */ 2.073485825322e-1, 1.329469716470e0, 1.056890747406e0, -1.504885543270e0, -2.940927047142e-1, 1.683399552279e-1, 8.383305119724e-3, 9.259394446135e-3, 3.032570436963e-3, -2.090218869642e-3, -1.169993836602e-4, -1.271190734330e-4, -4.513268808669e-5, 3.381506984284e-5, 1.203260096346e-6, /* Ceres, Z coordinate */ 1.912689844430e-1, 4.643825797944e-1, 9.749303200187e-1, -5.256551707962e-1, -2.712862189644e-1, 5.880099540648e-2, 7.733191309744e-3, 3.234298176906e-3, 2.797398760321e-3, -7.301115768150e-4, -1.079262419828e-4, -4.440257835932e-5, -4.163271004842e-5, 1.181157357331e-5, 1.109948926800e-6, /* Pallas */ 4.290381150293e-2, 1.383551031759e0, -1.593336511721e0, -1.444824247651e0, 3.278230287990e-1, 2.359571746298e-2, 4.339839066079e-2, 3.438600727700e-2, -3.349962368965e-3, 4.315494601308e-3, -2.062356083727e-3, -7.283107794077e-4, -1.570587316340e-4, -2.956926691273e-4, 4.635295741246e-5, -6.270495618154e-2, 9.052313498467e-1, 2.328699773983e0, -9.453212595492e-1, -4.791212700237e-1, 1.543823298115e-2, -6.342779555957e-2, 2.249811612921e-2, 4.896050868149e-3, 2.823546738447e-3, 3.014183200304e-3, -4.765200088867e-4, 2.295451275798e-4, -1.934661374033e-4, -6.774596619107e-5, 9.265138887655e-3, -2.803110213960e-1, -3.440832774230e-1, 2.927251335876e-1, 7.079384758595e-2, -4.780553453247e-3, 9.371943957602e-3, -6.966694108343e-3, -7.234291203889e-4, -8.743303801260e-4, -4.453687185879e-4, 1.475576496875e-4, -3.391705564484e-5, 5.990810038801e-5, 1.000998683469e-5, /* Vesta */ -1.192593674310e-1, -1.319026070765e0, -6.559453241208e-1, 1.486237301962e0, 1.796748459660e-1, -1.577061228563e-1, -3.504660747540e-3, -1.172496827075e-2, -2.083943956635e-3, 2.059310183891e-3, 3.498024045962e-5, 1.954256820853e-4, 3.447147301144e-5, -3.487593512748e-5, 3.165561395639e-7, -3.861017802374e-1, 3.022207934926e-1, -2.123620666763e0, -3.405329331031e-1, 5.816966783051e-1, 3.613428926437e-2, -1.134632677418e-2, 2.686473977278e-3, -6.746761188693e-3, -4.718377988248e-4, 1.132484047640e-4, -4.477675310431e-5, 1.116012719484e-4, 7.990920741835e-6, 1.024849381860e-6, -1.384641783726e-1, 2.933482790246e-1, -7.615748122623e-1, -3.305356614367e-1, 2.086086020481e-1, 3.507346879406e-2, -4.069030226609e-3, 2.607605217269e-3, -2.419529752218e-3, -4.579857152266e-4, 4.061324790585e-5, -4.346220957083e-5, 4.002255160844e-5, 7.756325500855e-6, 3.675324354182e-7, /* Iris */ -3.221821085369e-2, 9.907754107874e-1, 1.765050607796e0, -1.038296530184e0, -3.684605664049e-1, 2.102656075083e-2, -4.610322993751e-2, 2.443709777445e-2, 4.133814722713e-3, 2.796199583826e-3, 2.211618558954e-3, -5.421176461335e-4, 1.375758192501e-4, -1.966210666429e-4, -5.435717896184e-5, -2.728732274927e-2, -1.002727837482e0, 1.494915587413e0, 1.050822237856e0, -3.120689240482e-1, -2.128021907064e-2, -3.904728666659e-2, -2.473189982202e-2, 3.501148373402e-3, -2.829932123194e-3, 1.873137825390e-3, 5.486575959091e-4, 1.165203058428e-4, 1.989930460645e-4, -4.603799673429e-5, -1.457714124299e-2, -3.127672899889e-1, 7.985977907868e-1, 3.277687237841e-1, -1.667101175588e-1, -6.637650018584e-3, -2.085942318799e-2, -7.714285965209e-3, 1.870345977899e-3, -8.827023325163e-4, 1.000647623044e-3, 1.711353200638e-4, 6.224622956062e-5, 6.206920105118e-5, -2.459392543221e-5, /* Bamberga */ -4.428638204675e-1, 3.277675489944e-1, 2.727067283355e0, -3.226066422703e-1, -4.291430681990e-1, -1.497170325524e-2, -1.130961297475e-1, 7.296952063929e-3, -9.115500159538e-3, 2.484760195898e-3, 3.620198026209e-3, 1.354338061210e-4, 1.475205478064e-3, -1.063495348004e-4, 1.960369766505e-4, -5.189520920287e-2, -1.366052095235e0, 3.195603719233e-1, 1.344542743667e0, -5.028739823144e-2, 6.239826567272e-2, -1.325271345735e-2, -3.041184731784e-2, -1.068163091916e-3, -1.035585091379e-2, 4.242182929449e-4, -5.644537880111e-4, 1.728659993507e-4, 4.432379144528e-4, 2.297180181498e-5, -8.779154055939e-2, -8.459223888259e-1, 5.406028375993e-1, 8.326028074398e-1, -8.507159387687e-2, 3.863988067556e-2, -2.241972137474e-2, -1.883241687594e-2, -1.807020047676e-3, -6.412819960435e-3, 7.176534798334e-4, -3.495357888632e-4, 2.924387939936e-4, 2.744733357682e-4, 3.886158089997e-5 }; #define NCOF 15 static DOUBLE pcofs[NCOF]; static DOUBLE vcofs[NCOF]; DOUBLE FLOOR(), SQRT(); aroids( JD, y ) DOUBLE JD; DOUBLE y[]; { DOUBLE t, psum, vsum, u, per; DOUBLE v[3], p[3]; DOUBLE *pans; int i, j, k, iob; pans = &y[6*IAROIDS]; /* output pointer */ for( iob=0; iob<5; iob++ ) { per = mpperiod[iob]; t = (JD - mpperihd[iob])/per; t -= FLOOR(t); t = 2.0 * t - 1.0; /* Chebyshev expansion */ pcofs[0] = 1.0; pcofs[1] = t; vcofs[0] = 0.0; vcofs[1] = 1.0; t *= 2.0; for( i=2; i=0; i-- ) { psum += pcofs[i] * ch[j+i]; vsum += vcofs[i] * ch[j+i]; } p[k] = psum; v[k] = vsum / ( 0.5 * per ); j += NCOF; } #if DE200 r118_200(p); r118_200(v); #endif for( j=0; j<3; j++ ) { /* Convert from heliocentric to barycentric coordinates */ v[j] += y[(6*ISUN)+2*j]; p[j] += y[(6*ISUN+1)+2*j]; *pans++ = v[j]; *pans++ = p[j]; } } } /* Rotate from DE118 (FK4) to DE200 (FK5) */ DOUBLE RK00 = 0.9999256791774783; DOUBLE RK01 = -0.0111815116768724; DOUBLE RK02 = -0.0048590038154553; DOUBLE RK10 = 0.0111815116959975; DOUBLE RK11 = 0.9999374845751042; DOUBLE RK12 = -0.0000271625775175; DOUBLE RK20 = 0.0048590037714450; DOUBLE RK21 = -0.0000271704492210; DOUBLE RK22 = 0.9999881946023742; r118_200( vec ) DOUBLE vec[]; { DOUBLE x, y, z; x = RK00*vec[0] + RK01*vec[1] + RK02*vec[2]; y = RK10*vec[0] + RK11*vec[1] + RK12*vec[2]; z = RK20*vec[0] + RK21*vec[1] + RK22*vec[2]; vec[0] = x; vec[1] = y; vec[2] = z; } /* Rotate DE200 to DE118 */ r200_118( vec ) DOUBLE vec[]; { DOUBLE x, y, z; x = RK00*vec[0] + RK10*vec[1] + RK20*vec[2]; y = RK01*vec[0] + RK11*vec[1] + RK21*vec[2]; z = RK02*vec[0] + RK12*vec[1] + RK22*vec[2]; vec[0] = x; vec[1] = y; vec[2] = z; } static DOUBLE RL00 = 0.9999257180268403; static DOUBLE RL01 = -0.0111782838886141; static DOUBLE RL02 = -0.0048584357372842; static DOUBLE RL10 = 0.0111782838782385; static DOUBLE RL11 = 0.9999375206641666; static DOUBLE RL12 = -0.0000271576311202; static DOUBLE RL20 = 0.0048584357611567; static DOUBLE RL21 = -0.0000271533600777; static DOUBLE RL22 = 0.9999881973626738; /* Rotate DE102 to DE200 */ r102_200( vec ) DOUBLE vec[]; { DOUBLE x, y, z; x = RL00*vec[0] + RL01*vec[1] + RL02*vec[2]; y = RL10*vec[0] + RL11*vec[1] + RL12*vec[2]; z = RL20*vec[0] + RL21*vec[1] + RL22*vec[2]; vec[0] = x; vec[1] = y; vec[2] = z; } /* Rotate DE200 to DE102 */ r200_102( vec ) DOUBLE vec[]; { DOUBLE x, y, z; x = RL00*vec[0] + RL10*vec[1] + RL20*vec[2]; y = RL01*vec[0] + RL11*vec[1] + RL21*vec[2]; z = RL02*vec[0] + RL12*vec[1] + RL22*vec[2]; vec[0] = x; vec[1] = y; vec[2] = z; }