gSatTEME.cpp   gSatTEME.cpp 
skipping to change at line 137 skipping to change at line 137
gVector gSatTEME::computeSubPoint(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 = std::sqrt(Sqr(m_Position[0]) + Sqr(m_Position[1]));
e2 = __f*(2 - __f); e2 = __f*(2 - __f);
resultVector[ LATITUDE] = AcTan(m_Position[2],r); /*radians*/ resultVector[ LATITUDE] = AcTan(m_Position[2],r); /*radians*/
do do
{ {
phi = resultVector[ LATITUDE]; phi = resultVector[ LATITUDE];
c = 1/sqrt(1 - e2*Sqr(sin(phi))); c = 1/std::sqrt(1 - e2*Sqr(sin(phi)));
resultVector[ LATITUDE] = AcTan(m_Position[2] + KEARTHRADIUS *c*e2*sin(phi),r); resultVector[ LATITUDE] = AcTan(m_Position[2] + KEARTHRADIUS *c*e2*sin(phi),r);
} }
while(fabs(resultVector[ LATITUDE] - phi) >= 1E-10); while(fabs(resultVector[ LATITUDE] - phi) >= 1E-10);
resultVector[ ALTITUDE] = r/cos(resultVector[ LATITUDE]) - KEARTHRAD IUS*c;/*kilometers*/ resultVector[ ALTITUDE] = r/cos(resultVector[ LATITUDE]) - KEARTHRAD IUS*c;/*kilometers*/
if(resultVector[ LATITUDE] > (KPI/2.0)) resultVector[ LATITUDE] -= K 2PI; if(resultVector[ LATITUDE] > (KPI/2.0)) resultVector[ LATITUDE] -= K 2PI;
resultVector[LATITUDE] = resultVector[LATITUDE]/KDEG2RAD; resultVector[LATITUDE] = resultVector[LATITUDE]/KDEG2RAD;
resultVector[LONGITUDE] = resultVector[LONGITUDE]/KDEG2RAD; resultVector[LONGITUDE] = resultVector[LONGITUDE]/KDEG2RAD;
 End of changes. 2 change blocks. 
2 lines changed or deleted 2 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/