Frame Class Reference

#include <orsa_frame.h>

Inheritance diagram for Frame:

Inheritance graph
[legend]
Collaboration diagram for Frame:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 Frame ()
 Frame (const UniverseTypeAwareTime &)
 Frame (const Frame &)
virtual ~Frame ()
virtual unsigned int size () const
bool operator< (const Frame &) const
void ForceJPLEphemerisData ()
Vector CenterOfMass () const
Vector CenterOfMassVelocity () const
Vector Barycenter () const
Vector BarycenterVelocity () const
Vector RelativisticBarycenter () const
Vector RelativisticBarycenterVelocity () const
Vector AngularMomentum (const Vector &) const
Vector BarycentricAngularMomentum () const
double Time () const
double GetTime () const
Date GetDate () const
virtual void SetTime (const double)
virtual void SetTime (const Date &)
virtual void SetTime (const UniverseTypeAwareTime &)
virtual void SetDate (const Date &)
UniverseTypeAwareTimeoperator+= (const UniverseTypeAwareTimeStep &)
UniverseTypeAwareTimeoperator-= (const UniverseTypeAwareTimeStep &)
UniverseTypeAwareTimeStep operator- (const UniverseTypeAwareTime &) const
UniverseTypeAwareTime operator- (const UniverseTypeAwareTimeStep &) const
UniverseTypeAwareTime operator+ (const UniverseTypeAwareTimeStep &) const
bool operator== (const UniverseTypeAwareTime &) const
bool operator!= (const UniverseTypeAwareTime &) const
bool operator< (const UniverseTypeAwareTime &) const
bool operator> (const UniverseTypeAwareTime &) const
bool operator<= (const UniverseTypeAwareTime &) const
bool operator>= (const UniverseTypeAwareTime &) const

Protected Attributes

double time
Date date

Constructor & Destructor Documentation

Frame  ) 
 

Definition at line 36 of file orsa_frame.cc.

00036 : vector<Body>(), UniverseTypeAwareTime() { }

Frame const UniverseTypeAwareTime  ) 
 

Definition at line 38 of file orsa_frame.cc.

00038 : vector<Body>(), UniverseTypeAwareTime(t) { }

Frame const Frame  ) 
 

Definition at line 40 of file orsa_frame.cc.

00040                               : vector<Body>(f), UniverseTypeAwareTime(f) {
00041     
00042   }

virtual ~Frame  )  [inline, virtual]
 

Definition at line 41 of file orsa_frame.h.

00041 { }


Member Function Documentation

Vector AngularMomentum const Vector  )  const
 

Definition at line 184 of file orsa_frame.cc.

00184                                                            {
00185     return (orsa::AngularMomentum(*this,center));
00186   }

Vector Barycenter  )  const
 

Definition at line 74 of file orsa_frame.cc.

00074                                  {
00075     return (orsa::Barycenter(*this));
00076   }

Vector BarycenterVelocity  )  const
 

Definition at line 78 of file orsa_frame.cc.

00078                                          {
00079     return (orsa::BarycenterVelocity(*this));
00080   }

Vector BarycentricAngularMomentum  )  const
 

Definition at line 199 of file orsa_frame.cc.

00199                                                  {
00200     return (orsa::BarycentricAngularMomentum(*this));
00201   }

Vector CenterOfMass  )  const
 

Definition at line 66 of file orsa_frame.cc.

00066                                    {
00067     return (orsa::CenterOfMass(*this));
00068   }

Vector CenterOfMassVelocity  )  const
 

Definition at line 70 of file orsa_frame.cc.

00070                                            {
00071     return (orsa::CenterOfMassVelocity(*this));
00072   }

void ForceJPLEphemerisData  ) 
 

Definition at line 48 of file orsa_frame.cc.

References Universe::GetUniverseType(), orsa::NONE, Body::position(), orsa::Real, Frame::size(), orsa::universe, and Body::velocity().

Referenced by Evolution::Integrate(), DissipativeRungeKutta::Step(), and RungeKutta::Step().

00048                                     {
00049     if (universe->GetUniverseType() != Real) return;
00050     for (unsigned int k=0;k<size();++k) {
00051       const JPL_planets p = (*this)[k].JPLPlanet();
00052       if (p == NONE) continue;
00053       JPLBody jb(p,*this);
00054       (*this)[k].SetPosition(jb.position());
00055       (*this)[k].SetVelocity(jb.velocity());      
00056     }
00057   }

Here is the call graph for this function:

Date GetDate  )  const [inherited]
 

Definition at line 1307 of file orsa_units.cc.

References UniverseTypeAwareTime::date.

Referenced by JPLPlanetsNewton::Acceleration(), Evolution::Integrate(), and orsa::StartFrame().

