orsa_frame.h

Go to the documentation of this file.
00001 /* 
00002    ORSA - Orbit Reconstruction, Simulation and Analysis
00003    Copyright (C) 2002-2004 Pasquale Tricarico
00004    
00005    This program is free software; you can redistribute it and/or
00006    modify it under the terms of the GNU General Public License
00007    as published by the Free Software Foundation; either version 2
00008    of the License, or (at your option) any later version.
00009    
00010    As a special exception, Pasquale Tricarico gives permission to
00011    link this program with Qt commercial edition, and distribute the
00012    resulting executable, without including the source code for the Qt
00013    commercial edition in the source distribution.
00014    
00015    This program is distributed in the hope that it will be useful,
00016    but WITHOUT ANY WARRANTY; without even the implied warranty of
00017    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00018    GNU General Public License for more details.
00019    
00020    You should have received a copy of the GNU General Public License
00021    along with this program; if not, write to the Free Software
00022    Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
00023 */
00024 
00025 #ifndef _ORSA_FRAME_H_
00026 #define _ORSA_FRAME_H_
00027 
00028 #include <vector>
00029 #include <list>
00030 
00031 #include "orsa_body.h"
00032 #include "orsa_common.h"
00033 
00034 namespace orsa {
00035   
00036   class Frame : public std::vector<Body>, public UniverseTypeAwareTime {
00037   public:
00038     Frame();
00039     Frame(const UniverseTypeAwareTime &);
00040     Frame(const Frame &);
00041     virtual ~Frame() { }
00042     
00043   public:
00044     virtual unsigned int size() const { return std::vector<Body>::size(); }
00045     
00046     // used to sort frames for increasing time 
00047     bool operator < (const Frame &) const;
00048     
00049   public:       
00050     void ForceJPLEphemerisData();
00051     
00052   public:
00053     Vector CenterOfMass() const;
00054     Vector CenterOfMassVelocity() const;
00055     Vector Barycenter() const;
00056     Vector BarycenterVelocity() const;
00057     Vector RelativisticBarycenter() const;
00058     Vector RelativisticBarycenterVelocity() const;
00059     Vector AngularMomentum(const Vector&) const;
00060     Vector BarycentricAngularMomentum() const;
00061   };
00062   
00063   void print(const Frame&);
00064   
00065   double KineticEnergy(const std::vector<Body>&);
00066   
00067   Vector CenterOfMass(const std::vector<Body>&);
00068   Vector CenterOfMassVelocity(const std::vector<Body>&);
00069   Vector Barycenter(const std::vector<Body>&);
00070   Vector BarycenterVelocity(const std::vector<Body>&);
00071   Vector RelativisticBarycenter(const std::vector<Body>&);
00072   Vector RelativisticBarycenterVelocity(const std::vector<Body>&);
00073   Vector AngularMomentum(const std::vector<Body>&, const Vector&);
00074   Vector BarycentricAngularMomentum(const std::vector<Body>&);
00075   
00076 } // namespace orsa
00077 
00078 #endif // _ORSA_FRAME_H_

Generated on Fri Nov 3 20:37:42 2006 for liborsa by  doxygen 1.4.7