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

MarsOrbit Class Reference

Inheritance diagram for MarsOrbit:

Inheritance graph
Collaboration diagram for MarsOrbit:

Collaboration graph
List of all members.

Private Member Functions

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

Member Function Documentation

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

Implements CachingOrbit.

Definition at line 738 of file customorbit.cpp.

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

00739     {
00740     const int p = 2;  //Planet 2
00741     vector<int> pList;
00742     double t;
00743     double map[4], mas, a;
00744     double dl, dr, dml, ds, dm, da, dhl;
00745     double eclLong, eclLat, distance;    //heliocentric longitude, latitude, distance
00746 
00747     dl = dr = dml = ds = dm = da = dhl = 0.0;
00748 
00749     //Calculate the Julian centuries elapsed since 1900
00750         t = (jd - 2415020.0)/36525.0;
00751 
00752     mas = meanAnomalySun(t);
00753 
00754     //Specify which planets we must compute elements for
00755     pList.push_back(1);
00756     pList.push_back(2);
00757     pList.push_back(3);
00758     computePlanetElements(t, pList);
00759 
00760     //Compute necessary planet mean anomalies
00761     map[0] = 0.0;
00762     map[1] = degToRad(gPlanetElements[1][0] - gPlanetElements[1][2]);
00763     map[2] = degToRad(gPlanetElements[2][0] - gPlanetElements[2][2]);
00764     map[3] = degToRad(gPlanetElements[3][0] - gPlanetElements[3][2]);
00765 
00766     //Compute perturbations
00767     a = 3*map[3]-8*map[2]+4*mas;
00768     dml = degToRad(-1*(1.133e-2*sin(a)+9.33e-3*cos(a)));
00769     dm = dml;
00770     dl = 7.05e-3*cos(map[3]-map[2]-8.5448e-1)+
00771              6.07e-3*cos(2*map[3]-map[2]-3.2873)+
00772              4.45e-3*cos(2*map[3]-2*map[2]-3.3492)+
00773              3.88e-3*cos(mas-2*map[2]+3.5771e-1)+
00774              2.38e-3*cos(mas-map[2]+6.1256e-1)+
00775              2.04e-3*cos(2*mas-3*map[2]+2.7688)+
00776              1.77e-3*cos(3*map[2]-map[2-1]-1.0053)+
00777              1.36e-3*cos(2*mas-4*map[2]+2.6894)+
00778              1.04e-3*cos(map[3]+3.0749e-1);
00779 
00780     dr = 5.3227e-5*cos(map[3]-map[2]+7.17864e-1)+
00781              5.0989e-5*cos(2*map[3]-2*map[2]-1.77997)+
00782              3.8278e-5*cos(2*map[3]-map[2]-1.71617)+
00783              1.5996e-5*cos(mas-map[2]-9.69618e-1)+
00784              1.4764e-5*cos(2*mas-3*map[2]+1.19768)+
00785              8.966e-6*cos(map[3]-2*map[2]+7.61225e-1);
00786     dr += 7.914e-6*cos(3*map[3]-2*map[2]-2.43887)+
00787              7.004e-6*cos(2*map[3]-3*map[2]-1.79573)+
00788              6.62e-6*cos(mas-2*map[2]+1.97575)+
00789              4.93e-6*cos(3*map[3]-3*map[2]-1.33069)+
00790              4.693e-6*cos(3*mas-5*map[2]+3.32665)+
00791              4.571e-6*cos(2*mas-4*map[2]+4.27086)+
00792              4.409e-6*cos(3*map[3]-map[2]-2.02158);
00793 
00794     computePlanetCoords(p, map[p], da, dhl, dl, dm, dml, dr, ds,
00795                         eclLong, eclLat, distance);
00796 
00797     //Corrections for internal coordinate system
00798     eclLat -= (PI/2);
00799     eclLong += PI;
00800 
00801     return Point3d(cos(eclLong) * sin(eclLat) * distance,
00802                    cos(eclLat) * distance,
00803                    -sin(eclLong) * sin(eclLat) * distance);
00804     };

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

Implements CachingOrbit.

Definition at line 811 of file customorbit.cpp.

References BoundingRadiusSlack.

00812     {
00813         return 2.49e+8 * BoundingRadiusSlack;
00814     };

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

Implements CachingOrbit.

Definition at line 806 of file customorbit.cpp.

00807     {
00808         return 689.998725;
00809     };


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