01307                                             {
01308     return (date);
01309   }

double GetTime  )  const [inherited]
 

Definition at line 1290 of file orsa_units.cc.

References UniverseTypeAwareTime::date, Date::GetTime(), Universe::GetUniverseType(), orsa::Real, orsa::Simulated, UniverseTypeAwareTime::time, and orsa::universe.

Referenced by orsa::PropagatedSky_J2000(), orsa::SetupSolarSystem(), and UniverseTypeAwareTime::Time().

01290                                               {
01291     double _t = 0.0;
01292     switch (universe->GetUniverseType()) {
01293     case Real:
01294       _t = date.GetTime();
01295       break;
01296     case Simulated:
01297       _t = time;
01298       break;
01299     }
01300     return _t;
01301   }

Here is the call graph for this function:

bool operator!= const UniverseTypeAwareTime  )  const [inherited]
 

Definition at line 1494 of file orsa_units.cc.

01494                                                                                 {
01495     return (!((*this) == t));
01496   }

UniverseTypeAwareTime operator+ const UniverseTypeAwareTimeStep  )  const [inherited]
 

Definition at line 1416 of file orsa_units.cc.

References UniverseTypeAwareTime::date, Universe::GetUniverseType(), orsa::Real, orsa::Simulated, UniverseTypeAwareTime::time, orsa::universe, and UniverseTypeAwareTime::UniverseTypeAwareTime().

01416                                                                                                      {
01417     switch (universe->GetUniverseType()) {
01418     case Real:
01419       {
01420         UniverseTypeAwareTime _t(date);
01421         _t += ts;
01422         return _t;
01423       }
01424       break;
01425     case Simulated:
01426       {
01427         UniverseTypeAwareTime _t(time);
01428         _t += ts;
01429         return _t;
01430       }
01431       break;
01432     }
01433     return UniverseTypeAwareTime();
01434   }

Here is the call graph for this function:

UniverseTypeAwareTime & operator+= const UniverseTypeAwareTimeStep  )  [inherited]
 

Definition at line 1456 of file orsa_units.cc.

References UniverseTypeAwareTime::date, Universe::GetUniverseType(), orsa::Real, orsa::Simulated, UniverseTypeAwareTime::time, and orsa::universe.

01456                                                                                                      {
01457     switch (universe->GetUniverseType()) {
01458     case Real:
01459       date += ts_in;
01460       break;
01461     case Simulated:
01462       time += ts_in.GetDouble();
01463       break;
01464     }
01465     return * this;
01466   }

Here is the call graph for this function:

UniverseTypeAwareTime operator- const UniverseTypeAwareTimeStep  )  const [inherited]
 

Definition at line 1436 of file orsa_units.cc.

References UniverseTypeAwareTime::date, Universe::GetUniverseType(), orsa::Real, orsa::Simulated, UniverseTypeAwareTime::time, orsa::universe, and UniverseTypeAwareTime::UniverseTypeAwareTime().

01436                                                                                                      {
01437     switch (universe->GetUniverseType()) {
01438     case Real:
01439       {
01440         UniverseTypeAwareTime _t(date);
01441         _t -= ts;
01442         return _t;
01443       }
01444       break;
01445     case Simulated:
01446       {
01447         UniverseTypeAwareTime _t(time);
01448         _t -= ts;
01449         return _t;
01450       }
01451       break;
01452     }
01453     return UniverseTypeAwareTime();
01454   }

Here is the call graph for this function:

UniverseTypeAwareTimeStep operator- const UniverseTypeAwareTime  )  const [inherited]
 

Definition at line 1352 of file orsa_units.cc.

References UniverseTypeAwareTime::date, Date::GetTimeStep(), Universe::GetUniverseType(), orsa::Real, orsa::Simulated, UniverseTypeAwareTime::time, and orsa::universe.

01352                                                                                                     {
01353     switch (universe->GetUniverseType()) {
01354     case Real:
01355       {
01356         UniverseTypeAwareTimeStep _ts(date.GetTimeStep());
01357         _ts -= t.GetDate().GetTimeStep();
01358         return _ts;
01359       }
01360       break;
01361     case Simulated:
01362       {
01363         UniverseTypeAwareTimeStep _ts(time);
01364         _ts -= t.Time();
01365         return _ts;
01366       }
01367       break;
01368     }
01369     return UniverseTypeAwareTimeStep();
01370   }

Here is the call graph for this function:

UniverseTypeAwareTime & operator-= const UniverseTypeAwareTimeStep  )  [inherited]
 

Definition at line 1468 of file orsa_units.cc.

