Body Class Reference

#include <orsa_body.h>

Inheritance diagram for Body:

Inheritance graph
[legend]
Collaboration diagram for Body:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 Body ()
 Body (const double mass)
 Body (const std::string &name)
 Body (const std::string &name, const double mass)
 Body (const std::string &name, const double mass, const double radius)
 Body (const std::string &name, const double mass, const double radius, const JPL_planets p)
 Body (const std::string &name, const double mass, const Vector &position, const Vector &velocity)
 Body (const std::string &name, const double mass, const double radius, const Vector &position, const Vector &velocity)
 Body (const std::string &name, const double mass, const double radius, const double J2, const double J3, const double J4)
 Body (const std::string &name, const double mass, const double radius, const JPL_planets p, const double J2, const double J3, const double J4)
 Body (const std::string &name, const double mass, const double radius, const double J2, const double J3, const double J4, const double C22, const double C31, const double C32, const double C33, const double C41, const double C42, const double C43, const double C44, const double S31, const double S32, const double S33, const double S41, const double S42, const double S43, const double S44)
 Body (const std::string &name, const double mass, const double radius, const JPL_planets p, const double J2, const double J3, const double J4, const double C22, const double C31, const double C32, const double C33, const double C41, const double C42, const double C43, const double C44, const double S31, const double S32, const double S33, const double S41, const double S42, const double S43, const double S44)
 Body (const std::string &name, const double mass, const Vector &position, const Vector &velocity, const double J2, const double J3, const double J4)
 Body (const std::string &name, const double mass, const double radius, const Vector &position, const Vector &velocity, const double J2, const double J3, const double J4)
 Body (const Body &)
 Body (const BodyWithEpoch &)
 Body (const JPLBody &)
virtual ~Body ()
Bodyoperator= (const Body &)
const std::string & name () const
double mass () const
double mu () const
bool has_zero_mass () const
double radius () const
JPL_planets JPLPlanet () const
double J2 () const
double J3 () const
double J4 () const
double C22 () const
double C31 () const
double C32 () const
double C33 () const
double C41 () const
double C42 () const
double C43 () const
double C44 () const
double S31 () const
double S32 () const
double S33 () const
double S41 () const
double S42 () const
double S43 () const
double S44 () const
const Vectorposition () const
const Vectorvelocity () const
void AddToPosition (const Vector &v)
void AddToVelocity (const Vector &v)
void SetPosition (const Vector &v)
void SetPosition (const double x, const double y, const double z)
void SetVelocity (const Vector &v)
void SetVelocity (const double x, const double y, const double z)
Vector Body::distanceVector (const Body &b) const
double distance (const Body &b) const
Vector DistanceVector (const Body &b) const
double Distance (const Body &b) const
double KineticEnergy () const
unsigned int BodyId () const
bool operator< (const Body &b) const

Protected Attributes

BodyConstantsbc
Vector _position
Vector _velocity

Constructor & Destructor Documentation

Body  ) 
 

Definition at line 94 of file orsa_body.cc.

References Body::bc.

00094              {
00095     bc = new BodyConstants();
00096   }

Body const double  mass  ) 
 

Definition at line 98 of file orsa_body.cc.

References Body::bc.

00098                               {
00099     bc = new BodyConstants("",mass,0);
00100   }

Body const std::string &  name  ) 
 

Definition at line 102 of file orsa_body.cc.

References Body::bc, and Body::name().

00102                                 {
00103     bc = new BodyConstants(name,0,0);
00104   }

Here is the call graph for this function:

Body const std::string &  name,
const double  mass
 

Definition at line 106 of file orsa_body.cc.

References Body::bc, and Body::name().

00106                                                    {
00107     bc = new BodyConstants(name,mass,0);
00108   }

Here is the call graph for this function:

Body const std::string &  name,
const double  mass,
const double  radius
 

Definition at line 110 of file orsa_body.cc.

References Body::bc, Body::name(), and orsa::radius().

00110                                                                         {
00111     bc = new BodyConstants(name,mass,radius);
00112   }

