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

GPS Class Reference

Represents the Global Positioning System on-board the spacecraft. An Orbit. More...

#include <GPS.h>

List of all members.

Public Methods

GPStime time () const
 GPS synchronized time for the satellite. More...

double lat () const
 present latitude. More...

double lon () const
 present longitude. More...

double pitch () const
 present 'pitch' angle in N-S direction (roll around x-axis). More...

double yaw () const
 present 'yaw' angle - (rotate around z-axis). More...

double roll () const
 present 'roll' andle in E-W direction (roll around y-axis). More...

double phase () const
 get the current phase of the orbit. More...

const Orbitorbit () const
 access to the orbit (for computation only). More...

Coords state () const
 current state of the GPS system. More...

double expansion () const
 expansion of the current orbit. More...

GPStime sampleintvl () const
 sample interval for random orbit distribution. More...

double ascendingLon () const
 return the orbit's ascending longitude. More...

std::pair<double,double> rotateAngles ()
 access m_rotangles. More...

void orbit ( Orbit* )
 set a specific Orbit object for lat/lon calculations. More...

void pass ( double )
 pass a specific amount of time. More...

void phase ( double )
 set the current phase of the orbit. More...

void expansion ( double )
 set the expansion factor for the orbit (-1) = random. More...

void synch ()
 synchronize w. scheduler. More...

void sampleintvl ( GPStime )
 set the sample interval. More...

void ascendingLon (double)
 special to set the ascending longitude. More...

void rotateAngles (std::pair<double,double> coords)
 set m_rotangles. More...

void printOn (std::ostream& out) const
 print time & position. More...

void notifyObservers ()
Subject& notification ()
std::pair<double,double> galToGlast (std::pair<double,double> galcoords)
 transformation fron galactic coordinates to GLAST coordinates. More...


Static Public Methods

GPS* instance ()
void kill ()

Protected Methods

 GPS ()
virtual ~GPS ()
void pitch ( double )
void yaw ( double )
void roll ( double )
void lat ( double )
void lon ( double )
void time ( GPStime )
Orbitorbit ()
GPStime orbittime () const
void orbittime ( GPStime )
void setState ( const GPS::Coords& )

Protected Attributes

std::pair<double,double> m_rotangles

Private Attributes

Orbitm_orbit
double m_expansion
GPStime m_time
GPStime m_orbittime
double m_sampleintvl
Subject m_notification

Static Private Attributes

GPS* s_instance = 0

Friends

class  FluxGenerator


Detailed Description

Represents the Global Positioning System on-board the spacecraft. An Orbit.

object is used to compute the spacecraft's position and pointing characteristics. Time is tracked through this object, and synchronized with the Scheduler for discrete event simulation. An expansion factor is provided to allow for acceleration or randomization of the orbit. If the expansion factor is negative, then the position of the spacecraft is chosen as a random distribution over an orbit. Otherwise, the expansion factor represents an acceleration of the spacecraft's orbit. Ie. an expansion factor of 2 would reduce the orbit period of the spacecraft by 1/2.

Definition at line 34 of file GPS.h.


Constructor & Destructor Documentation

GPS::GPS ( ) [protected]
 

Definition at line 44 of file GPS.cxx.

Referenced by instance().

GPS::~GPS ( ) [protected, virtual]
 

Definition at line 62 of file GPS.cxx.


Member Function Documentation

void GPS::ascendingLon ( double lon )
 

special to set the ascending longitude.

Definition at line 247 of file GPS.cxx.

double GPS::ascendingLon ( ) const
 

return the orbit's ascending longitude.

Definition at line 251 of file GPS.cxx.

Referenced by FluxMgr::setGlastPosition().

void GPS::expansion ( double e )
 

set the expansion factor for the orbit (-1) = random.

Definition at line 169 of file GPS.cxx.

double GPS::expansion ( ) const
 

expansion of the current orbit.

Definition at line 142 of file GPS.cxx.

Referenced by FluxMgr::setExpansion(), and synch().

std::pair< double,double > GPS::galToGlast ( std::pair< double,double > galcoords )
 

transformation fron galactic coordinates to GLAST coordinates.

Definition at line 265 of file GPS.cxx.

Referenced by FluxSource::getGalacticDir().

GPS * GPS::instance ( ) [static]
 

Definition at line 204 of file GPS.cxx.

Referenced by HeSpectrum::askGPS(), GalElSpectrum::askGPS(), CHIMESpectrum::askGPS(), AlbedoPSpectrum::askGPS(), TrappedProtonSpectrum::calculate_rate(), HeSpectrum::calculate_rate(), GalElSpectrum::calculate_rate(), CHIMESpectrum::calculate_rate(), AlbedoPSpectrum::calculate_rate(), FluxSource::getGalacticDir(), HeSpectrum::init(), GalElSpectrum::init(), CHIMESpectrum::init(), AlbedoPSpectrum::init(), FluxMgr::location(), FluxMgr::pass(), sampleintvl(), FluxMgr::setExpansion(), FluxMgr::setGlastAngles(), FluxMgr::setGlastPosition(), and FluxMgr::synch().

void GPS::kill ( ) [static]
 

Definition at line 207 of file GPS.cxx.

void GPS::lat ( double l ) [protected]
 

Definition at line 189 of file GPS.cxx.

double GPS::lat ( ) const
 

present latitude.

Definition at line 121 of file GPS.cxx.

Referenced by galToGlast(), FluxMgr::location(), printOn(), and state().

