#include <Orbit.h>
Inheritance diagram for Orbit::

Public Methods | |
| Orbit (double asclon=0., double alt=600., double inc=28.5, double phs=0., double apitch=0., double ayaw=0., double aroll=0.) | |
| default constructor. More... | |
| double | get_phase (double timeInSeconds) const |
| phase of the orbit as a proportion of a single period. More... | |
| std::pair< double, double > | coords (double timeInSeconds) const |
| returns position as a pair using specified time. More... | |
| virtual double | latitude (double timeInSeconds) const |
| latitude as a function of time (in minutes). More... | |
| virtual double | longitude (double timeInSeconds) const |
| longitude as a function of time, taking into account the starting longitude and the eastward rotation of the earth. More... | |
| virtual double | pitch (double timeInSeconds) const |
| pitch of the spacecraft (rotation around E-W axis) zenith pointing is pitch == 0. More... | |
| virtual double | yaw (double timeInSeconds) const |
| yaw of the spacecraft (rotation around zenith) square to E-W and N-S axis represents yaw == 0. More... | |
| virtual double | roll (double timeInSeconds) const |
| roll of the spacecraft (rotation around N-S axis) zenith pointing is roll == 0. More... | |
| virtual double | phase (double timeInSeconds) const |
| phase of the orbit at a given time. More... | |
| void | inclination (double inc) |
| set the inclination of the orbit. More... | |
| void | ascendingLon (double asc) |
| set the longitude of the ascending node. More... | |
| void | startphase (double phi) |
| set the phase of the orbit (in radians). More... | |
| void | displayRotation (Rotation rot) |
| explicitly output the rotation matrix to the screen. More... | |
| double | startphase () const |
| inlined access methods. More... | |
| double | period () const |
| double | inclination () const |
| double | altitude () const |
| double | ascendingLon () const |
| Rotation | CELTransform (double timeInSeconds) |
| Rotation | Orbit::latLonTransform (double timeInSeconds) const |
| double | Orbit::testLongitude (double timeInSeconds) const |
| double | Orbit::testLatitude (double timeInSeconds) const |
Protected Methods | |
| virtual void | setLatitude (double) |
| virtual void | setLongitude (double) |
| virtual void | setPitch (double) |
| virtual void | setYaw (double) |
| virtual void | setRoll (double) |
| void | computeAttitudes (double timeInSeconds) |
Private Attributes | |
| double | m_ascendingLon |
| double | m_inclination |
| double | m_altitude |
| double | m_period |
| double | m_sini |
| double | m_cosi |
| double | m_startphase |
| double | m_precessPeriod |
| double | m_degsPerRad |
| double | m_secsperday |
| double | m_rax |
| double | m_raz |
| double | m_decx |
| double | m_decz |
Friends | |
| class | GPS |
The path is assumed to go to the east, with the rotation of the earth, as is the case for most satellite orbits. All angles are expressed in degrees. Longitude increases to the east.
$Header $
Definition at line 45 of file Orbit.h.
|
||||||||||||||||||||||||||||||||
|
default constructor.
Definition at line 12 of file Orbit.cxx. References inclination().
00013 : 00014 // constructor 00015 m_ascendingLon(asclon), 00016 m_altitude(alt), 00017 m_period(1.6612e-4 * pow(alt+6371.2, 1.5)),// Kepler's Law 00018 m_startphase(phs), 00019 m_precessPeriod(66.*24.*60.), 00020 m_degsPerRad(360./6.2831853), 00021 m_secsperday(24.*60.*60.) 00022 00023 { 00024 inclination( inc ); 00025 00026 } |
|
|
Definition at line 158 of file Orbit.h. References m_altitude.
00158 {return m_altitude;}
|
|
|
Definition at line 160 of file Orbit.h. References m_ascendingLon.
00160 {return m_ascendingLon;}
|
|
|
set the longitude of the ascending node.
Definition at line 35 of file Orbit.cxx. References m_ascendingLon. Referenced by GPS::ascendingLon(), and GPS::synch().
00036 {
00037 m_ascendingLon = asc;
00038 }
|
|
|
Definition at line 90 of file Orbit.cxx. References m_degsPerRad, m_inclination, m_precessPeriod, and phase().
00090 {
00091 double time = timeInSeconds/60.;
00092 // Purpose: Return the 3x3 matrix which transforms a vector from a galactic
00093 // coordinate system to a local coordinate system.
00094
00095 //THIS IS THE PART WHERE WE MAKE THE MATRIX CEL INTO SOMETHING WE CAN USE
00096 Rotation gal,cel,cel1,cel2,cel3,cel4;
00097
00098 //the x axis must eventually be rotated so that it points east, instead of along
00099 //the direction of orbital travel
00100 double makeXeast = (m_inclination/m_degsPerRad)*cos(phase(timeInSeconds));
00101
00102 //and here we construct the rotation matrices
00103
00104 //gal is the matrix which rotates (cartesian)celestial coordiantes into (cartesian)galactic ones
00105 gal.rotateZ(-282.25/m_degsPerRad).rotateX(-62.6/m_degsPerRad).rotateZ(33./m_degsPerRad);
00106
00107 //cel is the matrix which rotates (cartesian)local coordinates into (cartesian)celestial ones
00108 cel1.rotateZ(makeXeast);
00109 cel2.rotateY(phase(timeInSeconds));
00110 cel3.rotateZ(-m_inclination*M_2PI/360.);
00111 cel4.rotateY((time/m_precessPeriod)*M_2PI);
00112
00113 //so gal*cel should be the matrix that makes local coordiates into galactic ones.
00114 Rotation glstToGal = gal*cel4*cel3*cel2*cel1;
00115
00116 //displayRotation(glstToGal);
00117
00118 //we want the rotation from galactic to local.
00119 return glstToGal.inverse();
00120 }
|
|
|
Definition at line 124 of file Orbit.cxx. References latitude(), longitude(), m_ascendingLon, m_decx, m_decz, m_inclination, m_precessPeriod, m_rax, and m_raz.
00124 {
00125 double time = timeInSeconds/60.;
00126 // Purpose: computation of pointing characteristics of GLAST - assumed, here, to be zenith-pointing
00127
00128 //lat, lon, sidereal??? time becomes J2000.0 coordinates here:
00129 m_raz=((time/(24.0*60.0*60.0))*360.0)+longitude(timeInSeconds); //need to take into account starting phase too!
00130 if(m_raz > 360.0) m_raz-=360.0;
00131 if(m_raz < 0.0 ) m_raz+=360.0;
00132 m_decz=latitude(timeInSeconds);
00133 //and then the eastward-pointing x-axis should have 90 degrees more ascension, and declination=0
00134 m_rax=m_raz-90.0;
00135 if(m_rax > 360.0) m_rax-=360.0;
00136 if(m_rax < 0.0 ) m_rax+=360.0;
00137 m_decx=0.;
00138 }
|
|
|
returns position as a pair using specified time.
Definition at line 86 of file Orbit.cxx. References latitude(), and longitude().
|
|
|
explicitly output the rotation matrix to the screen.
Definition at line 174 of file Orbit.cxx.
00174 {
00175
00176 std::cout << "{" << rot.xx() << ' ' << rot.xy() << ' ' << rot.xz() << std::endl
00177 << rot.yx() << ' ' << rot.yy() << ' ' << rot.yz() << std::endl
00178 << rot.zx() << ' ' << rot.zy() << ' ' << rot.zz() << "}" << std::endl;
00179 } |
|
|
phase of the orbit as a proportion of a single period.
|
|
|
Definition at line 156 of file Orbit.h. References m_inclination. Referenced by Orbit().
00156 {return m_inclination;}
|
|
|
set the inclination of the orbit.
Definition at line 28 of file Orbit.cxx. References m_cosi, m_inclination, and m_sini.
00029 {
00030 m_inclination = inc;
00031 m_sini = (sin(m_inclination*M_2PI/360.));
00032 m_cosi = (cos(m_inclination*M_2PI/360.));
00033 }
|
|
|
latitude as a function of time (in minutes).
Definition at line 45 of file Orbit.cxx. References m_period, m_sini, and startphase(). Referenced by computeAttitudes(), coords(), and GPS::lat().
00045 {
00046 double time = timeInSeconds/60.;
00047 // Purpose: Return the latitude as a function of time (in minutes)
00048 // Input: the current time
00049 return (360./M_2PI) * asin(m_sini * sin(M_2PI*time/m_period + startphase()));
00050 }
|
|
|
longitude as a function of time, taking into account the starting longitude and the eastward rotation of the earth.
Definition at line 52 of file Orbit.cxx. References m_ascendingLon, m_cosi, m_period, phase(), and startphase(). Referenced by computeAttitudes(), coords(), and GPS::lon().
00052 {
00053 double time = timeInSeconds/60.;
00054 // Purpose: Return the longitude as a function of time, taking into account the starting
00055 // longitude and the eastward rotation of the earth
00056 // Input: current time
00057 double phase = M_2PI * time / m_period + startphase();
00058 double lon = (360./M_2PI) * atan2(m_cosi*sin(phase), cos(phase)) -
00059 360.* time /1440. + m_ascendingLon; // orbital motion - earth rotation
00060 lon = fmod(lon, 360.); // Fold into the range [0, 360)
00061 if (lon < 0.) lon += 360.;
00062 return lon;
00063 }
|
|
|
|
|
|
|
|
|
|
|
|
Definition at line 154 of file Orbit.h. References m_period. Referenced by phase(), and GPS::phase().
00154 {return m_period;}
|
|
|
phase of the orbit at a given time.
Definition at line 80 of file Orbit.cxx. References period(), and startphase(). Referenced by CELTransform(), longitude(), and GPS::phase().
00080 {
00081 double time = timeInSeconds/60.;
00082 double p = period();
00083 return (p == 0) ? 0. : (time/p) * 2*M_PI + startphase();
00084 }
|
|
|
pitch of the spacecraft (rotation around E-W axis) zenith pointing is pitch == 0.
Definition at line 65 of file Orbit.cxx. Referenced by GPS::pitch().
00065 {
00066 double time = timeInSeconds/60.;
00067 return 0.;
00068 }
|
|
|
roll of the spacecraft (rotation around N-S axis) zenith pointing is roll == 0.
Definition at line 75 of file Orbit.cxx. Referenced by GPS::roll().
00075 {
00076 double time = timeInSeconds/60.;
00077 return 0.;
00078 }
|
|
|
Reimplemented in StaticOrbit. Definition at line 119 of file Orbit.h. Referenced by GPS::lat(), and GPS::setState().
00119 {}
|
|
|
Reimplemented in StaticOrbit. Definition at line 120 of file Orbit.h. Referenced by GPS::lon(), and GPS::setState().
00120 {}
|
|
|
Reimplemented in StaticOrbit. Definition at line 121 of file Orbit.h. Referenced by GPS::pitch(), and GPS::setState().
00121 {}
|
|
|
Reimplemented in StaticOrbit. Definition at line 123 of file Orbit.h. Referenced by GPS::roll(), and GPS::setState().
00123 {}
|
|
|
Reimplemented in StaticOrbit. Definition at line 122 of file Orbit.h. Referenced by GPS::setState(), and GPS::yaw().
00122 {}
|
|
|
inlined access methods.
Definition at line 162 of file Orbit.h. References m_startphase. Referenced by latitude(), longitude(), and phase().
00162 {return m_startphase;}
|
|
|
set the phase of the orbit (in radians).
Definition at line 40 of file Orbit.cxx. References m_startphase. Referenced by GPS::phase().
00041 {
00042 m_startphase = phs;
00043 }
|
|
|
yaw of the spacecraft (rotation around zenith) square to E-W and N-S axis represents yaw == 0.
Definition at line 70 of file Orbit.cxx. Referenced by GPS::yaw().
00070 {
00071 double time = timeInSeconds/60.;
00072 return 0.;
00073 }
|
|
|
|
|
|
Definition at line 135 of file Orbit.h. Referenced by altitude(). |
|
|
Definition at line 133 of file Orbit.h. Referenced by ascendingLon(), computeAttitudes(), and longitude(). |
|
|
Definition at line 138 of file Orbit.h. Referenced by inclination(), and longitude(). |
|
|
Definition at line 149 of file Orbit.h. Referenced by computeAttitudes(). |
|
|
Definition at line 150 of file Orbit.h. Referenced by computeAttitudes(). |
|
|
Definition at line 142 of file Orbit.h. Referenced by CELTransform(). |
|
|
Definition at line 134 of file Orbit.h. Referenced by CELTransform(), computeAttitudes(), and inclination(). |
|
|
|
|
|
Definition at line 140 of file Orbit.h. Referenced by CELTransform(), and computeAttitudes(). |
|
|
Definition at line 147 of file Orbit.h. Referenced by computeAttitudes(). |
|
|
Definition at line 148 of file Orbit.h. Referenced by computeAttitudes(). |
|
|
|
|
|
Definition at line 137 of file Orbit.h. Referenced by inclination(), and latitude(). |
|
|
Definition at line 139 of file Orbit.h. Referenced by startphase(). |
1.2.13.1 written by Dimitri van Heesch,
© 1997-2001