Main Page   Namespace List   Class Hierarchy   Compound List   File List   Namespace Members   Compound Members   File Members  

Orbit.h

Go to the documentation of this file.
00001 // $Id: Orbit.h,v 1.5 2001/10/18 03:30:16 srobinsn Exp $
00002 
00003 
00004 #ifndef ORBIT_H
00005 #define ORBIT_H
00006 
00007 // Orbit
00008 //
00013 //
00033 #include <utility>        // for STL pairs
00034 
00035 
00036 class Orbit{
00037     
00038 public:
00040     Orbit(double asclon = 0., double alt = 600., double inc = 28.5, double phs = 0.,
00041           double apitch = 0., double ayaw = 0., double aroll = 0.);
00042  
00044     double get_phase (double time) const;
00045 
00047     std::pair<double,double> coords(double time) const;
00048 
00050     virtual double latitude(double time) const;
00051 
00054     virtual double longitude(double time) const;
00055 
00058     virtual double pitch (double time) const;
00059 
00062     virtual double yaw (double time) const;
00063 
00066     virtual double roll (double time) const;
00067 
00069     virtual double phase (double time) const;
00070 
00072     void    inclination ( double inc );
00073 
00075     void    ascendingLon ( double asc );
00076 
00078     void    startphase ( double phi );
00079  
00080        
00082     inline double startphase() const;
00083     inline double period() const;
00084     inline double inclination() const;
00085     inline double altitude() const;
00086     inline double ascendingLon() const;
00087 
00088 protected:
00089     // manipulation of the orbital parameters - defaults do nothing, however
00090     // subclasses may overload depending upon which orbital parameters they 
00091     // specify
00092 
00093     virtual void setlatitude ( double ) {}
00094     virtual void setlongitude ( double ) {}
00095     virtual void setpitch ( double ) {}
00096     virtual void setyaw ( double ) {}
00097     virtual void setroll ( double ) {}
00098 
00099     // friends - so that only the boss can manipulate this class
00100     friend class GPS;
00101 
00102 private:
00103     double m_ascendingLon;   // longitude of ascending node (degrees)
00104     double m_inclination;    // orbit inclination (degrees)
00105     double m_altitude;       // altitude (km)
00106     double m_period;         // orbital period (minutes)
00107     double m_sini;           // sine of inclination angle
00108     double m_cosi;           // cosine of inclination angle
00109     double m_startphase;     // starting phase offset of the orbit
00110 };
00111 
00112 inline double Orbit::period() const {return m_period;}
00113 
00114 inline double Orbit::inclination() const {return m_inclination;}
00115 
00116 inline double Orbit::altitude() const {return m_altitude;}
00117 
00118 inline double Orbit::ascendingLon() const {return m_ascendingLon;}
00119 
00120 inline double Orbit::startphase () const {return m_startphase;}
00121 
00122 #endif ORBIT_H

Generated at Wed Nov 21 12:20:34 2001 by doxygen1.2.3 written by Dimitri van Heesch, © 1997-2000