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

NeptuneOrbit Class Reference

Inheritance diagram for NeptuneOrbit:

Inheritance graph
Collaboration diagram for NeptuneOrbit:

Collaboration graph
List of all members.

Private Member Functions

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

Member Function Documentation

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

Implements CachingOrbit.

Definition at line 1152 of file customorbit.cpp.

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

01153     {
01154     const int p = 6;  //Planet 6
01155     vector<int> pList(1, p);
01156     double t, map;
01157     double dl, dr, dml, ds, dm, da, dhl, s;
01158     double dp;
01159     double x1, x2, x3, x4, x5, x6;
01160     double x8, x9, x10, x11, x12;
01161     double sx8, cx8;
01162     double sx9, cx9, s2x9, c2x9;
01163     double s2x12, c2x12;
01164     double eclLong, eclLat, distance;    //heliocentric longitude, latitude, distance
01165 
01166     dl = dr = dml = ds = dm = da = dhl = 0.0;
01167 
01168     //Calculate the Julian centuries elapsed since 1900
01169         t = (jd - 2415020.0)/36525.0;
01170 
01171     computePlanetElements(t, pList);
01172 
01173     map = degToRad(gPlanetElements[p][0] - gPlanetElements[p][2]);
01174 
01175     //Compute perturbations
01176     s = gPlanetElements[p][3];
01177         auxJSun(t, &x1, &x2, &x3, &x4, &x5, &x6);
01178     x8 = pfmod(1.46205+3.81337*t, TWOPI);
01179     x9 = 2*x8-x4;
01180         sx9 = sin(x9);
01181         cx9 = cos(x9);
01182     s2x9 = sin(2*x9);
01183         c2x9 = cos(2*x9);
01184         x10 = x8-x2;
01185         x11 = x8-x3;
01186         x12 = x8-x4;
01187         dml = (1.089e-3*x1-5.89833e-1)*sx9+(4.658e-3*x1-5.6094e-2)*cx9-
01188               2.4286e-2*s2x9;
01189         dml = degToRad(dml);
01190         dp = 2.4039e-2*sx9-2.5303e-2*cx9+6.206e-3*s2x9-5.992e-3*c2x9;
01191         dm = dml-(degToRad(dp)/s);
01192         ds = 4389*sx9+1129*s2x9+4262*cx9+1089*c2x9;
01193         ds *= 1e-7;
01194         da = 8189*cx9-817*sx9+781*c2x9;
01195         da *= 1e-6;
01196         s2x12 = sin(2*x12);
01197         c2x12 = cos(2*x12);
01198         sx8 = sin(x8);
01199         cx8 = cos(x8);
01200         dl = -9.556e-3*sin(x10)-5.178e-3*sin(x11)+2.572e-3*s2x12-
01201              2.972e-3*c2x12*sx8-2.833e-3*s2x12*cx8;
01202         dhl = 3.36e-4*c2x12*sx8+3.64e-4*s2x12*cx8;
01203         dhl = degToRad(dhl);
01204         dr = -40596+4992*cos(x10)+2744*cos(x11)+2044*cos(x12)+1051*c2x12;
01205         dr *= 1e-6;
01206 
01207     computePlanetCoords(p, map, da, dhl, dl, dm, dml, dr, ds,
01208                         eclLong, eclLat, distance);
01209 
01210     //Corrections for internal coordinate system
01211     eclLat -= (PI/2);
01212     eclLong += PI;
01213 
01214     return Point3d(cos(eclLong) * sin(eclLat) * distance,
01215                    cos(eclLat) * distance,
01216                    -sin(eclLong) * sin(eclLat) * distance);
01217     };

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

Implements CachingOrbit.

Definition at line 1224 of file customorbit.cpp.

References BoundingRadiusSlack.

01225     {
01226         return 4.54e+9 * BoundingRadiusSlack;
01227     };

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

Implements CachingOrbit.

Definition at line 1219 of file customorbit.cpp.

01220     {
01221         return 60190.64325;
01222     };


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