gSatWrapper.cpp   gSatWrapper.cpp 
skipping to change at line 141 skipping to change at line 141
void gSatWrapper::calcObserverECIPosition(Vec3d& ao_position, Vec3d& ao_vel ocity) void gSatWrapper::calcObserverECIPosition(Vec3d& ao_position, Vec3d& ao_vel ocity)
{ {
StelLocation loc = StelApp::getInstance().getCore()->getCurrentLoc ation(); StelLocation loc = StelApp::getInstance().getCore()->getCurrentLoc ation();
double radLatitude = loc.latitude * KDEG2RAD; double radLatitude = loc.latitude * KDEG2RAD;
double theta = epoch.toThetaLMST(loc.longitude * KDEG2RAD); double theta = epoch.toThetaLMST(loc.longitude * KDEG2RAD);
double r; double r;
double c,sq; double c,sq;
/* Reference: Explanatory supplement to the Astronomical Almanac, p age 209-210. */ /* Reference: Explanatory supplement to the Astronomical Almanac 19 92, page 209-210. */
/* Elipsoid earth model*/ /* Elipsoid earth model*/
/* c = Nlat/a */ /* c = Nlat/a */
c = 1/std::sqrt(1 + __f*(__f - 2)*Sqr(sin(radLatitude))); c = 1/std::sqrt(1 + __f*(__f - 2)*Sqr(sin(radLatitude)));
sq = Sqr(1 - __f)*c; sq = Sqr(1 - __f)*c;
r = (KEARTHRADIUS*c + (loc.altitude/1000))*cos(radLatitude); r = (KEARTHRADIUS*c + (loc.altitude/1000))*cos(radLatitude);
ao_position[0] = r * cos(theta);/*kilometers*/ ao_position[0] = r * cos(theta);/*kilometers*/
ao_position[1] = r * sin(theta); ao_position[1] = r * sin(theta);
ao_position[2] = (KEARTHRADIUS*sq + (loc.altitude/1000))*sin(radLati tude); ao_position[2] = (KEARTHRADIUS*sq + (loc.altitude/1000))*sin(radLati tude);
ao_velocity[0] = -KMFACTOR*ao_position[1];/*kilometers/second*/ ao_velocity[0] = -KMFACTOR*ao_position[1];/*kilometers/second*/
 End of changes. 1 change blocks. 
1 lines changed or deleted 1 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/