TelescopeClient.cpp   TelescopeClient.cpp 
skipping to change at line 268 skipping to change at line 268
//! "Stellarium telescope control protocol" text file //! "Stellarium telescope control protocol" text file
void TelescopeTCP::telescopeGoto(const Vec3d &j2000Pos) void TelescopeTCP::telescopeGoto(const Vec3d &j2000Pos)
{ {
if (!isConnected()) if (!isConnected())
return; return;
Vec3d position = j2000Pos; Vec3d position = j2000Pos;
if (equinox == EquinoxJNow) if (equinox == EquinoxJNow)
{ {
const StelCore* core = StelApp::getInstance().getCore(); const StelCore* core = StelApp::getInstance().getCore();
position = core->j2000ToEquinoxEqu(j2000Pos); position = core->j2000ToEquinoxEqu(j2000Pos, StelCore::Refra ctionOff);
} }
if (writeBufferEnd - writeBuffer + 20 < (int)sizeof(writeBuffer)) if (writeBufferEnd - writeBuffer + 20 < (int)sizeof(writeBuffer))
{ {
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], std::sqrt(position[0]* position[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));
skipping to change at line 435 skipping to change at line 435
(((unsigned int)(unsign ed char)(p[23])) << 24)); (((unsigned int)(unsign ed char)(p[23])) << 24));
const double ra = ra_int * (M_PI/( unsigned int)0x80000000); const double ra = ra_int * (M_PI/( unsigned int)0x80000000);
const double dec = dec_int * (M_PI/( unsigned int)0x80000000); const double dec = dec_int * (M_PI/( unsigned int)0x80000000);
const double cdec = cos(dec); const double cdec = cos(dec);
Vec3d position(cos(ra)*cdec, sin(ra) *cdec, sin(dec)); Vec3d position(cos(ra)*cdec, sin(ra) *cdec, sin(dec));
Vec3d j2000Position = position; Vec3d j2000Position = position;
if (equinox == EquinoxJNow) if (equinox == EquinoxJNow)
{ {
const StelCore* core = StelA pp::getInstance().getCore(); const StelCore* core = StelA pp::getInstance().getCore();
j2000Position = core->equino xEquToJ2000(position); j2000Position = core->equino xEquToJ2000(position, StelCore::RefractionOff);
} }
interpolatedPosition.add(j2000Positi on, getNow(), server_micros, status); interpolatedPosition.add(j2000Positi on, getNow(), server_micros, status);
} }
break; break;
default: default:
qDebug() << "TelescopeTCP(" << name << ")::performReading: " << "ignoring unknown packet, type: " << type; qDebug() << "TelescopeTCP(" << name << ")::performReading: " << "ignoring unknown packet, type: " << type;
break; break;
} }
p += size; p += size;
} }
 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/