Stellarium 0.14.3
gSatTEME.hpp
1 /***************************************************************************
2  * Name: gSatTeme.hpp
3  *
4  * Description: gSatTEME classes declaration.
5  * This class abstract all the SGP4 complexity. It uses the
6  * revised David. A. Vallado code for SGP4 Calculation.
7  *
8  * Reference:
9  * Revisiting Spacetrack Report #3 AIAA 2006-6753
10  * Vallado, David A., Paul Crawford, Richard Hujsak, and T.S.
11  * Kelso, "Revisiting Spacetrack Report #3,"
12  * presented at the AIAA/AAS Astrodynamics Specialist
13  * Conference, Keystone, CO, 2006 August 21–24.
14  * http://celestrak.com/publications/AIAA/2006-6753/
15  ***************************************************************************/
16 
17 /***************************************************************************
18  * Copyright (C) 2006 by J.L. Canales *
19  * jlcanales.gasco@gmail.com *
20  * *
21  * This program is free software; you can redistribute it and/or modify *
22  * it under the terms of the GNU General Public License as published by *
23  * the Free Software Foundation; either version 2 of the License, or *
24  * (at your option) any later version. *
25  * *
26  * This program is distributed in the hope that it will be useful, *
27  * but WITHOUT ANY WARRANTY; without even the implied warranty of *
28  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the *
29  * GNU General Public License for more details. *
30  * *
31  * You should have received a copy of the GNU General Public License *
32  * along with this program; if not, write to the *
33  * Free Software Foundation, Inc., *
34  * 51 Franklin Street, Suite 500, Boston, MA 02110-1335, USA. *
35  ***************************************************************************/
36 
37 #ifndef _GSATTEME_HPP_
38 #define _GSATTEME_HPP_ 1
39 
40 #include "gTime.hpp"
41 #include "gVector.hpp"
42 
43 #include "sgp4unit.h"
44 #include "sgp4ext.h"
45 
46 
54 class gSatTEME
55 {
56 public:
57 
58  // Operation: gSatTEME(const char *pstrName, char *pstrTleLine1, char *pstrTleLine2)
65  gSatTEME(const char *pstrName, char *pstrTleLine1, char *pstrTleLine2);
66 
67  // Operation: setEpoch( gTime ai_time)
70  void setEpoch(gTime ai_time);
71 
72  // Operation: setEpoch( double ai_time)
75  void setEpoch(double ai_time)
76  {
77  gTime time(ai_time);
78  return setEpoch( time);
79  }
80 
81  // Operation: setMinSinceKepEpoch( double ai_minSinceKepEpoch)
85  void setMinSinceKepEpoch(double ai_minSinceKepEpoch);
86 
87  // Operation: getPos()
95  {
96  return m_Position;
97  }
98 
99  // Operation: getVel()
106  {
107  return m_Vel;
108  }
109 
110 
111 
112 
113  // Operation: getSubPoint
123  {
124  return m_SubPoint;
125  }
126 
127  int getErrorCode()
128  {
129  return satrec.error;
130  }
131 
132 private:
133  // Operation: computeSubPoint
144  gVector computeSubPoint( gTime ai_time);
145 
146 
147  // sgp4 proceses variables
148  double tumin, mu, radiusearthkm, xke, j2, j3, j4, j3oj2;
149  elsetrec satrec;
150 
151  std::string m_SatName;
152  gVector m_Position;
153  gVector m_Vel;
154  gVector m_SubPoint;
155 };
156 
157 #endif // _GSATTEME_HPP_
void setEpoch(gTime ai_time)
Set compute epoch for prediction.
Sat position and velocity predictions over TEME reference system.
Definition: gSatTEME.hpp:54
gVector getSubPoint()
Get the Geographic satellite subpoint Vector calculated by the method compute SubPoint.
Definition: gSatTEME.hpp:122
This class implement the needed code to make vector calculations.
Definition: gVector.hpp:41
gVector getVel()
Get the TEME satellite Velocity Vector.
Definition: gSatTEME.hpp:105
void setEpoch(double ai_time)
Set compute epoch for prediction.
Definition: gSatTEME.hpp:75
gVector getPos()
Get the TEME satellite position Vector.
Definition: gSatTEME.hpp:94
This class implements time calculations.
Definition: gTime.hpp:143
gSatTEME(const char *pstrName, char *pstrTleLine1, char *pstrTleLine2)
Default class gSatTEME constructor.
void setMinSinceKepEpoch(double ai_minSinceKepEpoch)
Set compute epoch for prediction in minutes since Keplerian data Epoch.