00001 // $Id: Orbit.h,v 1.6 2002/08/04 00:52:45 srobinsn Exp $ 00002 00003 00004 #ifndef ORBIT_H 00005 #define ORBIT_H 00006 00042 #include <utility> // for STL pairs 00043 #include "geometry/CoordTransform.h" 00044 00045 class Orbit{ 00046 00047 public: 00049 Orbit(double asclon = 0., double alt = 600., double inc = 28.5, double phs = 0., 00050 double apitch = 0., double ayaw = 0., double aroll = 0.); 00051 00053 double get_phase (double timeInSeconds) const; 00054 00056 std::pair<double,double> coords(double timeInSeconds) const; 00057 00061 00062 virtual double latitude(double timeInSeconds) const; 00063 00067 00068 00069 virtual double longitude(double timeInSeconds) const; 00070 00073 virtual double pitch (double timeInSeconds) const; 00074 00077 virtual double yaw (double timeInSeconds) const; 00078 00081 virtual double roll (double timeInSeconds) const; 00082 00084 virtual double phase (double timeInSeconds) const; 00085 00087 void inclination ( double inc ); 00088 00090 void ascendingLon ( double asc ); 00091 00093 void startphase ( double phi ); 00094 00096 void displayRotation(Rotation rot); 00097 00099 inline double startphase() const; 00100 inline double period() const; 00101 inline double inclination() const; 00102 inline double altitude() const; 00103 inline double ascendingLon() const; 00104 00105 //transformations for the current position (to the zenith-pointing coordinate system) 00106 Rotation CELTransform(double timeInSeconds); 00107 00108 00109 Rotation Orbit::latLonTransform(double timeInSeconds) const; 00110 00111 double Orbit::testLongitude(double timeInSeconds) const; 00112 double Orbit::testLatitude(double timeInSeconds) const; 00113 00114 protected: 00115 // manipulation of the orbital parameters - defaults do nothing, however 00116 // subclasses may overload depending upon which orbital parameters they 00117 // specify 00118 00119 virtual void setLatitude ( double ) {} 00120 virtual void setLongitude ( double ) {} 00121 virtual void setPitch ( double ) {} 00122 virtual void setYaw ( double ) {} 00123 virtual void setRoll ( double ) {} 00124 00125 00126 // computation of pointing characteristics of GLAST - assumed, here, to be zenith-pointing 00127 void computeAttitudes(double timeInSeconds); 00128 00129 // friends - so that only the boss can manipulate this class 00130 friend class GPS; 00131 00132 private: 00133 double m_ascendingLon; // longitude of ascending node (degrees) 00134 double m_inclination; // orbit inclination (degrees) 00135 double m_altitude; // altitude (km) 00136 double m_period; // orbital period (minutes) 00137 double m_sini; // sine of inclination angle 00138 double m_cosi; // cosine of inclination angle 00139 double m_startphase; // starting phase offset of the orbit 00140 double m_precessPeriod; // Period of orbital precession 00141 00142 double m_degsPerRad; 00143 double m_secsperday; 00144 00145 00146 //RA, DEC of GLAST X and Y axes: 00147 double m_rax; 00148 double m_raz; 00149 double m_decx; 00150 double m_decz; 00151 00152 }; 00153 00154 inline double Orbit::period() const {return m_period;} 00155 00156 inline double Orbit::inclination() const {return m_inclination;} 00157 00158 inline double Orbit::altitude() const {return m_altitude;} 00159 00160 inline double Orbit::ascendingLon() const {return m_ascendingLon;} 00161 00162 inline double Orbit::startphase () const {return m_startphase;} 00163 00164 #endif ORBIT_H
1.2.13.1 written by Dimitri van Heesch,
© 1997-2001