Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members

UranusOrbit Class Reference

Inheritance diagram for UranusOrbit:

Inheritance graph
Collaboration diagram for UranusOrbit:

Collaboration graph
List of all members.

Private Member Functions

Point3d computePosition (double jd) const
double getBoundingRadius () const
double getPeriod () const

Member Function Documentation

Point3d UranusOrbit::computePosition double  jd  )  const [inline, private, virtual]
 

Implements CachingOrbit.

Definition at line 1062 of file customorbit.cpp.

References auxJSun(), computePlanetCoords(), computePlanetElements(), cos(), degToRad(), distance(), gPlanetElements, pfmod(), PI, sin(), and TWOPI.

01063     {
01064     const int p = 5;  //Planet 5
01065     vector<int> pList(1, p);
01066     double t, map;
01067     double dl, dr, dml, ds, dm, da, dhl, s;
01068     double dp;
01069     double x1, x2, x3, x4, x5, x6;
01070     double x8, x9, x10, x11, x12;
01071     double sx4, cx4, s2x4, c2x4;
01072     double sx9, cx9, s2x9, c2x9;
01073     double sx11, cx11;
01074     double eclLong, eclLat, distance;    //heliocentric longitude, latitude, distance
01075 
01076     dl = dr = dml = ds = dm = da = dhl = 0.0;
01077 
01078     //Calculate the Julian centuries elapsed since 1900
01079         t = (jd - 2415020.0)/36525.0;
01080 
01081     computePlanetElements(t, pList);
01082 
01083     map = degToRad(gPlanetElements[p][0] - gPlanetElements[p][2]);
01084 
01085     //Compute perturbations
01086     s = gPlanetElements[p][3];
01087     auxJSun(t, &x1, &x2, &x3, &x4, &x5, &x6);
01088     x8 = pfmod(1.46205+3.81337*t, TWOPI);
01089     x9 = 2*x8-x4;
01090     sx9 = sin(x9);
01091     cx9 = cos(x9);
01092     s2x9 = sin(2*x9);
01093     c2x9 = cos(2*x9);
01094     x10 = x4-x2;
01095     x11 = x4-x3;
01096     x12 = x8-x4;
01097     dml = (8.64319e-1-1.583e-3*x1)*sx9+(8.2222e-2-6.833e-3*x1)*cx9+
01098               3.6017e-2*s2x9-3.019e-3*c2x9+8.122e-3*sin(x6);
01099     dml = degToRad(dml);
01100     dp = 1.20303e-1*sx9+6.197e-3*s2x9+(1.9472e-2-9.47e-4*x1)*cx9;
01101     dm = dml-(degToRad(dp)/s);
01102     ds = (163*x1-3349)*sx9+20981*cx9+1311*c2x9;
01103     ds *= 1e-7;
01104     da = -3.825e-3*cx9;
01105     dl = (1.0122e-2-9.88e-4*x1)*sin(x4+x11)+
01106              (-3.8581e-2+(2.031e-3-1.91e-3*x1)*x1)*cos(x4+x11)+
01107              (3.4964e-2-(1.038e-3-8.68e-4*x1)*x1)*cos(2*x4+x11)+
01108              5.594e-3*sin(x4+3*x12)-1.4808e-2*sin(x10)-
01109              5.794e-3*sin(x11)+2.347e-3*cos(x11)+9.872e-3*sin(x12)+
01110              8.803e-3*sin(2*x12)-4.308e-3*sin(3*x12);
01111     sx11 = sin(x11);
01112     cx11 = cos(x11);
01113     sx4 = sin(x4);
01114     cx4 = cos(x4);
01115     s2x4 = sin(2*x4);
01116     c2x4 = cos(2*x4);
01117     dhl = (4.58e-4*sx11-6.42e-4*cx11-5.17e-4*cos(4*x12))*sx4-
01118               (3.47e-4*sx11+8.53e-4*cx11+5.17e-4*sin(4*x11))*cx4+
01119               4.03e-4*(cos(2*x12)*s2x4+sin(2*x12)*c2x4);
01120     dhl = degToRad(dhl);
01121 
01122     dr = -25948+4985*cos(x10)-1230*cx4+3354*cos(x11)+904*cos(2*x12)+
01123              894*(cos(x12)-cos(3*x12))+(5795*cx4-1165*sx4+1388*c2x4)*sx11+
01124              (1351*cx4+5702*sx4+1388*s2x4)*cos(x11);
01125     dr *= 1e-6;
01126 
01127     computePlanetCoords(p, map, da, dhl, dl, dm, dml, dr, ds,
01128                         eclLong, eclLat, distance);
01129 
01130     //Corrections for internal coordinate system
01131     eclLat -= (PI/2);
01132     eclLong += PI;
01133 
01134     return Point3d(cos(eclLong) * sin(eclLat) * distance,
01135                    cos(eclLat) * distance,
01136                    -sin(eclLong) * sin(eclLat) * distance);
01137     };

double UranusOrbit::getBoundingRadius  )  const [inline, private, virtual]
 

Implements CachingOrbit.

Definition at line 1144 of file customorbit.cpp.

References BoundingRadiusSlack.

01145     {
01146         return 3.01e+9 * BoundingRadiusSlack;
01147     };

double UranusOrbit::getPeriod  )  const [inline, private, virtual]
 

Implements CachingOrbit.

Definition at line 1139 of file customorbit.cpp.

01140     {
01141         return 30686.07698;
01142     };


The documentation for this class was generated from the following file:
Generated on Sat Jan 14 22:33:40 2006 for Celestia by  doxygen 1.4.1