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

VSOP87Orbit Class Reference

Inheritance diagram for VSOP87Orbit:

Inheritance graph
Collaboration diagram for VSOP87Orbit:

Collaboration graph
List of all members.

Public Member Functions

Point3d computePosition (double jd) const
double getBoundingRadius () const
double getPeriod () const
 VSOP87Orbit (VSOPSeries *_vsL, int _nL, VSOPSeries *_vsB, int _nB, VSOPSeries *_vsR, int _nR, double _period, double _boundingRadius)

Private Attributes

double boundingRadius
int nB
int nL
int nR
double period
VSOPSeriesvsB
VSOPSeriesvsL
VSOPSeriesvsR

Constructor & Destructor Documentation

VSOP87Orbit::VSOP87Orbit VSOPSeries _vsL,
int  _nL,
VSOPSeries _vsB,
int  _nB,
VSOPSeries _vsR,
int  _nR,
double  _period,
double  _boundingRadius
[inline]
 

Definition at line 17507 of file vsop87.cpp.

References boundingRadius, nB, nL, nR, period, vsB, vsL, and vsR.

17511                                         :
17512         vsL(_vsL), nL(_nL),
17513         vsB(_vsB), nB(_nB),
17514         vsR(_vsR), nR(_nR),
17515         period(_period),
17516         boundingRadius(_boundingRadius)
17517     {
17518     };


Member Function Documentation

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

Implements CachingOrbit.

Definition at line 17530 of file vsop87.cpp.

References cos(), KM_PER_AU, nB, nL, nR, PI, sin(), SumSeries(), vsB, vsL, and vsR.

17531     {
17532         // t is Julian millenia since J2000.0
17533         double t = (jd - 2451545.0) / 365250.0;
17534 
17535         // Heliocentric coordinates
17536         double l = 0.0; // longitude
17537         double b = 0.0; // latitude
17538         double r = 0.0; // radius
17539         
17540         int i;
17541         double T;
17542 
17543         // Evaluate series for l
17544         T = 1;
17545         for (i = 0; i < nL; i++)
17546         {
17547             l += SumSeries(vsL[i], t) * T;
17548             T = t * T;
17549         }
17550 
17551         // Evaluate series for b
17552         T = 1;
17553         for (i = 0; i < nB; i++)
17554         {
17555             b += SumSeries(vsB[i], t) * T;
17556             T = t * T;
17557         }
17558 
17559         // Evaluate series for r
17560         T = 1;
17561         for (i = 0; i < nR; i++)
17562         {
17563             r += SumSeries(vsR[i], t) * T;
17564             T = t * T;
17565         }
17566 #if 0        
17567         // l and b are in units of 1e+8 radians
17568         l *= 1.0e-8;
17569         b *= 1.0e-8;
17570         // r is in units of 1e-8 AU
17571         r *= (KM_PER_AU / 100000000.0);
17572 #endif
17573         r *= KM_PER_AU;
17574 
17575         // Corrections for internal coordinate system
17576         b -= PI / 2;
17577         l += PI;
17578 
17579         return Point3d(cos(l) * sin(b) * r,
17580                        cos(b) * r,
17581                        -sin(l) * sin(b) * r);
17582     }

double VSOP87Orbit::getBoundingRadius  )  const [inline, virtual]
 

Implements CachingOrbit.

Definition at line 17525 of file vsop87.cpp.

References boundingRadius.

17526     {
17527         return boundingRadius;
17528     }

double VSOP87Orbit::getPeriod  )  const [inline, virtual]
 

Implements CachingOrbit.

Definition at line 17520 of file vsop87.cpp.

References period.

17521     {
17522         return period;
17523     }


Member Data Documentation

double VSOP87Orbit::boundingRadius [private]
 

Definition at line 17504 of file vsop87.cpp.

Referenced by getBoundingRadius(), and VSOP87Orbit().

int VSOP87Orbit::nB [private]
 

Definition at line 17500 of file vsop87.cpp.

Referenced by computePosition(), and VSOP87Orbit().

int VSOP87Orbit::nL [private]
 

Definition at line 17498 of file vsop87.cpp.

Referenced by computePosition(), and VSOP87Orbit().

int VSOP87Orbit::nR [private]
 

Definition at line 17502 of file vsop87.cpp.

Referenced by computePosition(), and VSOP87Orbit().

double VSOP87Orbit::period [private]
 

Definition at line 17503 of file vsop87.cpp.

Referenced by getPeriod(), and VSOP87Orbit().

VSOPSeries* VSOP87Orbit::vsB [private]
 

Definition at line 17499 of file vsop87.cpp.

Referenced by computePosition(), and VSOP87Orbit().

VSOPSeries* VSOP87Orbit::vsL [private]
 

Definition at line 17497 of file vsop87.cpp.

Referenced by computePosition(), and VSOP87Orbit().

VSOPSeries* VSOP87Orbit::vsR [private]
 

Definition at line 17501 of file vsop87.cpp.

Referenced by computePosition(), and VSOP87Orbit().


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