Here is the call graph for this function:

Body const std::string &  name,
const double  mass,
const double  radius,
const JPL_planets  p
 

Definition at line 114 of file orsa_body.cc.

References Body::bc, Body::name(), and orsa::radius().

00114                                                                                              {
00115     bc = new BodyConstants(name,mass,radius,p);
00116   }

Here is the call graph for this function:

Body const std::string &  name,
const double  mass,
const Vector position,
const Vector velocity
 

Definition at line 118 of file orsa_body.cc.

References Body::_position, Body::_velocity, Body::bc, Body::name(), Body::position(), and Body::velocity().

00118                                                                                                    {
00119     bc = new BodyConstants(name,mass,0);
00120     _position = position;
00121     _velocity = velocity;
00122   }

Here is the call graph for this function:

Body const std::string &  name,
const double  mass,
const double  radius,
const Vector position,
const Vector velocity
 

Definition at line 124 of file orsa_body.cc.

References Body::_position, Body::_velocity, Body::bc, Body::name(), Body::position(), orsa::radius(), and Body::velocity().

00124                                                                                                                         {
00125     bc = new BodyConstants(name,mass,radius);
00126     _position = position;
00127     _velocity = velocity;
00128   }

Here is the call graph for this function:

Body const std::string &  name,
const double  mass,
const double  radius,
const double  J2,
const double  J3,
const double  J4
 

Definition at line 130 of file orsa_body.cc.

References Body::bc, Body::name(), and orsa::radius().

00130                                                                                                                            {
00131     bc = new BodyConstants(name,mass,radius,J2,J3,J4);
00132   }

Here is the call graph for this function:

Body const std::string &  name,
const double  mass,
const double  radius,
const JPL_planets  p,
const double  J2,
const double  J3,
const double  J4
 

Definition at line 134 of file orsa_body.cc.

References Body::bc, Body::name(), and orsa::radius().

00134                                                                                                                                                 {
00135     bc = new BodyConstants(name,mass,radius,p,J2,J3,J4);
00136   }

Here is the call graph for this function:

Body const std::string &  name,
const double  mass,
const double  radius,
const double  J2,
const double  J3,
const double  J4,
const double  C22,
const double  C31,
const double  C32,
const double  C33,
const double  C41,
const double  C42,
const double  C43,
const double  C44,
const double  S31,
const double  S32,
const double  S33,
const double  S41,
const double  S42,
const double  S43,
const double  S44
 

Definition at line 138 of file orsa_body.cc.

References Body::bc, Body::name(), and orsa::radius().

00138                                                                                                                                                                                                                                                                                                                                                                                                          {
00139     bc = new BodyConstants(name,mass,radius,J2,J3,J4,C22,C31,C32,C33,C41,C42,C43,C44,S31,S32,S33,S41,S42,S43,S44);
00140   }

Here is the call graph for this function:

Body const std::string &  name,
const double  mass,
const double  radius,
const JPL_planets  p,
const double  J2,
const double  J3,
const double  J4,
const double  C22,
const double  C31,
const double  C32,
const double  C33,
const double  C41,
const double  C42,
const double  C43,
const double  C44,
const double  S31,
const double  S32,
const double  S33,
const double  S41,
const double  S42,
const double  S43,
const double  S44
 

Definition at line 142 of file orsa_body.cc.

References Body::bc, Body::name(), and orsa::radius().

00142                                                                                                                                                                                                                                                                                                                                                                                                                               {
00143     bc = new BodyConstants(name,mass,radius,p,J2,J3,J4,C22,C31,C32,C33,C41,C42,C43,C44,S31,S32,S33,S41,S42,S43,S44);
00144   }

Here is the call graph for this function:

Body const std::string &  name,
const double  mass,
const Vector position,
const Vector velocity,
const double  J2,
const double  J3,
const double  J4
 

Definition at line 146 of file orsa_body.cc.

References Body::_position, Body::_velocity, Body::bc, Body::name(), Body::position(), and Body::velocity().

