00001 ////////////////////////////////////////////////////////////////////////////////////////////////// 00002 /*! \file OrbitStateRepresentation.h 00003 * \brief Interface to the Orbit State Representation abstract Class. 00004 * \author $Author: jayhawk_hokie $ 00005 * \version $Revision: 1.2 $ 00006 * \date $Date: 2005/06/10 12:53:28 $ 00007 *////////////////////////////////////////////////////////////////////////////////////////////////// 00008 /* 00009 * 00010 */ 00011 ////////////////////////////////////////////////////////////////////////////////////////////////// 00012 00013 #ifndef __SSF_ORBIT_REPRESENTATION_H__ 00014 #define __SSF_ORBIT_REPRESENTATION_H__ 00015 00016 #include "Matrix.h" 00017 #include <orbit/orbitframes/OrbitFrame.h> 00018 namespace O_SESSAME { 00019 00020 /** @defgroup OrbitStateRepresentation Orbit State Represenations 00021 * \ingroup OrbitToolkit 00022 * The orbit state representations are the various ways of storing a trajectory of 00023 * an object in 3-dimensional space. 00024 * 00025 */ 00026 00027 /*! \brief Abstract base type of the orbit state representation. 00028 * \ingroup OrbitStateRepresentation 00029 * 00030 * \detail The OrbitStateRepresentation class provides an interface to the 00031 * group of orbit state representations. This representation can be 00032 * position & velocity, keplerian elements, canonical parameters, or any 00033 * other representation of an orbit state. 00034 * 00035 * \par 00036 * There can never be an actual instantiation of an OrbitStateRepresentation. 00037 * This is an abstract data type (ADT) and just provides a required interface 00038 * for the derived types. Don't try to use: OrbitStateRepresentation myOrbRep; 00039 * Just use as a pointer to the derived types. 00040 * 00041 * \par Example: 00042 * 00043 * 00044 */ 00045 class OrbitStateRepresentation 00046 { 00047 public: 00048 /*! \brief Set the orbit representation using position and velocity components. 00049 * @param _Position 3-element vector of position components. (km) 00050 * @param _Velocity 3-element vector of vector components. (km/s) 00051 */ 00052 virtual void SetPositionVelocity(const Vector &_Position, const Vector &_Velocity) = 0; 00053 00054 /*! \brief Set the orbit representation using position and velocity components. 00055 * @param _PositionVelocity 6-element vector of position \& velocity components. (km, km/s) 00056 */ 00057 virtual void SetPositionVelocity(const Vector &_PositionVelocity) = 0; 00058 00059 /*! \brief Return the position and velocity vectors of the orbit state. 00060 * @return 6-element vector of position and velocity vector components. [km, km, km, km/s, km/s, km/s]^T 00061 */ 00062 virtual Vector GetPositionVelocity() const = 0; 00063 00064 /*! \brief Return the position and velocity vectors of the orbit state by reference (through the input parameters) 00065 * @param _Position a Vector through which to return the 3-element position vector. (km) 00066 * @param _Velocity a Vector through which to return the 3-element velocity vector. (km/s) 00067 */ 00068 virtual void GetPositionVelocity(Vector &_Position, Vector &_Velocity) const = 0; 00069 00070 /*! \brief Return a pointer to a new instance of a derived orbit state representation type. 00071 * 00072 * \detail This is used to request memory for a new instance of a derived instance when the 00073 * actual type of the derived object is unknown. By calling this function, the compiler 00074 * links to the correct derived function to return a pointer and allocate memory of 00075 * the correct type. 00076 * \par Example: 00077 * \code 00078 * OrbitStateRepresentation* newOrbRep = oldOrbRep->NewPointer(); 00079 * \endcode 00080 * @return a pointer to a new allocation of memory for the appropriate representation. 00081 */ 00082 virtual OrbitStateRepresentation* NewPointer() = 0; 00083 00084 /*! \brief Return a pointer to a copy of a derived instance orbit state representation type. 00085 * 00086 * \detail This is used to request memory for and copy of an instance of a derived representation when the 00087 * actual type of the derived object is unknown. By calling this function, the compiler 00088 * links to the correct derived function to return a pointer and allocate memory of 00089 * the correct type and copy the data. 00090 * \par Example: 00091 \code 00092 * OrbitStateRepresentation* copyOldOrbRep = oldOrbRep->Clone(); 00093 \endcode 00094 * @return a pointer to a copy of the appropriate representation. 00095 */ 00096 virtual OrbitStateRepresentation* Clone() = 0; 00097 00098 // virtual void SetState(const Vector &_Elements1, const Vector &_Elements2) = 0; 00099 /*! \brief Set the vector of the representation's state vector. 00100 * \warning Depracted - Do Not Use - will be moved internally 00101 */ 00102 virtual void SetState(const Vector &_Elements) = 0; 00103 00104 /*! \brief Return a vector of the representation's state vector. 00105 * \warning Depracted - Do Not Use - will be moved internally 00106 */ 00107 virtual Vector GetState() const = 0; 00108 00109 protected: 00110 00111 private: 00112 00113 }; 00114 } // close namespace O_SESSAME 00115 00116 #endif 00117 00118 // Do not change the comments below - they will be added automatically by CVS 00119 /***************************************************************************** 00120 * $Log: OrbitStateRepresentation.h,v $ 00121 * Revision 1.2 2005/06/10 12:53:28 jayhawk_hokie 00122 * Changed header file format to make it easier to link to the spacecraft code by only having to specify dsacss/dep/spacecraft/src (ex. "file.h" changed to <dir/file.h> where dir is a folder in src). 00123 * 00124 * Revision 1.1.1.1 2005/04/26 17:41:00 cakinli 00125 * Adding OpenSESSAME to DSACSS distrib to capture fixed version. 00126 * 00127 * Revision 1.9 2003/10/18 21:37:28 rsharo 00128 * Removed "../utils" from all qmake project paths. Prepended "utils 00129 * /" to all #include directives for utils. Removed ".h" extensions from STL header 00130 * s and referenced STL components from "std::" namespace. Overall, changed to be 00131 * more portable. 00132 * 00133 * Revision 1.8 2003/05/13 18:47:56 nilspace 00134 * Fixed comments for better formatting. 00135 * 00136 * Revision 1.7 2003/05/05 20:47:38 nilspace 00137 * Changed the Get/SetPositionVelocity functions to not require a OrbitFrame. 00138 * 00139 * Revision 1.6 2003/05/02 16:16:46 nilspace 00140 * Documented the API. 00141 * 00142 * Revision 1.5 2003/04/29 18:48:31 nilspace 00143 * Added NewPointer and Clone functions to help in getting the correct memory allocation. 00144 * 00145 * Revision 1.4 2003/04/24 21:14:23 nilspace 00146 * const'd all Get() functions. 00147 * 00148 * Revision 1.3 2003/04/23 16:26:08 nilspace 00149 * Updated directory structure & default parameters. 00150 * 00151 * Revision 1.2 2003/04/22 18:06:08 nilspace 00152 * Added math for Matthew Berry. 00153 * 00154 * Revision 1.1 2003/04/08 22:47:35 nilspace 00155 * Initial Submission. 00156 * 00157 * 00158 ******************************************************************************/