References UniverseTypeAwareTime::date, Universe::GetUniverseType(), orsa::Real, orsa::Simulated, UniverseTypeAwareTime::time, and orsa::universe.

01468                                                                                                      {
01469     switch (universe->GetUniverseType()) {
01470     case Real:
01471       date -= ts_in;
01472       break;
01473     case Simulated:
01474       time -= ts_in.GetDouble();
01475       break;
01476     }
01477     return * this;
01478   }

Here is the call graph for this function:

bool operator< const UniverseTypeAwareTime  )  const [inherited]
 

Definition at line 1498 of file orsa_units.cc.

References UniverseTypeAwareTime::date, Date::GetTimeStep(), Universe::GetUniverseType(), orsa::Real, orsa::Simulated, UniverseTypeAwareTime::time, and orsa::universe.

01498                                                                                {
01499     if (*this == t) return false;
01500     bool _z = false;
01501     switch (universe->GetUniverseType()) {
01502     case Real:
01503       if (date.GetTimeStep() < t.GetDate().GetTimeStep()) _z = true;
01504       break;
01505     case Simulated:
01506       if (time < t.time) _z = true;
01507       break;
01508     }
01509     return _z;
01510   }

Here is the call graph for this function:

bool operator< const Frame  )  const
 

Definition at line 44 of file orsa_frame.cc.

00044                                                {
00045     return (this->UniverseTypeAwareTime::operator < (f));
00046   }

bool operator<= const UniverseTypeAwareTime  )  const [inherited]
 

Definition at line 1526 of file orsa_units.cc.

References UniverseTypeAwareTime::date, Date::GetTimeStep(), Universe::GetUniverseType(), orsa::Real, orsa::Simulated, UniverseTypeAwareTime::time, and orsa::universe.

01526                                                                                 {
01527     bool _z = false;
01528     switch (universe->GetUniverseType()) {
01529     case Real:
01530       if (date.GetTimeStep() <= t.GetDate().GetTimeStep()) _z = true;
01531       break;
01532     case Simulated:
01533       if (time <= t.time) _z = true;
01534       break;
01535     }
01536     return _z;
01537   }

Here is the call graph for this function:

bool operator== const UniverseTypeAwareTime  )  const [inherited]
 

Definition at line 1480 of file orsa_units.cc.

References UniverseTypeAwareTime::date, Universe::GetUniverseType(), orsa::Real, orsa::Simulated, UniverseTypeAwareTime::time, and orsa::universe.

01480                                                                                 {
01481     bool _z = false;
01482     switch (universe->GetUniverseType()) {
01483     case Real:
01484       // if (date.GetTimeStep() == t.GetDate().GetTimeStep()) _z = true;
01485       if (date == t.GetDate()) _z = true;
01486       break;
01487     case Simulated:
01488       if (time == t.time) _z = true;
01489       break;
01490     }
01491     return _z;
01492   }

Here is the call graph for this function:

bool operator> const UniverseTypeAwareTime  )  const [inherited]
 

Definition at line 1512 of file orsa_units.cc.

References UniverseTypeAwareTime::date, Date::GetTimeStep(), Universe::GetUniverseType(), orsa::Real, orsa::Simulated, UniverseTypeAwareTime::time, and orsa::universe.

01512                                                                                {
01513     if (*this == t) return false;
01514     bool _z = false;
01515     switch (universe->GetUniverseType()) {
01516     case Real:
01517       if (date.GetTimeStep() > t.GetDate().GetTimeStep()) _z = true;
01518       break;
01519     case Simulated:
01520       if (time > t.time) _z = true;
01521       break;
01522     }
01523     return _z;
01524   }

Here is the call graph for this function:

bool operator>= const UniverseTypeAwareTime  )  const [inherited]
 

Definition at line 1539 of file orsa_units.cc.

References UniverseTypeAwareTime::date, Date::GetTimeStep(), Universe::GetUniverseType(), orsa::Real, orsa::Simulated, UniverseTypeAwareTime::time, and orsa::universe.

01539                                                                                 {
01540     bool _z = false;
01541     switch (universe->GetUniverseType()) {
01542     case Real:
01543       if (date.GetTimeStep() >= t.GetDate().GetTimeStep()) _z = true;
01544       break;
01545     case Simulated:
01546       if (time >= t.time) _z = true;
01547       break;
01548     }
01549     return _z;
01550   }

Here is the call graph for this function:

Vector RelativisticBarycenter  )  const
 

Definition at line 114 of file orsa_frame.cc.

00114                                              {
00115     return (orsa::RelativisticBarycenter(*this));
00116   }

Vector RelativisticBarycenterVelocity  )  const
 

Definition at line 118 of file orsa_frame.cc.