00146                                                                                                                                                       {
00147     bc = new BodyConstants(name,mass,0,J2,J3,J4);
00148     _position = position;
00149     _velocity = velocity;
00150   }

Here is the call graph for this function:

Body const std::string &  name,
const double  mass,
const double  radius,
const Vector position,
const Vector velocity,
const double  J2,
const double  J3,
const double  J4
 

Definition at line 152 of file orsa_body.cc.

References Body::_position, Body::_velocity, Body::bc, Body::name(), Body::position(), orsa::radius(), and Body::velocity().

00152                                                                                                                                                                            {
00153     bc = new BodyConstants(name,mass,radius,J2,J3,J4);
00154     _position = position;
00155     _velocity = velocity;
00156   }

Here is the call graph for this function:

Body const Body  ) 
 

Definition at line 158 of file orsa_body.cc.

References Body::_position, Body::_velocity, BodyConstants::AddUser(), and Body::bc.

00158                            {     
00159     bc = b.bc; 
00160     bc->AddUser();
00161     _position = b._position;
00162     _velocity = b._velocity;
00163   }

Here is the call graph for this function:

Body const BodyWithEpoch  ) 
 

Definition at line 165 of file orsa_body.cc.

References Body::_position, Body::_velocity, BodyConstants::AddUser(), and Body::bc.

00165                                     {
00166     bc = b.bc; 
00167     bc->AddUser();
00168     _position = b._position;
00169     _velocity = b._velocity;
00170   }

Here is the call graph for this function:

Body const JPLBody  ) 
 

Definition at line 172 of file orsa_body.cc.

References Body::_position, Body::_velocity, BodyConstants::AddUser(), and Body::bc.

00172                               {
00173     bc = b.bc; 
00174     bc->AddUser();
00175     _position = b.position();
00176     _velocity = b.velocity();
00177   }

Here is the call graph for this function:

~Body  )  [virtual]
 

Definition at line 179 of file orsa_body.cc.

References Body::bc, BodyConstants::RemoveUser(), and BodyConstants::Users().

00179               {
00180     bc->RemoveUser();
00181     if (bc->Users() == 0) {
00182       delete bc;
00183       bc = 0;
00184     }
00185   }

Here is the call graph for this function:


Member Function Documentation

void AddToPosition const Vector v  )  [inline]
 

Definition at line 176 of file orsa_body.h.

References Body::_position.

00176 { _position += v; }

void AddToVelocity const Vector v  )  [inline]
 

Definition at line 177 of file orsa_body.h.

References Body::_velocity.

00177 { _velocity += v; }

Vector Body::distanceVector const Body b  )  const [inline]
 

Definition at line 186 of file orsa_body.h.

References Body::Body::distanceVector(), and Body::position().

Referenced by Body::Body::distanceVector().

00186 { return b.position()-position(); }

Here is the call graph for this function:

unsigned int BodyId  )  const [inline]
 

Definition at line 196 of file orsa_body.h.

00196 { return bc->BodyId(); }

double C22  )  const [inline]
 

Definition at line 157 of file orsa_body.h.

References Body::bc, and BodyConstants::C22().

00157 { return bc->C22(); }

Here is the call graph for this function:

double C31  )  const [inline]
 

Definition at line 158 of file orsa_body.h.

References Body::bc, and BodyConstants::C31().

00158 { return bc->C31(); }

Here is the call graph for this function:

double C32  )  const [inline]
 

Definition at line 159 of file orsa_body.h.

References Body::bc, and BodyConstants::C32().

00159 { return bc->C32(); }

Here is the call graph for this function:

double C33  )  const [inline]
 

Definition at line 160 of file orsa_body.h.

References Body::bc, and BodyConstants::C33().

00160 { return bc->C33(); }

Here is the call graph for this function:

double C41  )  const [inline]
 

Definition at line 161 of file orsa_body.h.

References Body::bc, and BodyConstants::C41().

00161 { return bc->C41(); }

Here is the call graph for this function:

double C42  )  const [inline]
 

Definition at line 162 of file orsa_body.h.

