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

SaturnOrbit Class Reference

Inheritance diagram for SaturnOrbit:

Inheritance graph
Collaboration diagram for SaturnOrbit:

Collaboration graph
List of all members.

Private Member Functions

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

Member Function Documentation

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

Implements CachingOrbit.

Definition at line 927 of file customorbit.cpp.

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

00928     {
00929     const int p = 4;  //Planet 4
00930     vector<int> pList(1, p);
00931     double t, map;
00932     double dl, dr, dml, ds, dm, da, dhl, s;
00933     double dp;
00934     double x1, x2, x3, x4, x5, x6, x7, x8;
00935     double sx3, cx3, s2x3, c2x3, s3x3, c3x3, s4x3, c4x3;
00936     double sx5, cx5, s2x5, c2x5;
00937     double sx6;
00938     double sx7, cx7, s2x7, c2x7, s3x7, c3x7, s4x7, c4x7, c5x7, s5x7;
00939     double s2x8, c2x8, s3x8, c3x8;
00940     double eclLong, eclLat, distance;    //heliocentric longitude, latitude, distance
00941 
00942     dl = dr = dml = ds = dm = da = dhl = 0.0;
00943 
00944     //Calculate the Julian centuries elapsed since 1900
00945         t = (jd - 2415020.0)/36525.0;
00946 
00947     computePlanetElements(t, pList);
00948 
00949     map = degToRad(gPlanetElements[p][0] - gPlanetElements[p][2]);
00950 
00951     //Compute perturbations
00952     s = gPlanetElements[p][3];
00953     auxJSun(t, &x1, &x2, &x3, &x4, &x5, &x6);
00954     x7 = x3-x2;
00955     sx3 = sin(x3);
00956     cx3 = cos(x3);
00957     s2x3 = sin(2*x3);
00958     c2x3 = cos(2*x3);
00959     sx5 = sin(x5);
00960     cx5 = cos(x5);
00961     s2x5 = sin(2*x5);
00962     sx6 = sin(x6);
00963     sx7 = sin(x7);
00964     cx7 = cos(x7);
00965     s2x7 = sin(2*x7);
00966     c2x7 = cos(2*x7);
00967     s3x7 = sin(3*x7);
00968     c3x7 = cos(3*x7);
00969     s4x7 = sin(4*x7);
00970     c4x7 = cos(4*x7);
00971     c5x7 = cos(5*x7);
00972     s3x3 = sin(3*x3);
00973     c3x3 = cos(3*x3);
00974     s4x3 = sin(4*x3);
00975     c4x3 = cos(4*x3);
00976     c2x5 = cos(2*x5);
00977     s5x7 = sin(5*x7);
00978     x8 = x4-x3;
00979     s2x8 = sin(2*x8);
00980     c2x8 = cos(2*x8);
00981     s3x8 = sin(3*x8);
00982     c3x8 = cos(3*x8);
00983     dml = 7.581e-3*s2x5-7.986e-3*sx6-1.48811e-1*sx7-4.0786e-2*s2x7-
00984               (8.14181e-1-(1.815e-2-1.6714e-2*x1)*x1)*sx5-
00985               (1.0497e-2-(1.60906e-1-4.1e-3*x1)*x1)*cx5-1.5208e-2*s3x7-
00986               6.339e-3*s4x7-6.244e-3*sx3-1.65e-2*s2x7*sx3+
00987               (8.931e-3+2.728e-3*x1)*sx7*sx3-5.775e-3*s3x7*sx3+
00988               (8.1344e-2+3.206e-3*x1)*cx7*sx3+1.5019e-2*c2x7*sx3;
00989     dml += (8.5581e-2+2.494e-3*x1)*sx7*cx3+1.4394e-2*c2x7*cx3+
00990               (2.5328e-2-3.117e-3*x1)*cx7*cx3+
00991               6.319e-3*c3x7*cx3+6.369e-3*sx7*s2x3+9.156e-3*s2x7*s2x3+
00992               7.525e-3*s3x8*s2x3-5.236e-3*cx7*c2x3-7.736e-3*c2x7*c2x3-
00993               7.528e-3*c3x8*c2x3;
00994     dml = degToRad(dml);
00995     ds = (-7927+(2548+91*x1)*x1)*sx5+(13381+(1226-253*x1)*x1)*cx5+
00996              (248-121*x1)*s2x5-(305+91*x1)*c2x5+412*s2x7+12415*sx3+
00997              (390-617*x1)*sx7*sx3+(165-204*x1)*s2x7*sx3+26599*cx7*sx3-
00998              4687*c2x7*sx3-1870*c3x7*sx3-821*c4x7*sx3-
00999              377*c5x7*sx3+497*c2x8*sx3+(163-611*x1)*cx3;
01000     ds += -12696*sx7*cx3-4200*s2x7*cx3-1503*s3x7*cx3-619*s4x7*cx3-
01001              268*s5x7*cx3-(282+1306*x1)*cx7*cx3+(-86+230*x1)*c2x7*cx3+
01002              461*s2x8*cx3-350*s2x3+(2211-286*x1)*sx7*s2x3-
01003              2208*s2x7*s2x3-568*s3x7*s2x3-346*s4x7*s2x3-
01004              (2780+222*x1)*cx7*s2x3+(2022+263*x1)*c2x7*s2x3+248*c3x7*s2x3+
01005              242*s3x8*s2x3+467*c3x8*s2x3-490*c2x3-(2842+279*x1)*sx7*c2x3;
01006     ds += (128+226*x1)*s2x7*c2x3+224*s3x7*c2x3+
01007              (-1594+282*x1)*cx7*c2x3+(2162-207*x1)*c2x7*c2x3+
01008              561*c3x7*c2x3+343*c4x7*c2x3+469*s3x8*c2x3-242*c3x8*c2x3-
01009              205*sx7*s3x3+262*s3x7*s3x3+208*cx7*c3x3-271*c3x7*c3x3-
01010              382*c3x7*s4x3-376*s3x7*c4x3;
01011     ds *= 1e-7;
01012     dp = (7.7108e-2+(7.186e-3-1.533e-3*x1)*x1)*sx5-7.075e-3*sx7+
01013              (4.5803e-2-(1.4766e-2+5.36e-4*x1)*x1)*cx5-7.2586e-2*cx3-
01014              7.5825e-2*sx7*sx3-2.4839e-2*s2x7*sx3-8.631e-3*s3x7*sx3-
01015              1.50383e-1*cx7*cx3+2.6897e-2*c2x7*cx3+1.0053e-2*c3x7*cx3-
01016              (1.3597e-2+1.719e-3*x1)*sx7*s2x3+1.1981e-2*s2x7*c2x3;
01017     dp += -(7.742e-3-1.517e-3*x1)*cx7*s2x3+
01018              (1.3586e-2-1.375e-3*x1)*c2x7*c2x3-
01019              (1.3667e-2-1.239e-3*x1)*sx7*c2x3+
01020              (1.4861e-2+1.136e-3*x1)*cx7*c2x3-
01021              (1.3064e-2+1.628e-3*x1)*c2x7*c2x3;
01022     dm = dml-(degToRad(dp)/s);
01023     da = 572*sx5-1590*s2x7*cx3+2933*cx5-647*s3x7*cx3+33629*cx7-
01024              344*s4x7*cx3-3081*c2x7+2885*cx7*cx3-1423*c3x7+
01025              (2172+102*x1)*c2x7*cx3-671*c4x7+296*c3x7*cx3-320*c5x7-
01026              267*s2x7*s2x3+1098*sx3-778*cx7*s2x3-2812*sx7*sx3;
01027     da += 495*c2x7*s2x3+688*s2x7*sx3+250*c3x7*s2x3-393*s3x7*sx3-
01028              856*sx7*c2x3-228*s4x7*sx3+441*s2x7*c2x3+2138*cx7*sx3+
01029              296*c2x7*c2x3-999*c2x7*sx3+211*c3x7*c2x3-642*c3x7*sx3-
01030              427*sx7*s3x3-325*c4x7*sx3+398*s3x7*s3x3-890*cx3+
01031              344*cx7*c3x3+2206*sx7*cx3-427*c3x7*c3x3;
01032     da *= 1e-6;
01033     dhl = 7.47e-4*cx7*sx3+1.069e-3*cx7*cx3+2.108e-3*s2x7*s2x3+
01034               1.261e-3*c2x7*s2x3+1.236e-3*s2x7*c2x3-2.075e-3*c2x7*c2x3;
01035     dhl = degToRad(dhl);
01036 
01037     computePlanetCoords(p, map, da, dhl, dl, dm, dml, dr, ds,
01038                         eclLong, eclLat, distance);
01039 
01040     //Corrections for internal coordinate system
01041     eclLat -= (PI/2);
01042     eclLong += PI;
01043 
01044     return Point3d(cos(eclLong) * sin(eclLat) * distance,
01045                    cos(eclLat) * distance,
01046                    -sin(eclLong) * sin(eclLat) * distance);
01047     };

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

Implements CachingOrbit.

Definition at line 1054 of file customorbit.cpp.

References BoundingRadiusSlack.

01055     {
01056         return 1.50e+9 * BoundingRadiusSlack;
01057     };

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

Implements CachingOrbit.

Definition at line 1049 of file customorbit.cpp.

01050     {
01051         return 10759.42493;
01052     };


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