00118                                                      {
00119     return (orsa::RelativisticBarycenterVelocity(*this));
00120   }

void SetDate const Date  )  [virtual, inherited]
 

Definition at line 1320 of file orsa_units.cc.

References UniverseTypeAwareTime::date, Date::GetTime(), and UniverseTypeAwareTime::time.

Referenced by orsa::PropagatedSky_J2000(), NEODYSCAT::Read(), JPLDastcomCometFile::Read(), JPLDastcomUnnumFile::Read(), JPLDastcomNumFile::Read(), AstDySMatrixFile::Read(), MPCCometFile::Read(), MPCOrbFile::Read(), AstorbFile::Read(), UniverseTypeAwareTime::SetTime(), and orsa::StartFrame().

01320                                                      {
01321     date = d;
01322     time = d.GetTime();
01323   }

Here is the call graph for this function:

void SetTime const UniverseTypeAwareTime  )  [virtual, inherited]
 

Definition at line 1325 of file orsa_units.cc.

References UniverseTypeAwareTime::date, and UniverseTypeAwareTime::time.

01325                                                                      {
01326     date = t.date;
01327     time = t.time;
01328   }

void SetTime const Date  )  [virtual, inherited]
 

Definition at line 1316 of file orsa_units.cc.

References UniverseTypeAwareTime::SetDate().

01316                                                     {
01317     SetDate(d);
01318   }

Here is the call graph for this function:

void SetTime const   double  )  [virtual, inherited]
 

Definition at line 1311 of file orsa_units.cc.

References UniverseTypeAwareTime::date, orsa::DAY, orsa::FromUnits(), Date::SetJulian(), and UniverseTypeAwareTime::time.

Referenced by Mercury5IntegrationFile::Read(), SWIFTFile::Read(), orsa::SearchCloseApproaches(), orsa::StartFrame(), DissipativeRungeKutta::Step(), RungeKutta::Step(), and UniverseTypeAwareTime::UniverseTypeAwareTime().

01311                                                      {
01312     date.SetJulian(FromUnits(t,DAY,-1));
01313     time = t;
01314   }

Here is the call graph for this function:

virtual unsigned int size  )  const [inline, virtual]
 

Definition at line 44 of file orsa_frame.h.

Referenced by JPLPlanetsNewton::Acceleration(), Frame::ForceJPLEphemerisData(), OptimizedOrbitPositions::PropagatedOrbit(), orsa::PropagatedSky_J2000(), orsa::StartFrame(), DissipativeRungeKutta::Step(), and RungeKutta::Step().

00044 { return std::vector<Body>::size(); }

double Time  )  const [inherited]
 

Definition at line 1303 of file orsa_units.cc.

References UniverseTypeAwareTime::GetTime().

Referenced by Evolution::Integrate(), OptimizedOrbitPositions::PropagatedOrbit(), JPLDastcomCometFile::Read(), MPCCometFile::Read(), OrbitWithEpoch::RelativePosVel(), and orsa::StartFrame().

01303                                            {
01304     return (GetTime());
01305   }

Here is the call graph for this function:


Member Data Documentation

Date date [protected, inherited]
 

Definition at line 471 of file orsa_units.h.

Referenced by UniverseTypeAwareTime::GetDate(), UniverseTypeAwareTime::GetTime(), UniverseTypeAwareTime::operator+(), UniverseTypeAwareTime::operator+=(), UniverseTypeAwareTime::operator-(), UniverseTypeAwareTime::operator-=(), UniverseTypeAwareTime::operator<(), UniverseTypeAwareTime::operator<=(), UniverseTypeAwareTime::operator==(), UniverseTypeAwareTime::operator>(), UniverseTypeAwareTime::operator>=(), UniverseTypeAwareTime::SetDate(), UniverseTypeAwareTime::SetTime(), and UniverseTypeAwareTime::UniverseTypeAwareTime().

double time [protected, inherited]
 

Definition at line 470 of file orsa_units.h.

Referenced by UniverseTypeAwareTime::GetTime(), UniverseTypeAwareTime::operator+(), UniverseTypeAwareTime::operator+=(), UniverseTypeAwareTime::operator-(), UniverseTypeAwareTime::operator-=(), UniverseTypeAwareTime::operator<(), UniverseTypeAwareTime::operator<=(), UniverseTypeAwareTime::operator==(), UniverseTypeAwareTime::operator>(), UniverseTypeAwareTime::operator>=(), UniverseTypeAwareTime::SetDate(), UniverseTypeAwareTime::SetTime(), and UniverseTypeAwareTime::UniverseTypeAwareTime().


The documentation for this class was generated from the following files:
Generated on Tue Jan 11 15:29:04 2005 for liborsa by  doxygen 1.4.0