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

EarthOrbit Class Reference

Inheritance diagram for EarthOrbit:

Inheritance graph
Collaboration diagram for EarthOrbit:

Collaboration graph
List of all members.

Private Member Functions

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

Member Function Documentation

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

Implements CachingOrbit.

Definition at line 516 of file customorbit.cpp.

References astro::anomaly(), cos(), degToRad(), distance(), KM_PER_AU, meanAnomalySun(), pfmod(), PI, sin(), and TWOPI.

00517     {
00518         double t, t2;
00519         double ls, ms;    // mean longitude and mean anomaly
00520         double s, nu, ea; // eccentricity, true anomaly, eccentric anomaly
00521         double a, b, a1, b1, c1, d1, e1, h1, dl, dr;
00522         double eclLong, distance;
00523 
00524         // Calculate the Julian centuries elapsed since 1900
00525         t = (jd - 2415020.0)/36525.0;
00526 
00527         t2 = t*t;
00528         a = 100.0021359*t;
00529         b = 360.*(a-(int)a);
00530         ls = 279.69668+.0003025*t2+b;
00531         ms = meanAnomalySun(t);
00532         s = .016751-.0000418*t-1.26e-07*t2;
00533         astro::anomaly(degToRad(ms), s, nu, ea);
00534         a = 62.55209472000015*t;
00535         b = 360*(a-(int)a);
00536         a1 = degToRad(153.23+b);
00537         a = 125.1041894*t;
00538         b = 360*(a-(int)a);
00539         b1 = degToRad(216.57+b);
00540         a = 91.56766028*t;
00541         b = 360*(a-(int)a);
00542         c1 = degToRad(312.69+b);
00543         a = 1236.853095*t;
00544         b = 360*(a-(int)a);
00545         d1 = degToRad(350.74-.00144*t2+b);
00546         e1 = degToRad(231.19+20.2*t);
00547         a = 183.1353208*t;
00548         b = 360*(a-(int)a);
00549         h1 = degToRad(353.4+b);
00550         dl = .00134*cos(a1)+.00154*cos(b1)+.002*cos(c1)+.00179*sin(d1)+
00551             .00178*sin(e1);
00552         dr = 5.43e-06*sin(a1)+1.575e-05*sin(b1)+1.627e-05*sin(c1)+
00553             3.076e-05*cos(d1)+9.27e-06*sin(h1);
00554 
00555         eclLong = nu+degToRad(ls-ms+dl) + PI;
00556         eclLong = pfmod(eclLong, TWOPI);
00557         distance = KM_PER_AU * (1.0000002*(1-s*cos(ea))+dr);
00558 
00559         // Correction for internal coordinate system
00560         eclLong += PI;
00561         
00562         return Point3d(-cos(eclLong) * distance,
00563                        0,
00564                        sin(eclLong) * distance);
00565     };

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

Implements CachingOrbit.

Definition at line 572 of file customorbit.cpp.

References BoundingRadiusSlack.

00573     {
00574         return 1.52e+8 * BoundingRadiusSlack;
00575     };

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

Implements CachingOrbit.

Definition at line 567 of file customorbit.cpp.

00568     {
00569         return 365.25;
00570     };


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