gSatTEME.cpp   gSatTEME.cpp 
skipping to change at line 61 skipping to change at line 61
#define LATITUDE 0 #define LATITUDE 0
#define LONGITUDE 1 #define LONGITUDE 1
#define ALTITUDE 2 #define ALTITUDE 2
// Constructors // Constructors
gSatTEME::gSatTEME(const char *pstrName, char *pstrTleLine1, char *pstrTleL ine2) gSatTEME::gSatTEME(const char *pstrName, char *pstrTleLine1, char *pstrTleL ine2)
{ {
double startmfe, stopmfe, deltamin; double startmfe, stopmfe, deltamin;
double ro[3]; double ro[3] = {};
double vo[3]; double vo[3] = {};
m_Position.resize(3); m_Position.resize(3);
m_Vel.resize(3); m_Vel.resize(3);
m_SatName = pstrName; m_SatName = pstrName;
//set gravitational constants //set gravitational constants
getgravconst(CONSTANTS_SET, tumin, mu, radiusearthkm, xke, j2, j3, j 4, j3oj2); getgravconst(CONSTANTS_SET, tumin, mu, radiusearthkm, xke, j2, j3, j 4, j3oj2);
//Parsing TLE_Files and sat variables setting //Parsing TLE_Files and sat variables setting
skipping to change at line 93 skipping to change at line 93
m_Vel[ 1] = vo[ 1]; m_Vel[ 1] = vo[ 1];
m_Vel[ 2] = vo[ 2]; m_Vel[ 2] = vo[ 2];
} }
void gSatTEME::setEpoch(gTime ai_time) void gSatTEME::setEpoch(gTime ai_time)
{ {
gTime kepEpoch(satrec.jdsatepoch); gTime kepEpoch(satrec.jdsatepoch);
gTimeSpan tSince = ai_time - kepEpoch; gTimeSpan tSince = ai_time - kepEpoch;
double ro[3]; double ro[3] = {};
double vo[3]; double vo[3] = {};
double dtsince = tSince.getDblSeconds()/KSEC_PER_MIN; double dtsince = tSince.getDblSeconds()/KSEC_PER_MIN;
// call the propagator to get the initial state vector value // call the propagator to get the initial state vector value
sgp4(CONSTANTS_SET, satrec, dtsince, ro, vo); sgp4(CONSTANTS_SET, satrec, dtsince, ro, vo);
m_Position[ 0]= ro[ 0]; m_Position[ 0]= ro[ 0];
m_Position[ 1]= ro[ 1]; m_Position[ 1]= ro[ 1];
m_Position[ 2]= ro[ 2]; m_Position[ 2]= ro[ 2];
m_Vel[ 0] = vo[ 0]; m_Vel[ 0] = vo[ 0];
m_Vel[ 1] = vo[ 1]; m_Vel[ 1] = vo[ 1];
m_Vel[ 2] = vo[ 2]; m_Vel[ 2] = vo[ 2];
 End of changes. 2 change blocks. 
4 lines changed or deleted 4 lines changed or added

This html diff was produced by rfcdiff 1.41. The latest version is available from http://tools.ietf.org/tools/rfcdiff/