Satellite.cpp   Satellite.cpp 
skipping to change at line 144 skipping to change at line 144
setNewTleElements(line1, line2); setNewTleElements(line1, line2);
internationalDesignator = extractInternationalDesignator(line1); internationalDesignator = extractInternationalDesignator(line1);
if (map.contains("lastUpdated")) if (map.contains("lastUpdated"))
{ {
lastUpdated = QDateTime::fromString(map.value("lastUpdated") .toString(), lastUpdated = QDateTime::fromString(map.value("lastUpdated") .toString(),
Qt::ISODate); Qt::ISODate);
} }
orbitValid = true; orbitValid = true;
initialized = true; initialized = true;
update(0.);
} }
Satellite::~Satellite() Satellite::~Satellite()
{ {
if (pSatWrapper != NULL) if (pSatWrapper != NULL)
{ {
delete pSatWrapper; delete pSatWrapper;
pSatWrapper = NULL; pSatWrapper = NULL;
} }
skipping to change at line 331 skipping to change at line 333
.arg(sign) .arg(sign)
.arg(ddop, 6, 'f', 3); .arg(ddop, 6, 'f', 3);
oss << "<br/>"; oss << "<br/>";
} }
} }
postProcessInfoString(str, flags); postProcessInfoString(str, flags);
return str; return str;
} }
Vec3d Satellite::getJ2000EquatorialPos(const StelCore* core) const
{
return core->altAzToJ2000(elAzPosition);;
}
Vec3f Satellite::getInfoColor(void) const Vec3f Satellite::getInfoColor(void) const
{ {
return StelApp::getInstance().getVisionModeNight() ? Vec3f(0.6, 0.0, 0.0) : hintColor; return StelApp::getInstance().getVisionModeNight() ? Vec3f(0.6, 0.0, 0.0) : hintColor;
} }
float Satellite::getVMagnitude(const StelCore* core, bool withExtinction) c onst float Satellite::getVMagnitude(const StelCore* core, bool withExtinction) c onst
{ {
float extinctionMag=0.0; // track magnitude loss float extinctionMag=0.0; // track magnitude loss
if (withExtinction && core->getSkyDrawer()->getFlagHasAtmosphere()) if (withExtinction && core->getSkyDrawer()->getFlagHasAtmosphere())
{ {
skipping to change at line 449 skipping to change at line 456
year += 2000; year += 2000;
else else
year += 1900; year += 1900;
result = QString::number(year) + "-" + rawString.right(4); result = QString::number(year) + "-" + rawString.right(4);
return result; return result;
} }
void Satellite::draw(const StelCore* core, StelPainter& painter, float) void Satellite::draw(const StelCore* core, StelPainter& painter, float)
{ {
XYZ = core->altAzToJ2000(elAzPosition); XYZ = getJ2000EquatorialPos(core);
StelApp::getInstance().getVisionModeNight() ? glColor4f(0.6,0.0,0.0, Vec3f drawColor;
1.0) : glColor4f(hintColor[0],hintColor[1],hintColor[2], Satellite::hintBri (visibility==RADAR_NIGHT) ? drawColor = Vec3f(0.2f,0.2f,0.2f) : draw
ghtness); Color = hintColor;
StelApp::getInstance().getVisionModeNight() ? glColor4f(0.6,0.0,0.0,
1.0) : glColor4f(drawColor[0],drawColor[1],drawColor[2], Satellite::hintBri
ghtness);
StelProjectorP prj = core->getProjection(StelCore::FrameJ2000); StelProjectorP prj = core->getProjection(StelCore::FrameJ2000);
Vec3d xy; Vec3d xy;
if (prj->project(XYZ,xy)) if (prj->project(XYZ,xy))
{ {
if (Satellite::showLabels) if (Satellite::showLabels)
{ {
painter.drawText(xy[0], xy[1], name, 0, 10, 10, fals e); painter.drawText(xy[0], xy[1], name, 0, 10, 10, fals e);
Satellite::hintTexture->bind(); Satellite::hintTexture->bind();
 End of changes. 3 change blocks. 
4 lines changed or deleted 14 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/