void GPS::lon ( double l ) [protected]
 

Definition at line 194 of file GPS.cxx.

double GPS::lon ( ) const
 

present longitude.

Definition at line 126 of file GPS.cxx.

Referenced by HeSpectrum::askGPS(), GalElSpectrum::askGPS(), CHIMESpectrum::askGPS(), AlbedoPSpectrum::askGPS(), TrappedProtonSpectrum::calculate_rate(), HeSpectrum::calculate_rate(), GalElSpectrum::calculate_rate(), CHIMESpectrum::calculate_rate(), galToGlast(), FluxMgr::location(), printOn(), and state().

Subject & GPS::notification ( ) [inline]
 

Definition at line 108 of file GPS.h.

Referenced by HeSpectrum::init(), GalElSpectrum::init(), CHIMESpectrum::init(), and AlbedoPSpectrum::init().

void GPS::notifyObservers ( ) [inline]
 

Definition at line 107 of file GPS.h.

Referenced by synch().

Orbit * GPS::orbit ( ) [protected]
 

Definition at line 86 of file GPS.cxx.

void GPS::orbit ( Orbit * o )
 

set a specific Orbit object for lat/lon calculations.

Definition at line 147 of file GPS.cxx.

const Orbit * GPS::orbit ( ) const
 

access to the orbit (for computation only).

Definition at line 81 of file GPS.cxx.

Referenced by lat(), lon(), phase(), pitch(), roll(), state(), synch(), and yaw().

void GPS::orbittime ( GPStime t ) [protected]
 

Definition at line 218 of file GPS.cxx.

GPStime GPS::orbittime ( ) const [protected]
 

Definition at line 223 of file GPS.cxx.

Referenced by galToGlast(), lat(), lon(), phase(), pitch(), roll(), synch(), and yaw().

void GPS::pass ( double t )
 

pass a specific amount of time.

Definition at line 155 of file GPS.cxx.

Referenced by FluxMgr::pass().

void GPS::phase ( double p )
 

set the current phase of the orbit.

Definition at line 162 of file GPS.cxx.

double GPS::phase ( ) const
 

get the current phase of the orbit.

Definition at line 136 of file GPS.cxx.

void GPS::pitch ( double p ) [protected]
 

Definition at line 174 of file GPS.cxx.

double GPS::pitch ( ) const
 

present 'pitch' angle in N-S direction (roll around x-axis).

Definition at line 66 of file GPS.cxx.

Referenced by state().

void GPS::printOn ( std::ostream & out ) const
 

print time & position.

Definition at line 255 of file GPS.cxx.

void GPS::roll ( double r ) [protected]
 

Definition at line 184 of file GPS.cxx.

double GPS::roll ( ) const
 

present 'roll' andle in E-W direction (roll around y-axis).

Definition at line 76 of file GPS.cxx.

Referenced by state().

void GPS::rotateAngles ( std::pair< double,double > coords )
 

set m_rotangles.

Definition at line 320 of file GPS.cxx.

std::pair< double,double > GPS::rotateAngles ( )
 

access m_rotangles.

Definition at line 314 of file GPS.cxx.

Referenced by FluxMgr::setGlastAngles().

void GPS::sampleintvl ( GPStime s )
 

set the sample interval.

Definition at line 228 of file GPS.cxx.

GPStime GPS::sampleintvl ( ) const
 

sample interval for random orbit distribution.

Definition at line 233 of file GPS.cxx.

void GPS::setState ( const GPS::Coords & c ) [protected]
 

Definition at line 238 of file GPS.cxx.

GPS::Coords GPS::state ( ) const
 

current state of the GPS system.

Definition at line 213 of file GPS.cxx.

void GPS::synch ( )
 

synchronize w. scheduler.

Definition at line 91 of file GPS.cxx.

Referenced by FluxMgr::synch().

void GPS::time ( GPStime t ) [protected]
 

Definition at line 199 of file GPS.cxx.

GPStime GPS::time ( ) const
 

GPS synchronized time for the satellite.

Definition at line 131 of file GPS.cxx.

Referenced by pass(), phase(), printOn(), setState(), state(), and synch().

void GPS::yaw ( double y ) [protected]
 

Definition at line 179 of file GPS.cxx.

double GPS::yaw ( ) const
 

present 'yaw' angle - (rotate around z-axis).

Definition at line 71 of file GPS.cxx.

Referenced by state().


Friends And Related Function Documentation

class FluxGenerator [friend]
 

Definition at line 141 of file GPS.h.


Member Data Documentation

double GPS::m_expansion [private]
 

Definition at line 147 of file GPS.h.

Subject GPS::m_notification [private]
 

Definition at line 153 of file GPS.h.

Orbit * GPS::m_orbit [private]
 

Definition at line 146 of file GPS.h.

GPStime GPS::m_orbittime [private]
 

Definition at line 149 of file GPS.h.

std::pair< double,double > GPS::m_rotangles [protected]
 

Definition at line 135 of file GPS.h.

double GPS::m_sampleintvl [private]
 

Definition at line 150 of file GPS.h.

GPStime GPS::m_time [private]
 

Definition at line 148 of file GPS.h.

GPS * GPS::s_instance = 0 [static, private]
 

Definition at line 42 of file GPS.cxx.


The documentation for this class was generated from the following files:
Generated at Wed Nov 21 12:20:36 2001 by doxygen1.2.3 written by Dimitri van Heesch, © 1997-2000