TelescopeClientDirectNexStar.cpp   TelescopeClientDirectNexStar.cpp 
skipping to change at line 117 skipping to change at line 117
const StelCore* core = StelApp::getInstance().getCore(); const StelCore* core = StelApp::getInstance().getCore();
position = core->j2000ToEquinoxEqu(j2000Pos); position = core->j2000ToEquinoxEqu(j2000Pos);
} }
//if (writeBufferEnd - writeBuffer + 20 < (int)sizeof(writeBuffer)) //if (writeBufferEnd - writeBuffer + 20 < (int)sizeof(writeBuffer))
//TODO: See the else clause, think how to do the same thing //TODO: See the else clause, think how to do the same thing
{ {
const double ra_signed = atan2(position[1], position[0]); const double ra_signed = atan2(position[1], position[0]);
//Workaround for the discrepancy in precision between Window s/Linux/PPC Macs and Intel Macs: //Workaround for the discrepancy in precision between Window s/Linux/PPC Macs and Intel Macs:
const double ra = (ra_signed >= 0) ? ra_signed : (ra_signed + 2.0 * M_PI); const double ra = (ra_signed >= 0) ? ra_signed : (ra_signed + 2.0 * M_PI);
const double dec = atan2(position[2], sqrt(position[0]*posit ion[0]+position[1]*position[1])); const double dec = atan2(position[2], std::sqrt(position[0]* position[0]+position[1]*position[1]));
unsigned int ra_int = (unsigned int)floor(0.5 + ra*(((unsign ed int)0x80000000)/M_PI)); unsigned int ra_int = (unsigned int)floor(0.5 + ra*(((unsign ed int)0x80000000)/M_PI));
int dec_int = (int)floor(0.5 + dec*(((unsigned int)0x8000000 0)/M_PI)); int dec_int = (int)floor(0.5 + dec*(((unsigned int)0x8000000 0)/M_PI));
gotoReceived(ra_int, dec_int); gotoReceived(ra_int, dec_int);
} }
/* /*
else else
{ {
qDebug() << "TelescopeTCP(" << name << ")::telescope Goto: "<< "communication is too slow, I will ignore this command"; qDebug() << "TelescopeTCP(" << name << ")::telescope Goto: "<< "communication is too slow, I will ignore this command";
} }
 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/