gSatTEME.cpp   gSatTEME.cpp 
skipping to change at line 105 skipping to change at line 105
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];
m_SubPoint = computeSubPoint( ai_time);
} }
void gSatTEME::setEpoch(double ai_minSinceKepEpoch) void gSatTEME::setMinSinceKepEpoch(double ai_minSinceKepEpoch)
{ {
double ro[3]; double ro[3];
double vo[3]; double vo[3];
gTimeSpan tSince( ai_minSinceKepEpoch/KMIN_PER_DAY);
gTime Epoch(satrec.jdsatepoch);
Epoch += tSince;
// call the propagator to get the initial state vector value // call the propagator to get the initial state vector value
sgp4(CONSTANTS_SET, satrec, ai_minSinceKepEpoch, ro, vo); sgp4(CONSTANTS_SET, satrec, ai_minSinceKepEpoch, 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];
m_SubPoint = computeSubPoint( Epoch);
} }
gVector gSatTEME::getSubPoint(gTime ai_Time) gVector gSatTEME::computeSubPoint(gTime ai_Time)
{ {
gVector resultVector(3); // (0) Latitude, (1) Longitude, (2) altitud e gVector resultVector(3); // (0) Latitude, (1) Longitude, (2) altitud e
double theta, r, e2, phi, c; double theta, r, e2, phi, c;
theta = AcTan(m_Position[1], m_Position[0]); // radians theta = AcTan(m_Position[1], m_Position[0]); // radians
resultVector[ LONGITUDE] = fmod((theta - ai_Time.toThetaGMST()), K2P I); //radians resultVector[ LONGITUDE] = fmod((theta - ai_Time.toThetaGMST()), K2P I); //radians
r = sqrt(Sqr(m_Position[0]) + Sqr(m_Position[1])); r = sqrt(Sqr(m_Position[0]) + Sqr(m_Position[1]));
e2 = __f*(2 - __f); e2 = __f*(2 - __f);
 End of changes. 5 change blocks. 
2 lines changed or deleted 7 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/