References Body::bc, and BodyConstants::C42().

00162 { return bc->C42(); }

Here is the call graph for this function:

double C43  )  const [inline]
 

Definition at line 163 of file orsa_body.h.

References Body::bc, and BodyConstants::C43().

00163 { return bc->C43(); }

Here is the call graph for this function:

double C44  )  const [inline]
 

Definition at line 164 of file orsa_body.h.

References Body::bc, and BodyConstants::C44().

00164 { return bc->C44(); }

Here is the call graph for this function:

double Distance const Body b  )  const [inline]
 

Definition at line 191 of file orsa_body.h.

00191 { return distance(b); }

double distance const Body b  )  const [inline]
 

Definition at line 187 of file orsa_body.h.

References Vector::Length().

00187 { return distanceVector(b).Length(); }

Here is the call graph for this function:

Vector DistanceVector const Body b  )  const [inline]
 

Definition at line 190 of file orsa_body.h.

00190 { return distanceVector(b); }

bool has_zero_mass  )  const [inline]
 

Definition at line 151 of file orsa_body.h.

References Body::bc, and BodyConstants::has_zero_mass().

00151 { return bc->has_zero_mass(); }

Here is the call graph for this function:

double J2  )  const [inline]
 

Definition at line 154 of file orsa_body.h.

References Body::bc, and BodyConstants::J2().

00154 { return bc->J2(); }

Here is the call graph for this function:

double J3  )  const [inline]
 

Definition at line 155 of file orsa_body.h.

References Body::bc, and BodyConstants::J3().

00155 { return bc->J3(); }

Here is the call graph for this function:

double J4  )  const [inline]
 

Definition at line 156 of file orsa_body.h.

References Body::bc, and BodyConstants::J4().

00156 { return bc->J4(); }

Here is the call graph for this function:

JPL_planets JPLPlanet  )  const [inline]
 

Definition at line 153 of file orsa_body.h.

References Body::bc, and BodyConstants::JPLPlanet().

Referenced by JPLBody::JPLBody(), and JPLBody::SetEpoch().

00153 { return bc->JPLPlanet(); }

Here is the call graph for this function:

double KineticEnergy  )  const [inline]
 

Definition at line 193 of file orsa_body.h.

00193 { return (bc->mass() * _velocity.LengthSquared() / 2.0); }

double mass  )  const [inline]
 

Definition at line 149 of file orsa_body.h.

References Body::bc, and BodyConstants::mass().

Referenced by TLEFile::Read().

00149 { return bc->mass(); };

Here is the call graph for this function:

double mu  )  const [inline]
 

Definition at line 150 of file orsa_body.h.

References Body::bc, and BodyConstants::mu().

00150 { return bc->mu(); };

Here is the call graph for this function:

const std::string& name  )  const [inline]
 

Definition at line 148 of file orsa_body.h.

References Body::bc, and BodyConstants::name().

Referenced by Body::Body().

00148 { return bc->name(); };

Here is the call graph for this function:

bool operator< const Body b  )  const [inline]
 

Definition at line 200 of file orsa_body.h.

00200 { return b.mass() < mass(); }

Body & operator= const Body  ) 
 

Definition at line 187 of file orsa_body.cc.

References Body::_position, Body::_velocity, BodyConstants::AddUser(), Body::bc, BodyConstants::RemoveUser(), and BodyConstants::Users().

00187                                          {  
00188     
00189     if (bc != b.bc) {
00190       bc->RemoveUser();
00191       if (bc->Users() == 0) {
00192         delete bc;
00193         bc = 0;
00194       }
00195       
00196       bc = b.bc; 
00197       bc->AddUser();
00198     }
00199     
00200     _position = b._position;
00201     _velocity = b._velocity;
00202     
00203     return * this;
00204   }

Here is the call graph for this function:

const Vector& position  )  const [inline]
 

Definition at line 173 of file orsa_body.h.

References Body::_position.

Referenced by Body::Body(), Body::Body::distanceVector(), orsa::Compute_Gauss(), Frame::ForceJPLEphemerisData(), and TLEFile::Read().

00173 { return _position; }   

double radius  )  const [inline]
 

Definition at line 152 of file orsa_body.h.

References Body::bc, and BodyConstants::radius().

00152 { return bc->radius(); };

Here is the call graph for this function:

double S31  )  const [inline]
 

Definition at line 165 of file orsa_body.h.

References Body::bc, and BodyConstants::S31().

00165 { return bc->S31(); }

Here is the call graph for this function:

double S32  )  const [inline]
 

Definition at line 166 of file orsa_body.h.

References Body::bc, and BodyConstants::S32().

00166 { return bc->S32(); }

Here is the call graph for this function:

double S33  )  const [inline]
 

Definition at line 167 of file orsa_body.h.

References Body::bc, and BodyConstants::S33().

00167 { return bc->S33(); }

Here is the call graph for this function:

double S41  )  const [inline]
 

Definition at line 168 of file orsa_body.h.

References Body::bc, and BodyConstants::S41().

00168 { return bc->S41(); }

Here is the call graph for this function:

double S42  )  const [inline]
 

Definition at line 169 of file orsa_body.h.

References Body::bc, and BodyConstants::S42().

00169 { return bc->S42(); }

Here is the call graph for this function:

double S43  )  const [inline]
 

Definition at line 170 of file orsa_body.h.

References Body::bc, and BodyConstants::S43().

00170 { return bc->S43(); }

Here is the call graph for this function:

double S44  )  const [inline]
 

Definition at line 171 of file orsa_body.h.

References Body::bc, and BodyConstants::S44().

00171 { return bc->S44(); }

Here is the call graph for this function:

void SetPosition const double  x,
const double  y,
const double  z
[inline]
 

Definition at line 180 of file orsa_body.h.

References Body::SetPosition().

00180 { Vector v(x,y,z); SetPosition(v); }

Here is the call graph for this function:

void SetPosition const Vector v  )  [inline]
 

Definition at line 179 of file orsa_body.h.

References Body::_position.

Referenced by OptimizedOrbitPositions::PropagatedOrbit(), orsa::PropagatedSky_J2000(), and Body::SetPosition().

00179 { _position = v; }

void SetVelocity const double  x,
const double  y,
const double  z
[inline]
 

Definition at line 183 of file orsa_body.h.

References Body::SetVelocity().

00183 { Vector v(x,y,z); SetVelocity(v); }

Here is the call graph for this function:

void SetVelocity const Vector v  )  [inline]
 

Definition at line 182 of file orsa_body.h.

References Body::_velocity.

Referenced by OptimizedOrbitPositions::PropagatedOrbit(), orsa::PropagatedSky_J2000(), and Body::SetVelocity().

00182 { _velocity = v; }

const Vector& velocity  )  const [inline]
 

Definition at line 174 of file orsa_body.h.

References Body::_velocity.

Referenced by Body::Body(), Frame::ForceJPLEphemerisData(), and TLEFile::Read().

00174 { return _velocity; }


Member Data Documentation

Vector _position [protected]
 

Definition at line 206 of file orsa_body.h.

Referenced by Body::AddToPosition(), Body::Body(), Body::operator=(), Body::position(), and Body::SetPosition().

Vector _velocity [protected]
 

Definition at line 206 of file orsa_body.h.

Referenced by Body::AddToVelocity(), Body::Body(), Body::operator=(), Body::SetVelocity(), and Body::velocity().

BodyConstants* bc [protected]
 

Definition at line 203 of file orsa_body.h.

Referenced by Body::Body(), Body::C22(), Body::C31(), Body::C32(), Body::C33(), Body::C41(), Body::C42(), Body::C43(), Body::C44(), Body::has_zero_mass(), Body::J2(), Body::J3(), Body::J4(), Body::JPLPlanet(), Body::mass(), Body::mu(), Body::name(), Body::operator=(), Body::radius(), Body::S31(), Body::S32(), Body::S33(), Body::S41(), Body::S42(), Body::S43(), Body::S44(), and Body::~Body().


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